|| type == Byte.class || type == Boolean.class) { type = wrapperToPrimitive(type); validateClass(c, parameter); validateClass(type, parameter);
/** * creates a new container under the specified account. If the container with the same name already exists, the operation fails. * * @param context The context to associate with this operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'container', 'blob'. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ContainerCreateResponse> createWithRestResponseAsync(Context context, Integer timeout, Map<String, String> metadata, PublicAccessType access, String requestId) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(metadata); final String restype = "container"; return service.create(context, this.client.url(), timeout, metadata, access, this.client.version(), requestId, restype); }
/** * creates a new container under the specified account. If the container with the same name already exists, the operation fails. * * @param context The context to associate with this operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param metadata Optional. Specifies a user-defined name-value pair associated with the blob. If no name-value pairs are specified, the operation will copy the metadata from the source blob or file to the destination blob. If one or more name-value pairs are specified, the destination blob is created with the specified metadata, and metadata is not copied from the source blob or file. Note that beginning with version 2009-09-19, metadata names must adhere to the naming rules for C# identifiers. See Naming and Referencing Containers, Blobs, and Metadata for more information. * @param access Specifies whether data in the container may be accessed publicly and the level of access. Possible values include: 'container', 'blob'. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ContainerCreateResponse> createWithRestResponseAsync(Context context, Integer timeout, Map<String, String> metadata, PublicAccessType access, String requestId) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(metadata); final String restype = "container"; return service.create(context, this.client.url(), timeout, metadata, access, this.client.version(), requestId, restype); }
/** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @param context The context to associate with this operation. * @param storageServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ServiceSetPropertiesResponse> setPropertiesWithRestResponseAsync(Context context, @NonNull StorageServiceProperties storageServiceProperties, Integer timeout, String requestId) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (storageServiceProperties == null) { throw new IllegalArgumentException("Parameter storageServiceProperties is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(storageServiceProperties); final String restype = "service"; final String comp = "properties"; return service.setProperties(context, this.client.url(), storageServiceProperties, timeout, this.client.version(), requestId, restype, comp); }
/** * Sets properties for a storage account's Blob service endpoint, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules. * * @param context The context to associate with this operation. * @param storageServiceProperties The StorageService properties. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ServiceSetPropertiesResponse> setPropertiesWithRestResponseAsync(Context context, @NonNull StorageServiceProperties storageServiceProperties, Integer timeout, String requestId) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (storageServiceProperties == null) { throw new IllegalArgumentException("Parameter storageServiceProperties is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(storageServiceProperties); final String restype = "service"; final String comp = "properties"; return service.setProperties(context, this.client.url(), storageServiceProperties, timeout, this.client.version(), requestId, restype, comp); }
/** * returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs. * * @param context The context to associate with this operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ContainerGetPropertiesResponse> getPropertiesWithRestResponseAsync(Context context, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String restype = "container"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.getProperties(context, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId); }
/** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. * * @param context The context to associate with this operation. * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', 'P10', 'P20', 'P30', 'P40', 'P50', 'Hot', 'Cool', 'Archive'. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<BlobSetTierResponse> setTierWithRestResponseAsync(Context context, @NonNull AccessTier tier, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (tier == null) { throw new IllegalArgumentException("Parameter tier is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String comp = "tier"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.setTier(context, this.client.url(), timeout, tier, this.client.version(), requestId, comp, leaseId); }
/** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with zero length and full metadata. * * @param context The context to associate with this operation. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<BlobAbortCopyFromURLResponse> abortCopyFromURLWithRestResponseAsync(Context context, @NonNull String copyId, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (copyId == null) { throw new IllegalArgumentException("Parameter copyId is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String comp = "copy"; final String copyActionAbortConstant = "abort"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.abortCopyFromURL(context, this.client.url(), copyId, timeout, this.client.version(), requestId, comp, copyActionAbortConstant, leaseId); }
/** * returns all user-defined metadata and system properties for the specified container. The data returned does not include the container's list of blobs. * * @param context The context to associate with this operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ContainerGetPropertiesResponse> getPropertiesWithRestResponseAsync(Context context, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String restype = "container"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.getProperties(context, this.client.url(), timeout, this.client.version(), requestId, restype, leaseId); }
/** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed publicly. * * @param context The context to associate with this operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ContainerGetAccessPolicyResponse> getAccessPolicyWithRestResponseAsync(Context context, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String restype = "container"; final String comp = "acl"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.getAccessPolicy(context, this.client.url(), timeout, this.client.version(), requestId, restype, comp, leaseId); }
/** * gets the permissions for the specified container. The permissions indicate whether container data may be accessed publicly. * * @param context The context to associate with this operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<ContainerGetAccessPolicyResponse> getAccessPolicyWithRestResponseAsync(Context context, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String restype = "container"; final String comp = "acl"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.getAccessPolicy(context, this.client.url(), timeout, this.client.version(), requestId, restype, comp, leaseId); }
/** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. * * @param context The context to associate with this operation. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted', 'all'. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<BlockBlobGetBlockListResponse> getBlockListWithRestResponseAsync(Context context, @NonNull BlockListType listType, String snapshot, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (listType == null) { throw new IllegalArgumentException("Parameter listType is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String comp = "blocklist"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.getBlockList(context, this.client.url(), snapshot, listType, timeout, this.client.version(), requestId, comp, leaseId); }
/** * The Abort Copy From URL operation aborts a pending Copy From URL operation, and leaves a destination blob with zero length and full metadata. * * @param context The context to associate with this operation. * @param copyId The copy identifier provided in the x-ms-copy-id header of the original Copy Blob operation. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<BlobAbortCopyFromURLResponse> abortCopyFromURLWithRestResponseAsync(Context context, @NonNull String copyId, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (copyId == null) { throw new IllegalArgumentException("Parameter copyId is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String comp = "copy"; final String copyActionAbortConstant = "abort"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.abortCopyFromURL(context, this.client.url(), copyId, timeout, this.client.version(), requestId, comp, copyActionAbortConstant, leaseId); }
/** * The Get Block List operation retrieves the list of blocks that have been uploaded as part of a block blob. * * @param context The context to associate with this operation. * @param listType Specifies whether to return the list of committed blocks, the list of uncommitted blocks, or both lists together. Possible values include: 'committed', 'uncommitted', 'all'. * @param snapshot The snapshot parameter is an opaque DateTime value that, when present, specifies the blob snapshot to retrieve. For more information on working with blob snapshots, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/creating-a-snapshot-of-a-blob">Creating a Snapshot of a Blob.</a>. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<BlockBlobGetBlockListResponse> getBlockListWithRestResponseAsync(Context context, @NonNull BlockListType listType, String snapshot, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (listType == null) { throw new IllegalArgumentException("Parameter listType is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String comp = "blocklist"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.getBlockList(context, this.client.url(), snapshot, listType, timeout, this.client.version(), requestId, comp, leaseId); }
/** * The Set Tier operation sets the tier on a blob. The operation is allowed on a page blob in a premium storage account and on a block blob in a blob storage account (locally redundant storage only). A premium page blob's tier determines the allowed size, IOPS, and bandwidth of the blob. A block blob's tier determines Hot/Cool/Archive storage type. This operation does not update the blob's ETag. * * @param context The context to associate with this operation. * @param tier Indicates the tier to be set on the blob. Possible values include: 'P4', 'P6', 'P10', 'P20', 'P30', 'P40', 'P50', 'Hot', 'Cool', 'Archive'. * @param timeout The timeout parameter is expressed in seconds. For more information, see <a href="https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/setting-timeouts-for-blob-service-operations">Setting Timeouts for Blob Service Operations.</a>. * @param requestId Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. * @param leaseAccessConditions Additional parameters for the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @return a Single which performs the network request upon subscription. */ public Single<BlobSetTierResponse> setTierWithRestResponseAsync(Context context, @NonNull AccessTier tier, Integer timeout, String requestId, LeaseAccessConditions leaseAccessConditions) { if (this.client.url() == null) { throw new IllegalArgumentException("Parameter this.client.url() is required and cannot be null."); } if (tier == null) { throw new IllegalArgumentException("Parameter tier is required and cannot be null."); } if (this.client.version() == null) { throw new IllegalArgumentException("Parameter this.client.version() is required and cannot be null."); } Validator.validate(leaseAccessConditions); final String comp = "tier"; String leaseId = null; if (leaseAccessConditions != null) { leaseId = leaseAccessConditions.leaseId(); } return service.setTier(context, this.client.url(), timeout, tier, this.client.version(), requestId, comp, leaseId); }