| 1 | package blobsscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/ |
| 2 | |
| 3 | import ( |
| 4 | "contextscip-go gomod github.com/golang/go/src go1.13 context/" |
| 5 | "net/httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/" |
| 6 | "stringsscip-go gomod github.com/golang/go/src go1.13 strings/" |
| 7 | |
| 8 | "github.com/Azure/go-autorest/autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/" |
| 9 | "github.com/Azure/go-autorest/autorest/azurescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest/azure`/" |
| 10 | "github.com/Azure/go-autorest/autorest/validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/" |
| 11 | "github.com/tombuildsstuff/giovanni/storage/internal/endpointsscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/endpoints`/" |
| 12 | "github.com/tombuildsstuff/giovanni/storage/internal/metadatascip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/metadata`/" |
| 13 | ) |
| 14 | |
| 15 | type CopyInputscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput# struct { |
| 16 | // Specifies the name of the source blob or file. |
| 17 | // Beginning with version 2012-02-12, this value may be a URL of up to 2 KB in length that specifies a blob. |
| 18 | // The value should be URL-encoded as it would appear in a request URI. |
| 19 | // A source blob in the same storage account can be authenticated via Shared Key. |
| 20 | // However, if the source is a blob in another account, |
| 21 | // the source blob must either be public or must be authenticated via a shared access signature. |
| 22 | // If the source blob is public, no authentication is required to perform the copy operation. |
| 23 | // |
| 24 | // Beginning with version 2015-02-21, the source object may be a file in the Azure File service. |
| 25 | // If the source object is a file that is to be copied to a blob, then the source file must be authenticated |
| 26 | // using a shared access signature, whether it resides in the same account or in a different account. |
| 27 | // |
| 28 | // Only storage accounts created on or after June 7th, 2012 allow the Copy Blob operation to |
| 29 | // copy from another storage account. |
| 30 | CopySourcescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#CopySource. string |
| 31 | |
| 32 | // The ID of the Lease |
| 33 | // Required if the destination blob has an active lease. |
| 34 | // The lease ID specified for this header must match the lease ID of the destination blob. |
| 35 | // If the request does not include the lease ID or it is not valid, |
| 36 | // the operation fails with status code 412 (Precondition Failed). |
| 37 | // |
| 38 | // If this header is specified and the destination blob does not currently have an active lease, |
| 39 | // the operation will also fail with status code 412 (Precondition Failed). |
| 40 | LeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#LeaseID. *string |
| 41 | |
| 42 | // The ID of the Lease on the Source Blob |
| 43 | // Specify to perform the Copy Blob operation only if the lease ID matches the active lease ID of the source blob. |
| 44 | SourceLeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceLeaseID. *string |
| 45 | |
| 46 | // For page blobs on a premium account only. Specifies the tier to be set on the target blob |
| 47 | AccessTierscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#AccessTier. *AccessTierscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/AccessTier# |
| 48 | |
| 49 | // A user-defined name-value pair associated with the blob. |
| 50 | // If no name-value pairs are specified, the operation will copy the metadata from the source blob or |
| 51 | // file to the destination blob. |
| 52 | // If one or more name-value pairs are specified, the destination blob is created with the specified metadata, |
| 53 | // and metadata is not copied from the source blob or file. |
| 54 | MetaDatascip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#MetaData. map[string]string |
| 55 | |
| 56 | // An ETag value. |
| 57 | // Specify an ETag value for this conditional header to copy the blob only if the specified |
| 58 | // ETag value matches the ETag value for an existing destination blob. |
| 59 | // If the ETag for the destination blob does not match the ETag specified for If-Match, |
| 60 | // the Blob service returns status code 412 (Precondition Failed). |
| 61 | IfMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfMatch. *string |
| 62 | |
| 63 | // An ETag value, or the wildcard character (*). |
| 64 | // Specify an ETag value for this conditional header to copy the blob only if the specified |
| 65 | // ETag value does not match the ETag value for the destination blob. |
| 66 | // Specify the wildcard character (*) to perform the operation only if the destination blob does not exist. |
| 67 | // If the specified condition isn't met, the Blob service returns status code 412 (Precondition Failed). |
| 68 | IfNoneMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfNoneMatch. *string |
| 69 | |
| 70 | // A DateTime value. |
| 71 | // Specify this conditional header to copy the blob only if the destination blob |
| 72 | // has been modified since the specified date/time. |
| 73 | // If the destination blob has not been modified, the Blob service returns status code 412 (Precondition Failed). |
| 74 | IfModifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfModifiedSince. *string |
| 75 | |
| 76 | // A DateTime value. |
| 77 | // Specify this conditional header to copy the blob only if the destination blob |
| 78 | // has not been modified since the specified date/time. |
| 79 | // If the destination blob has been modified, the Blob service returns status code 412 (Precondition Failed). |
| 80 | IfUnmodifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfUnmodifiedSince. *string |
| 81 | |
| 82 | // An ETag value. |
| 83 | // Specify this conditional header to copy the source blob only if its ETag matches the value specified. |
| 84 | // If the ETag values do not match, the Blob service returns status code 412 (Precondition Failed). |
| 85 | // This cannot be specified if the source is an Azure File. |
| 86 | SourceIfMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfMatch. *string |
| 87 | |
| 88 | // An ETag value. |
| 89 | // Specify this conditional header to copy the blob only if its ETag does not match the value specified. |
| 90 | // If the values are identical, the Blob service returns status code 412 (Precondition Failed). |
| 91 | // This cannot be specified if the source is an Azure File. |
| 92 | SourceIfNoneMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfNoneMatch. *string |
| 93 | |
| 94 | // A DateTime value. |
| 95 | // Specify this conditional header to copy the blob only if the source blob has been modified |
| 96 | // since the specified date/time. |
| 97 | // If the source blob has not been modified, the Blob service returns status code 412 (Precondition Failed). |
| 98 | // This cannot be specified if the source is an Azure File. |
| 99 | SourceIfModifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfModifiedSince. *string |
| 100 | |
| 101 | // A DateTime value. |
| 102 | // Specify this conditional header to copy the blob only if the source blob has not been modified |
| 103 | // since the specified date/time. |
| 104 | // If the source blob has been modified, the Blob service returns status code 412 (Precondition Failed). |
| 105 | // This header cannot be specified if the source is an Azure File. |
| 106 | SourceIfUnmodifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfUnmodifiedSince. *string |
| 107 | } |
| 108 | |
| 109 | type CopyResultscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult# struct { |
| 110 | autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Responsescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#Response. |
| 111 | |
| 112 | CopyIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#CopyID. string |
| 113 | CopyStatusscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#CopyStatus. string |
| 114 | } |
| 115 | |
| 116 | // Copy copies a blob to a destination within the storage account asynchronously. |
| 117 | func (client Clientscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#) Copyscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#Copy().(ctx contextscip-go gomod github.com/golang/go/src go1.13 context/.Contextscip-go gomod github.com/golang/go/src go1.13 context/Context#, accountName, containerName, blobName string, input CopyInputscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#) (result CopyResultscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#, err error) { |
| 118 | if accountName == "" { |
| 119 | return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "Copy", "`accountName` cannot be an empty string.") |
| 120 | } |
| 121 | if containerName == "" { |
| 122 | return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "Copy", "`containerName` cannot be an empty string.") |
| 123 | } |
| 124 | if stringsscip-go gomod github.com/golang/go/src go1.13 strings/.ToLowerscip-go gomod github.com/golang/go/src go1.13 strings/ToLower().(containerName) != containerName { |
| 125 | return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "Copy", "`containerName` must be a lower-cased string.") |
| 126 | } |
| 127 | if blobName == "" { |
| 128 | return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "Copy", "`blobName` cannot be an empty string.") |
| 129 | } |
| 130 | if input.CopySourcescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#CopySource. == "" { |
| 131 | return result, validationscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/.NewErrorscip-go gomod github.com/Azure/go-autorest/autorest/validation v0.3.1 `github.com/Azure/go-autorest/autorest/validation`/NewError().("blobs.Client", "Copy", "`input.CopySource` cannot be an empty string.") |
| 132 | } |
| 133 | |
| 134 | req, err := client.CopyPreparerscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#CopyPreparer().(ctx, accountName, containerName, blobName, input) |
| 135 | if err != nil { |
| 136 | err = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.NewErrorWithErrorscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/NewErrorWithError().(err, "blobs.Client", "Copy", nil, "Failure preparing request") |
| 137 | return |
| 138 | } |
| 139 | |
| 140 | resp, err := client.CopySenderscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#CopySender().(req) |
| 141 | if err != nil { |
| 142 | result.Responsescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#Response. = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Responsescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Response#{Responsescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Response#Response.: resp} |
| 143 | err = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.NewErrorWithErrorscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/NewErrorWithError().(err, "blobs.Client", "Copy", resp, "Failure sending request") |
| 144 | return |
| 145 | } |
| 146 | |
| 147 | result, err = client.CopyResponderscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#CopyResponder().(resp) |
| 148 | if err != nil { |
| 149 | err = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.NewErrorWithErrorscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/NewErrorWithError().(err, "blobs.Client", "Copy", resp, "Failure responding to request") |
| 150 | return |
| 151 | } |
| 152 | |
| 153 | return |
| 154 | } |
| 155 | |
| 156 | // CopyPreparer prepares the Copy request. |
| 157 | func (client Clientscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#) CopyPreparerscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#CopyPreparer().(ctx contextscip-go gomod github.com/golang/go/src go1.13 context/.Contextscip-go gomod github.com/golang/go/src go1.13 context/Context#, accountName, containerName, blobName string, input CopyInputscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#) (*httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.13 `net/http`/Request#, error) { |
| 158 | pathParameters := map[string]interface{}{ |
| 159 | "containerName": autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Encodescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Encode().("path", containerName), |
| 160 | "blobName": autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Encodescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Encode().("path", blobName), |
| 161 | } |
| 162 | |
| 163 | headers := map[string]interface{}{ |
| 164 | "x-ms-version": APIVersionscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/APIVersion., |
| 165 | "x-ms-copy-source": autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Encodescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Encode().("header", input.CopySourcescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#CopySource.), |
| 166 | } |
| 167 | |
| 168 | if input.LeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#LeaseID. != nil { |
| 169 | headers["x-ms-lease-id"] = *input.LeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#LeaseID. |
| 170 | } |
| 171 | if input.SourceLeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceLeaseID. != nil { |
| 172 | headers["x-ms-source-lease-id"] = *input.SourceLeaseIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceLeaseID. |
| 173 | } |
| 174 | if input.AccessTierscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#AccessTier. != nil { |
| 175 | headers["x-ms-access-tier"] = string(*input.AccessTierscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#AccessTier.) |
| 176 | } |
| 177 | |
| 178 | if input.IfMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfMatch. != nil { |
| 179 | headers["If-Match"] = *input.IfMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfMatch. |
| 180 | } |
| 181 | if input.IfNoneMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfNoneMatch. != nil { |
| 182 | headers["If-None-Match"] = *input.IfNoneMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfNoneMatch. |
| 183 | } |
| 184 | if input.IfUnmodifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfUnmodifiedSince. != nil { |
| 185 | headers["If-Unmodified-Since"] = *input.IfUnmodifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfUnmodifiedSince. |
| 186 | } |
| 187 | if input.IfModifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfModifiedSince. != nil { |
| 188 | headers["If-Modified-Since"] = *input.IfModifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#IfModifiedSince. |
| 189 | } |
| 190 | |
| 191 | if input.SourceIfMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfMatch. != nil { |
| 192 | headers["x-ms-source-if-match"] = *input.SourceIfMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfMatch. |
| 193 | } |
| 194 | if input.SourceIfNoneMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfNoneMatch. != nil { |
| 195 | headers["x-ms-source-if-none-match"] = *input.SourceIfNoneMatchscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfNoneMatch. |
| 196 | } |
| 197 | if input.SourceIfModifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfModifiedSince. != nil { |
| 198 | headers["x-ms-source-if-modified-since"] = *input.SourceIfModifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfModifiedSince. |
| 199 | } |
| 200 | if input.SourceIfUnmodifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfUnmodifiedSince. != nil { |
| 201 | headers["x-ms-source-if-unmodified-since"] = *input.SourceIfUnmodifiedSincescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#SourceIfUnmodifiedSince. |
| 202 | } |
| 203 | |
| 204 | headers = metadatascip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/metadata`/.SetIntoHeadersscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/metadata`/SetIntoHeaders().(headers, input.MetaDatascip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyInput#MetaData.) |
| 205 | |
| 206 | preparer := autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.CreatePreparerscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/CreatePreparer().( |
| 207 | autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.AsPutscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/AsPut().(), |
| 208 | autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.WithBaseURLscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/WithBaseURL().(endpointsscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/endpoints`/.GetBlobEndpointscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/internal/endpoints`/GetBlobEndpoint().(client.BaseURIscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#BaseURI., accountName)), |
| 209 | autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.WithPathParametersscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/WithPathParameters().("/{containerName}/{blobName}", pathParameters), |
| 210 | autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.WithHeadersscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/WithHeaders().(headers)) |
| 211 | return preparer.Preparescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Preparer#Prepare().((&httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.13 `net/http`/Request#{}).WithContextscip-go gomod github.com/golang/go/src go1.13 `net/http`/Request#WithContext().(ctx)) |
| 212 | } |
| 213 | |
| 214 | // CopySender sends the Copy request. The method will close the |
| 215 | // http.Response Body if it receives an error. |
| 216 | func (client Clientscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#) CopySenderscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#CopySender().(req *httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.Requestscip-go gomod github.com/golang/go/src go1.13 `net/http`/Request#) (*httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.Responsescip-go gomod github.com/golang/go/src go1.13 `net/http`/Response#, error) { |
| 217 | return autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.SendWithSenderscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/SendWithSender().(client, req, |
| 218 | azurescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest/azure`/.DoRetryWithRegistrationscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest/azure`/DoRetryWithRegistration().(client.Clientscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#Client.)) |
| 219 | } |
| 220 | |
| 221 | // CopyResponder handles the response to the Copy request. The method always |
| 222 | // closes the http.Response Body. |
| 223 | func (client Clientscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#) CopyResponderscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/Client#CopyResponder().(resp *httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.Responsescip-go gomod github.com/golang/go/src go1.13 `net/http`/Response#) (result CopyResultscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#, err error) { |
| 224 | if resp != nil && resp.Headerscip-go gomod github.com/golang/go/src go1.13 `net/http`/Response#Header. != nil { |
| 225 | result.CopyIDscip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#CopyID. = resp.Headerscip-go gomod github.com/golang/go/src go1.13 `net/http`/Response#Header..Getscip-go gomod github.com/golang/go/src go1.13 `net/http`/Header#Get().("x-ms-copy-id") |
| 226 | } |
| 227 | |
| 228 | err = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Respondscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Respond().( |
| 229 | resp, |
| 230 | client.ByInspectingscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Client#ByInspecting().(), |
| 231 | azurescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest/azure`/.WithErrorUnlessStatusCodescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest/azure`/WithErrorUnlessStatusCode().(httpscip-go gomod github.com/golang/go/src go1.13 `net/http`/.StatusAcceptedscip-go gomod github.com/golang/go/src go1.13 `net/http`/StatusAccepted.), |
| 232 | autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.ByClosingscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/ByClosing().()) |
| 233 | result.Responsescip-go gomod github.com/tombuildsstuff/giovanni . `github.com/tombuildsstuff/giovanni/storage/2017-07-29/blob/blobs`/CopyResult#Response. = autorestscip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/.Responsescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Response#{Responsescip-go gomod github.com/Azure/go-autorest/autorest v0.11.19 `github.com/Azure/go-autorest/autorest`/Response#Response.: resp} |
| 234 | return |
| 235 | } |