Google Cloud Storage class
class CloudStorage
Unbind or remove FirebaseApp.
void resetApp()
Perform the async task repeatedly. Should be places in main loop function.
void loop()
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
bool download(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, file_config_data &file, GoogleCloudStorage::GetOptions &options)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
void download(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, file_config_data &file, GoogleCloudStorage::GetOptions &options, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
void download(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, file_config_data &file, GoogleCloudStorage::GetOptions &options, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to upload. The object is the object to be stored in the Storage bucket. For the insert options (options.insertOptions), see https://cloud.google.com/storage/docs/json_api/v1/objects/insert#optional-parameters For insert properties (options.insertProps), see https://cloud.google.com/storage/docs/json_api/v1/objects/insert#optional-properties
bool upload(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, file_config_data &file, GoogleCloudStorage::uploadOptions &options)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.options
- Optional. The GoogleCloudStorage::uploadOptions that holds the information for insert options, properties and types of upload.
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to upload. The object is the object to be stored in the Storage bucket. For the insert options (options.insertOptions), see https://cloud.google.com/storage/docs/json_api/v1/objects/insert#optional-parameters For insert properties (options.insertProps), see https://cloud.google.com/storage/docs/json_api/v1/objects/insert#optional-properties
void upload(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, file_config_data &file, GoogleCloudStorage::uploadOptions &options, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.options
- Optional. The GoogleCloudStorage::uploadOptions that holds the information for insert options, properties and types of upload.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to upload. The object is the object to be stored in the Storage bucket. For the insert options (options.insertOptions), see https://cloud.google.com/storage/docs/json_api/v1/objects/insert#optional-parameters For insert properties (options.insertProps), see https://cloud.google.com/storage/docs/json_api/v1/objects/insert#optional-properties
void upload(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, file_config_data &file, GoogleCloudStorage::uploadOptions &options, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.file
- The filesystem data (file_config_data) obtained from FileConfig class object.options
- Optional. The GoogleCloudStorage::uploadOptions that holds the information for insert options, properties and types of upload.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
bool ota(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::GetOptions &options)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
void ota(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::GetOptions &options, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to download. The object is the object in Storage bucket to download. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
void ota(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::GetOptions &options, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to get metadata. The object is the object in Storage bucket to get metadata. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
String getMetadata(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::GetOptions &options)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.
Returns:
String
- The response payload.
The bucketid is the Storage bucket Id of object to get metadata. The object is the object in Storage bucket to get metadata. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
void getMetadata(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::GetOptions &options, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to get metadata. The object is the object in Storage bucket to get metadata. For the get options, see https://cloud.google.com/storage/docs/json_api/v1/objects/get#optional-parameters
void getMetadata(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::GetOptions &options, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::GetOptions that holds the get options.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id to list all objects. For the list options, see https://cloud.google.com/storage/docs/json_api/v1/objects/list#optional-parameters
String list(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::ListOptions &options)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id in its constructor.options
- Optional. The GoogleCloudStorage::ListOptions that holds the list options.
Returns:
String
- The response payload.
The bucketid is the Storage bucket Id to list all objects. For the list options, see https://cloud.google.com/storage/docs/json_api/v1/objects/list#optional-parameters
void list(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::ListOptions &options, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id in its constructor.options
- Optional. The GoogleCloudStorage::ListOptions that holds the list options.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id to list all objects. For the list options, see https://cloud.google.com/storage/docs/json_api/v1/objects/list#optional-parameters
void list(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::ListOptions &options, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id in its constructor.options
- Optional. The GoogleCloudStorage::ListOptions that holds the list options.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
The bucketid is the Storage bucket Id of object to delete. The object is the object in Storage bucket to delete. For the delete options, see see https://cloud.google.com/storage/docs/json_api/v1/objects/delete#optional-parameters
bool deleteObject(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::DeleteOptions options)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::DeleteOptions that holds the delete options.
Returns:
- Boolean value, indicates the success of the operation.
The bucketid is the Storage bucket Id of object to delete. The object is the object in Storage bucket to delete. For the delete options, see see https://cloud.google.com/storage/docs/json_api/v1/objects/delete#optional-parameters
void deleteObject(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::DeleteOptions options, AsyncResult &aResult)
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::DeleteOptions that holds the delete options.aResult
- The async result (AsyncResult).
The bucketid is the Storage bucket Id of object to delete. The object is the object in Storage bucket to delete. For the delete options, see see https://cloud.google.com/storage/docs/json_api/v1/objects/delete#optional-parameters
void deleteObject(AsyncClientClass &aClient, const GoogleCloudStorage::Parent &parent, GoogleCloudStorage::DeleteOptions options, AsyncResultCallback cb, const String &uid = "")
Params:
aClient
- The async client.parent
- The GoogleCloudStorage::Parent object included Storage bucket Id and object in its constructor.options
- Optional. The GoogleCloudStorage::DeleteOptions that holds the delete options.cb
- The async result callback (AsyncResultCallback).uid
- The user specified UID of async result (optional).
Set Arduino OTA Storage.
void setOTAStorage(OTAStorage &storage)
Params:
storage
- The ArduinoOTAStorage
class object.