diff --git a/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go b/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go index 648394732f65..6ad0f6adebf9 100644 --- a/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go +++ b/services/preview/storage/mgmt/2015-05-01-preview/storage/models.go @@ -141,11 +141,11 @@ func PossibleUsageUnitValues() []UsageUnit { type Account struct { autorest.Response `json:"-"` *AccountProperties `json:"properties,omitempty"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -159,15 +159,6 @@ func (a Account) MarshalJSON() ([]byte, error) { if a.AccountProperties != nil { objectMap["properties"] = a.AccountProperties } - 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 } @@ -255,11 +246,11 @@ type AccountCheckNameAvailabilityParameters struct { // AccountCreateParameters the parameters to provide for the account. type AccountCreateParameters struct { *AccountPropertiesCreateParameters `json:"properties,omitempty"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -273,15 +264,6 @@ func (acp AccountCreateParameters) MarshalJSON() ([]byte, error) { if acp.AccountPropertiesCreateParameters != nil { objectMap["properties"] = acp.AccountPropertiesCreateParameters } - if acp.ID != nil { - objectMap["id"] = acp.ID - } - if acp.Name != nil { - objectMap["name"] = acp.Name - } - if acp.Type != nil { - objectMap["type"] = acp.Type - } if acp.Location != nil { objectMap["location"] = acp.Location } @@ -571,7 +553,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -593,11 +575,11 @@ func (future *AccountsCreateFuture) Result(client AccountsClient) (a Account, er // AccountUpdateParameters the parameters to update on the account. type AccountUpdateParameters struct { *AccountPropertiesUpdateParameters `json:"properties,omitempty"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -611,15 +593,6 @@ func (aup AccountUpdateParameters) MarshalJSON() ([]byte, error) { if aup.AccountPropertiesUpdateParameters != nil { objectMap["properties"] = aup.AccountPropertiesUpdateParameters } - if aup.ID != nil { - objectMap["id"] = aup.ID - } - if aup.Name != nil { - objectMap["name"] = aup.Name - } - if aup.Type != nil { - objectMap["type"] = aup.Type - } if aup.Location != nil { objectMap["location"] = aup.Location } @@ -729,11 +702,11 @@ type Endpoints struct { // Resource ... type Resource struct { - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -744,15 +717,6 @@ type Resource struct { // 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 } diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go index a09af99b06de..38f9e21041bf 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/blobcontainers.go @@ -116,6 +116,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), @@ -1281,6 +1282,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), diff --git a/services/preview/storage/mgmt/2018-03-01-preview/storage/models.go b/services/preview/storage/mgmt/2018-03-01-preview/storage/models.go index f675d497e24a..cf7dba1dec36 100644 --- a/services/preview/storage/mgmt/2018-03-01-preview/storage/models.go +++ b/services/preview/storage/mgmt/2018-03-01-preview/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -500,9 +501,9 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage' + // Kind - READ-ONLY; 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"` @@ -512,23 +513,17 @@ type Account struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 } @@ -541,15 +536,6 @@ func (a Account) MarshalJSON() ([]byte, error) { 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) } @@ -769,56 +755,44 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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) } @@ -875,7 +849,7 @@ func (amp *AccountManagementPolicies) UnmarshalJSON(body []byte) error { // AccountManagementPoliciesRulesProperty the Storage Account Data Policies properties. type AccountManagementPoliciesRulesProperty struct { - // LastModifiedTime - Returns the date and time the ManagementPolicies was last modified. + // LastModifiedTime - READ-ONLY; 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"` @@ -883,33 +857,33 @@ type AccountManagementPoliciesRulesProperty struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` @@ -981,7 +955,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -1098,13 +1072,13 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag. type AzureEntityResource struct { - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1113,13 +1087,13 @@ type BlobContainer struct { autorest.Response `json:"-"` // ContainerProperties - Properties of the blob container. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1129,18 +1103,6 @@ func (bc BlobContainer) MarshalJSON() ([]byte, error) { 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) } @@ -1207,11 +1169,11 @@ func (bc *BlobContainer) UnmarshalJSON(body []byte) error { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -1219,23 +1181,23 @@ type CheckNameAvailabilityResult struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The ImmutabilityPolicy property of the container. ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` - // LegalHold - The LegalHold property of the container. + // LegalHold - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` } @@ -1245,33 +1207,9 @@ func (cp ContainerProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1305,7 +1243,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -1315,34 +1253,34 @@ type EncryptionServices struct { 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 - READ-ONLY; The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. + // Queue - READ-ONLY; 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, table, web or dfs // object. type Endpoints struct { - // Blob - Gets the blob endpoint. + // Blob - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; Gets the file endpoint. File *string `json:"file,omitempty"` - // Web - Gets the web endpoint. + // Web - READ-ONLY; Gets the web endpoint. Web *string `json:"web,omitempty"` - // Dfs - Gets the dfs endpoint. + // Dfs - READ-ONLY; Gets the dfs endpoint. Dfs *string `json:"dfs,omitempty"` } // Identity identity for the resource. type Identity struct { - // PrincipalID - The principal ID of resource identity. + // PrincipalID - READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty"` - // TenantID - The tenant ID of resource. + // TenantID - READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty"` // Type - The identity type. Type *string `json:"type,omitempty"` @@ -1354,13 +1292,13 @@ type ImmutabilityPolicy struct { autorest.Response `json:"-"` // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1370,18 +1308,6 @@ func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) { 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) } @@ -1449,9 +1375,9 @@ func (IP *ImmutabilityPolicy) UnmarshalJSON(body []byte) error { type ImmutabilityPolicyProperties struct { // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - ImmutabilityPolicy Etag. + // Etag - READ-ONLY; ImmutabilityPolicy Etag. Etag *string `json:"etag,omitempty"` - // UpdateHistory - The ImmutabilityPolicy update history of the blob container. + // UpdateHistory - READ-ONLY; The ImmutabilityPolicy update history of the blob container. UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"` } @@ -1461,12 +1387,6 @@ func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1516,7 +1436,7 @@ func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error { 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 - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' State ImmutabilityPolicyState `json:"state,omitempty"` } @@ -1564,7 +1484,7 @@ type LeaseContainerResponse struct { // 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 - READ-ONLY; 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"` @@ -1572,7 +1492,7 @@ type LegalHold struct { // 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 - READ-ONLY; 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"` @@ -1581,7 +1501,7 @@ type LegalHoldProperties struct { // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } @@ -1589,13 +1509,13 @@ type ListAccountSasResponse struct { type ListContainerItem struct { // ContainerProperties - The blob container properties be listed out. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1605,18 +1525,6 @@ func (lci ListContainerItem) MarshalJSON() ([]byte, error) { 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) } @@ -1690,7 +1598,7 @@ type ListContainerItems struct { // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } @@ -1886,29 +1794,29 @@ type OperationProperties struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1964,15 +1872,15 @@ type ServiceSpecification struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1981,30 +1889,30 @@ type Sku struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The tag value. Tag *string `json:"tag,omitempty"` - // Timestamp - Returns the date and time the tag was added. + // Timestamp - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Returns the User Principal Name of the user who added the tag. Upn *string `json:"upn,omitempty"` } @@ -2014,11 +1922,11 @@ type TrackedResource struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -2031,43 +1939,34 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -2080,9 +1979,9 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2015-06-15/storage/models.go b/services/storage/mgmt/2015-06-15/storage/models.go index a8e670b7fea6..84d6c47ce89b 100644 --- a/services/storage/mgmt/2015-06-15/storage/models.go +++ b/services/storage/mgmt/2015-06-15/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -123,11 +124,11 @@ func PossibleUsageUnitValues() []UsageUnit { type Account struct { autorest.Response `json:"-"` *AccountProperties `json:"properties,omitempty"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -141,15 +142,6 @@ func (a Account) MarshalJSON() ([]byte, error) { if a.AccountProperties != nil { objectMap["properties"] = a.AccountProperties } - 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 } @@ -372,7 +364,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -476,11 +468,11 @@ type Endpoints struct { // Resource describes a storage resource. type Resource struct { - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -491,15 +483,6 @@ type Resource struct { // 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 } diff --git a/services/storage/mgmt/2016-01-01/storage/models.go b/services/storage/mgmt/2016-01-01/storage/models.go index 1d9e42b33935..f8dbdc078bc2 100644 --- a/services/storage/mgmt/2016-01-01/storage/models.go +++ b/services/storage/mgmt/2016-01-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -182,16 +183,16 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'BlobStorage' + // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'BlobStorage' Kind Kind `json:"kind,omitempty"` *AccountProperties `json:"properties,omitempty"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -202,24 +203,9 @@ type Account struct { // 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.AccountProperties != nil { objectMap["properties"] = a.AccountProperties } - 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 } @@ -418,53 +404,53 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the list of storage accounts and their properties. Value *[]Account `json:"value,omitempty"` } // AccountProperties ... 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' AccessTier AccessTier `json:"accessTier,omitempty"` } @@ -503,7 +489,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -592,11 +578,11 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -620,7 +606,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -632,23 +618,23 @@ type EncryptionServices struct { // 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 - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; Gets the file endpoint. File *string `json:"file,omitempty"` } // Resource ... type Resource struct { - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -659,15 +645,6 @@ type Resource struct { // 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 } @@ -681,19 +658,19 @@ func (r Resource) MarshalJSON() ([]byte, error) { 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 - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' Tier SkuTier `json:"tier,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -706,8 +683,8 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2016-05-01/storage/models.go b/services/storage/mgmt/2016-05-01/storage/models.go index b804828188a2..6c412894f343 100644 --- a/services/storage/mgmt/2016-05-01/storage/models.go +++ b/services/storage/mgmt/2016-05-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -306,16 +307,16 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'BlobStorage' + // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'BlobStorage' Kind Kind `json:"kind,omitempty"` *AccountProperties `json:"properties,omitempty"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -326,24 +327,9 @@ type Account struct { // 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.AccountProperties != nil { objectMap["properties"] = a.AccountProperties } - 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 } @@ -543,53 +529,53 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the list of storage accounts and their properties. Value *[]Account `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' AccessTier AccessTier `json:"accessTier,omitempty"` } @@ -648,7 +634,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -737,11 +723,11 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -765,7 +751,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -777,37 +763,37 @@ type EncryptionServices struct { // 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 - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; Gets the file endpoint. File *string `json:"file,omitempty"` } // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } // Resource describes a storage resource. type Resource struct { - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -818,15 +804,6 @@ type Resource struct { // 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 } @@ -880,19 +857,19 @@ type ServiceSasParameters struct { 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 - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' Tier SkuTier `json:"tier,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -905,8 +882,8 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2016-12-01/storage/models.go b/services/storage/mgmt/2016-12-01/storage/models.go index d9c50981b628..5cc3605e7584 100644 --- a/services/storage/mgmt/2016-12-01/storage/models.go +++ b/services/storage/mgmt/2016-12-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -306,16 +307,16 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'BlobStorage' + // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'BlobStorage' Kind Kind `json:"kind,omitempty"` *AccountProperties `json:"properties,omitempty"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -326,24 +327,9 @@ type Account struct { // 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.AccountProperties != nil { objectMap["properties"] = a.AccountProperties } - 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 } @@ -543,53 +529,53 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the list of storage accounts and their properties. Value *[]Account `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -654,7 +640,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -743,11 +729,11 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -771,7 +757,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -781,45 +767,45 @@ type EncryptionServices struct { 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 - READ-ONLY; The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. + // Queue - READ-ONLY; 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 - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; Gets the file endpoint. File *string `json:"file,omitempty"` } // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } // Resource describes a storage resource. type Resource struct { - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -830,15 +816,6 @@ type Resource struct { // 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 } @@ -892,19 +869,19 @@ type ServiceSasParameters struct { 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 - READ-ONLY; Gets the sku tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' Tier SkuTier `json:"tier,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -917,8 +894,8 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2017-06-01/storage/models.go b/services/storage/mgmt/2017-06-01/storage/models.go index b90ea2b033e6..ee39f2a83287 100644 --- a/services/storage/mgmt/2017-06-01/storage/models.go +++ b/services/storage/mgmt/2017-06-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -377,19 +378,19 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'BlobStorage' + // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', '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"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -400,27 +401,12 @@ type Account struct { // 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.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 } @@ -646,57 +632,57 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the list of storage accounts and their properties. Value *[]Account `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` } @@ -764,7 +750,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -868,11 +854,11 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -906,7 +892,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -916,29 +902,29 @@ type EncryptionServices struct { 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 - READ-ONLY; The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. + // Queue - READ-ONLY; 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 - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; 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 - READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty"` - // TenantID - The tenant ID of resource. + // TenantID - READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty"` // Type - The identity type. Type *string `json:"type,omitempty"` @@ -965,14 +951,14 @@ type KeyVaultProperties struct { // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } @@ -1117,11 +1103,11 @@ type OperationProperties struct { // Resource describes a storage resource. type Resource struct { - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -1132,15 +1118,6 @@ type Resource struct { // 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 } @@ -1152,9 +1129,9 @@ func (r Resource) MarshalJSON() ([]byte, error) { // 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1210,15 +1187,15 @@ type ServiceSpecification struct { 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 - READ-ONLY; 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 - READ-ONLY; 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', 'BlobStorage' + // Kind - READ-ONLY; Indicates the type of storage account. Possible values include: 'Storage', '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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1227,28 +1204,28 @@ type Sku struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Get the list result of storage SKUs and their properties. Value *[]Sku `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -1261,9 +1238,9 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2017-10-01/storage/models.go b/services/storage/mgmt/2017-10-01/storage/models.go index 88435befb8d3..5efc2901a79a 100644 --- a/services/storage/mgmt/2017-10-01/storage/models.go +++ b/services/storage/mgmt/2017-10-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -379,19 +380,19 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage' + // Kind - READ-ONLY; 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"` - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -402,27 +403,12 @@ type Account struct { // 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.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 } @@ -648,57 +634,57 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the list of storage accounts and their properties. Value *[]Account `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` } @@ -766,7 +752,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -884,11 +870,11 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -922,7 +908,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -932,29 +918,29 @@ type EncryptionServices struct { 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 - READ-ONLY; The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. + // Queue - READ-ONLY; 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 - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; 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 - READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty"` - // TenantID - The tenant ID of resource. + // TenantID - READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty"` // Type - The identity type. Type *string `json:"type,omitempty"` @@ -981,14 +967,14 @@ type KeyVaultProperties struct { // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } @@ -1133,11 +1119,11 @@ type OperationProperties struct { // Resource describes a storage resource. type Resource struct { - // ID - Resource Id + // ID - READ-ONLY; Resource Id ID *string `json:"id,omitempty"` - // Name - Resource name + // Name - READ-ONLY; Resource name Name *string `json:"name,omitempty"` - // Type - Resource type + // Type - READ-ONLY; Resource type Type *string `json:"type,omitempty"` // Location - Resource location Location *string `json:"location,omitempty"` @@ -1148,15 +1134,6 @@ type Resource struct { // 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 } @@ -1168,9 +1145,9 @@ func (r Resource) MarshalJSON() ([]byte, error) { // 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1226,15 +1203,15 @@ type ServiceSpecification struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1243,28 +1220,28 @@ type Sku struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Get the list result of storage SKUs and their properties. Value *[]Sku `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -1277,9 +1254,9 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2018-02-01/storage/blobcontainers.go b/services/storage/mgmt/2018-02-01/storage/blobcontainers.go index b581e7f159c4..26a613558b4f 100644 --- a/services/storage/mgmt/2018-02-01/storage/blobcontainers.go +++ b/services/storage/mgmt/2018-02-01/storage/blobcontainers.go @@ -116,6 +116,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), @@ -1281,6 +1282,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), diff --git a/services/storage/mgmt/2018-02-01/storage/models.go b/services/storage/mgmt/2018-02-01/storage/models.go index 51e7f8291874..16fb62938e38 100644 --- a/services/storage/mgmt/2018-02-01/storage/models.go +++ b/services/storage/mgmt/2018-02-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -500,9 +501,9 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage' + // Kind - READ-ONLY; 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"` @@ -512,23 +513,17 @@ type Account struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 } @@ -541,15 +536,6 @@ func (a Account) MarshalJSON() ([]byte, error) { 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) } @@ -769,57 +755,57 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the list of storage accounts and their properties. Value *[]Account `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` @@ -891,7 +877,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -1008,13 +994,13 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag. type AzureEntityResource struct { - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1023,13 +1009,13 @@ type BlobContainer struct { autorest.Response `json:"-"` // ContainerProperties - Properties of the blob container. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1039,18 +1025,6 @@ func (bc BlobContainer) MarshalJSON() ([]byte, error) { 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) } @@ -1117,11 +1091,11 @@ func (bc *BlobContainer) UnmarshalJSON(body []byte) error { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -1129,23 +1103,23 @@ type CheckNameAvailabilityResult struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The ImmutabilityPolicy property of the container. ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` - // LegalHold - The LegalHold property of the container. + // LegalHold - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` } @@ -1155,33 +1129,9 @@ func (cp ContainerProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1215,7 +1165,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -1225,34 +1175,34 @@ type EncryptionServices struct { 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 - READ-ONLY; The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. + // Queue - READ-ONLY; 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, table, web or dfs // object. type Endpoints struct { - // Blob - Gets the blob endpoint. + // Blob - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; Gets the file endpoint. File *string `json:"file,omitempty"` - // Web - Gets the web endpoint. + // Web - READ-ONLY; Gets the web endpoint. Web *string `json:"web,omitempty"` - // Dfs - Gets the dfs endpoint. + // Dfs - READ-ONLY; Gets the dfs endpoint. Dfs *string `json:"dfs,omitempty"` } // Identity identity for the resource. type Identity struct { - // PrincipalID - The principal ID of resource identity. + // PrincipalID - READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty"` - // TenantID - The tenant ID of resource. + // TenantID - READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty"` // Type - The identity type. Type *string `json:"type,omitempty"` @@ -1264,13 +1214,13 @@ type ImmutabilityPolicy struct { autorest.Response `json:"-"` // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1280,18 +1230,6 @@ func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) { 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) } @@ -1359,9 +1297,9 @@ func (IP *ImmutabilityPolicy) UnmarshalJSON(body []byte) error { type ImmutabilityPolicyProperties struct { // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - ImmutabilityPolicy Etag. + // Etag - READ-ONLY; ImmutabilityPolicy Etag. Etag *string `json:"etag,omitempty"` - // UpdateHistory - The ImmutabilityPolicy update history of the blob container. + // UpdateHistory - READ-ONLY; The ImmutabilityPolicy update history of the blob container. UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"` } @@ -1371,12 +1309,6 @@ func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1426,7 +1358,7 @@ func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error { 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 - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' State ImmutabilityPolicyState `json:"state,omitempty"` } @@ -1474,7 +1406,7 @@ type LeaseContainerResponse struct { // 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 - READ-ONLY; 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"` @@ -1482,7 +1414,7 @@ type LegalHold struct { // 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 - READ-ONLY; 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"` @@ -1491,7 +1423,7 @@ type LegalHoldProperties struct { // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } @@ -1499,13 +1431,13 @@ type ListAccountSasResponse struct { type ListContainerItem struct { // ContainerProperties - The blob container properties be listed out. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1515,18 +1447,6 @@ func (lci ListContainerItem) MarshalJSON() ([]byte, error) { 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) } @@ -1600,7 +1520,7 @@ type ListContainerItems struct { // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } @@ -1748,29 +1668,29 @@ type OperationProperties struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1826,15 +1746,15 @@ type ServiceSpecification struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -1843,30 +1763,30 @@ type Sku struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The tag value. Tag *string `json:"tag,omitempty"` - // Timestamp - Returns the date and time the tag was added. + // Timestamp - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Returns the User Principal Name of the user who added the tag. Upn *string `json:"upn,omitempty"` } @@ -1876,11 +1796,11 @@ type TrackedResource struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1893,43 +1813,34 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -1942,9 +1853,9 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2018-07-01/storage/blobcontainers.go b/services/storage/mgmt/2018-07-01/storage/blobcontainers.go index 71bbca7eac04..bca851abc2b2 100644 --- a/services/storage/mgmt/2018-07-01/storage/blobcontainers.go +++ b/services/storage/mgmt/2018-07-01/storage/blobcontainers.go @@ -116,6 +116,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), @@ -1281,6 +1282,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), diff --git a/services/storage/mgmt/2018-07-01/storage/models.go b/services/storage/mgmt/2018-07-01/storage/models.go index 492c2b6d9bbd..fa9a8acbc7a4 100644 --- a/services/storage/mgmt/2018-07-01/storage/models.go +++ b/services/storage/mgmt/2018-07-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -536,9 +537,9 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' Kind Kind `json:"kind,omitempty"` // Identity - The identity of the resource. Identity *Identity `json:"identity,omitempty"` @@ -548,23 +549,17 @@ type Account struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 } @@ -577,15 +572,6 @@ func (a Account) MarshalJSON() ([]byte, error) { 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) } @@ -805,56 +791,44 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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) } @@ -911,7 +885,7 @@ func (amp *AccountManagementPolicies) UnmarshalJSON(body []byte) error { // AccountManagementPoliciesRulesProperty the Storage Account Data Policies properties. type AccountManagementPoliciesRulesProperty struct { - // LastModifiedTime - Returns the date and time the ManagementPolicies was last modified. + // LastModifiedTime - READ-ONLY; 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"` @@ -919,41 +893,41 @@ type AccountManagementPoliciesRulesProperty struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' AccessTier AccessTier `json:"accessTier,omitempty"` // EnableAzureFilesAadIntegration - Enables Azure Files AAD Integration for SMB if sets to true. EnableAzureFilesAadIntegration *bool `json:"azureFilesAadIntegration,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` - // NetworkRuleSet - Network rule set + // NetworkRuleSet - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` - // GeoReplicationStats - Geo Replication Stats + // GeoReplicationStats - READ-ONLY; Geo Replication Stats GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty"` - // FailoverInProgress - If the failover is in progress, the value will be true, otherwise, it will be null. + // FailoverInProgress - READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null. FailoverInProgress *bool `json:"failoverInProgress,omitempty"` } @@ -1027,7 +1001,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -1056,7 +1030,7 @@ type AccountsFailoverFuture struct { // If the operation has not completed it will return an error. func (future *AccountsFailoverFuture) Result(client AccountsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsFailoverFuture", "Result", future.Response(), "Polling failure") return @@ -1167,13 +1141,13 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag. type AzureEntityResource struct { - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1182,13 +1156,13 @@ type BlobContainer struct { autorest.Response `json:"-"` // ContainerProperties - Properties of the blob container. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1198,18 +1172,6 @@ func (bc BlobContainer) MarshalJSON() ([]byte, error) { 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) } @@ -1278,11 +1240,11 @@ type BlobServiceProperties struct { autorest.Response `json:"-"` // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. *BlobServicePropertiesProperties `json:"properties,omitempty"` - // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1292,15 +1254,6 @@ func (bsp BlobServiceProperties) MarshalJSON() ([]byte, error) { if bsp.BlobServicePropertiesProperties != nil { objectMap["properties"] = bsp.BlobServicePropertiesProperties } - if bsp.ID != nil { - objectMap["id"] = bsp.ID - } - if bsp.Name != nil { - objectMap["name"] = bsp.Name - } - if bsp.Type != nil { - objectMap["type"] = bsp.Type - } return json.Marshal(objectMap) } @@ -1368,11 +1321,11 @@ type BlobServicePropertiesProperties struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -1380,23 +1333,23 @@ type CheckNameAvailabilityResult struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The ImmutabilityPolicy property of the container. ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` - // LegalHold - The LegalHold property of the container. + // LegalHold - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` } @@ -1406,33 +1359,9 @@ func (cp ContainerProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1494,7 +1423,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -1504,45 +1433,45 @@ type EncryptionServices struct { 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 - READ-ONLY; The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. + // Queue - READ-ONLY; 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, table, web or dfs // object. type Endpoints struct { - // Blob - Gets the blob endpoint. + // Blob - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; Gets the file endpoint. File *string `json:"file,omitempty"` - // Web - Gets the web endpoint. + // Web - READ-ONLY; Gets the web endpoint. Web *string `json:"web,omitempty"` - // Dfs - Gets the dfs endpoint. + // Dfs - READ-ONLY; Gets the dfs endpoint. Dfs *string `json:"dfs,omitempty"` } // GeoReplicationStats statistics related to replication for storage account's Blob, Table, Queue and File // services. It is only available when geo-redundant replication is enabled for the storage account. type GeoReplicationStats struct { - // Status - The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable' + // Status - READ-ONLY; The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable' Status GeoReplicationStatus `json:"status,omitempty"` - // LastSyncTime - All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. + // LastSyncTime - READ-ONLY; All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. LastSyncTime *date.Time `json:"lastSyncTime,omitempty"` - // CanFailover - A boolean flag which indicates whether or not account failover is supported for the account. + // CanFailover - READ-ONLY; A boolean flag which indicates whether or not account failover is supported for the account. CanFailover *bool `json:"canFailover,omitempty"` } // Identity identity for the resource. type Identity struct { - // PrincipalID - The principal ID of resource identity. + // PrincipalID - READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty"` - // TenantID - The tenant ID of resource. + // TenantID - READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty"` // Type - The identity type. Type *string `json:"type,omitempty"` @@ -1554,13 +1483,13 @@ type ImmutabilityPolicy struct { autorest.Response `json:"-"` // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1570,18 +1499,6 @@ func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) { 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) } @@ -1649,9 +1566,9 @@ func (IP *ImmutabilityPolicy) UnmarshalJSON(body []byte) error { type ImmutabilityPolicyProperties struct { // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - ImmutabilityPolicy Etag. + // Etag - READ-ONLY; ImmutabilityPolicy Etag. Etag *string `json:"etag,omitempty"` - // UpdateHistory - The ImmutabilityPolicy update history of the blob container. + // UpdateHistory - READ-ONLY; The ImmutabilityPolicy update history of the blob container. UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"` } @@ -1661,12 +1578,6 @@ func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1716,7 +1627,7 @@ func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error { 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 - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' State ImmutabilityPolicyState `json:"state,omitempty"` } @@ -1764,7 +1675,7 @@ type LeaseContainerResponse struct { // 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 - READ-ONLY; 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"` @@ -1772,7 +1683,7 @@ type LegalHold struct { // 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 - READ-ONLY; 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"` @@ -1781,7 +1692,7 @@ type LegalHoldProperties struct { // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } @@ -1789,13 +1700,13 @@ type ListAccountSasResponse struct { type ListContainerItem struct { // ContainerProperties - The blob container properties be listed out. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1805,18 +1716,6 @@ func (lci ListContainerItem) MarshalJSON() ([]byte, error) { 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) } @@ -1890,7 +1789,7 @@ type ListContainerItems struct { // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } @@ -2086,29 +1985,29 @@ type OperationProperties struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -2164,15 +2063,15 @@ type ServiceSpecification struct { 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', 'PremiumZRS' Name SkuName `json:"name,omitempty"` - // Tier - Gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' + // Tier - READ-ONLY; 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 - READ-ONLY; 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', 'FileStorage', 'BlockBlobStorage' + // Kind - READ-ONLY; Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -2181,30 +2080,30 @@ type Sku struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The tag value. Tag *string `json:"tag,omitempty"` - // Timestamp - Returns the date and time the tag was added. + // Timestamp - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Returns the User Principal Name of the user who added the tag. Upn *string `json:"upn,omitempty"` } @@ -2214,11 +2113,11 @@ type TrackedResource struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -2231,43 +2130,34 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -2280,9 +2170,9 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` } diff --git a/services/storage/mgmt/2018-11-01/storage/blobcontainers.go b/services/storage/mgmt/2018-11-01/storage/blobcontainers.go index dc5a53807fef..b9ba576d20a5 100644 --- a/services/storage/mgmt/2018-11-01/storage/blobcontainers.go +++ b/services/storage/mgmt/2018-11-01/storage/blobcontainers.go @@ -116,6 +116,7 @@ func (client BlobContainersClient) ClearLegalHoldPreparer(ctx context.Context, r "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), @@ -1281,6 +1282,7 @@ func (client BlobContainersClient) SetLegalHoldPreparer(ctx context.Context, res "api-version": APIVersion, } + legalHold.HasLegalHold = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPost(), diff --git a/services/storage/mgmt/2018-11-01/storage/managementpolicies.go b/services/storage/mgmt/2018-11-01/storage/managementpolicies.go index add4f482b156..5193cd686ee8 100644 --- a/services/storage/mgmt/2018-11-01/storage/managementpolicies.go +++ b/services/storage/mgmt/2018-11-01/storage/managementpolicies.go @@ -112,6 +112,7 @@ func (client ManagementPoliciesClient) CreateOrUpdatePreparer(ctx context.Contex "api-version": APIVersion, } + properties.ManagementPolicyProperties = nil preparer := autorest.CreatePreparer( autorest.AsContentType("application/json; charset=utf-8"), autorest.AsPut(), diff --git a/services/storage/mgmt/2018-11-01/storage/models.go b/services/storage/mgmt/2018-11-01/storage/models.go index 5ced81efc791..3d12689c7c0c 100644 --- a/services/storage/mgmt/2018-11-01/storage/models.go +++ b/services/storage/mgmt/2018-11-01/storage/models.go @@ -18,6 +18,7 @@ package storage // Changes may cause incorrect behavior and will be lost if the code is regenerated. import ( + "context" "encoding/json" "github.com/Azure/go-autorest/autorest" "github.com/Azure/go-autorest/autorest/azure" @@ -536,9 +537,9 @@ func PossibleUsageUnitValues() []UsageUnit { // Account the storage account. type Account struct { autorest.Response `json:"-"` - // Sku - Gets the SKU. + // Sku - READ-ONLY; Gets the SKU. Sku *Sku `json:"sku,omitempty"` - // Kind - Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' + // Kind - READ-ONLY; Gets the Kind. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' Kind Kind `json:"kind,omitempty"` // Identity - The identity of the resource. Identity *Identity `json:"identity,omitempty"` @@ -548,23 +549,17 @@ type Account struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 } @@ -577,15 +572,6 @@ func (a Account) MarshalJSON() ([]byte, error) { 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) } @@ -805,65 +791,65 @@ func (acp *AccountCreateParameters) UnmarshalJSON(body []byte) error { // AccountKey an access key for the storage account. type AccountKey struct { - // KeyName - Name of the key. + // KeyName - READ-ONLY; Name of the key. KeyName *string `json:"keyName,omitempty"` - // Value - Base 64-encoded value of the key. + // Value - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the list of storage accounts and their properties. Value *[]Account `json:"value,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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Required for storage accounts where kind = BlobStorage. The access tier used for billing. Possible values include: 'Hot', 'Cool' AccessTier AccessTier `json:"accessTier,omitempty"` // EnableAzureFilesAadIntegration - Enables Azure Files AAD Integration for SMB if sets to true. EnableAzureFilesAadIntegration *bool `json:"azureFilesAadIntegration,omitempty"` // EnableHTTPSTrafficOnly - Allows https traffic only to storage service if sets to true. EnableHTTPSTrafficOnly *bool `json:"supportsHttpsTrafficOnly,omitempty"` - // NetworkRuleSet - Network rule set + // NetworkRuleSet - READ-ONLY; Network rule set NetworkRuleSet *NetworkRuleSet `json:"networkAcls,omitempty"` // IsHnsEnabled - Account HierarchicalNamespace enabled if sets to true. IsHnsEnabled *bool `json:"isHnsEnabled,omitempty"` - // GeoReplicationStats - Geo Replication Stats + // GeoReplicationStats - READ-ONLY; Geo Replication Stats GeoReplicationStats *GeoReplicationStats `json:"geoReplicationStats,omitempty"` - // FailoverInProgress - If the failover is in progress, the value will be true, otherwise, it will be null. + // FailoverInProgress - READ-ONLY; If the failover is in progress, the value will be true, otherwise, it will be null. FailoverInProgress *bool `json:"failoverInProgress,omitempty"` } @@ -937,7 +923,7 @@ type AccountsCreateFuture struct { // 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) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsCreateFuture", "Result", future.Response(), "Polling failure") return @@ -966,7 +952,7 @@ type AccountsFailoverFuture struct { // If the operation has not completed it will return an error. func (future *AccountsFailoverFuture) Result(client AccountsClient) (ar autorest.Response, err error) { var done bool - done, err = future.Done(client) + done, err = future.DoneWithContext(context.Background(), client) if err != nil { err = autorest.NewErrorWithError(err, "storage.AccountsFailoverFuture", "Result", future.Response(), "Polling failure") return @@ -1077,13 +1063,13 @@ func (aup *AccountUpdateParameters) UnmarshalJSON(body []byte) error { // AzureEntityResource the resource model definition for a Azure Resource Manager resource with an etag. type AzureEntityResource struct { - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1092,13 +1078,13 @@ type BlobContainer struct { autorest.Response `json:"-"` // ContainerProperties - Properties of the blob container. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1108,18 +1094,6 @@ func (bc BlobContainer) MarshalJSON() ([]byte, error) { 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) } @@ -1188,11 +1162,11 @@ type BlobServiceProperties struct { autorest.Response `json:"-"` // BlobServicePropertiesProperties - The properties of a storage account’s Blob service. *BlobServicePropertiesProperties `json:"properties,omitempty"` - // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1202,15 +1176,6 @@ func (bsp BlobServiceProperties) MarshalJSON() ([]byte, error) { if bsp.BlobServicePropertiesProperties != nil { objectMap["properties"] = bsp.BlobServicePropertiesProperties } - if bsp.ID != nil { - objectMap["id"] = bsp.ID - } - if bsp.Name != nil { - objectMap["name"] = bsp.Name - } - if bsp.Type != nil { - objectMap["type"] = bsp.Type - } return json.Marshal(objectMap) } @@ -1278,11 +1243,11 @@ type BlobServicePropertiesProperties struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets an error message explaining the Reason value in more detail. Message *string `json:"message,omitempty"` } @@ -1290,23 +1255,23 @@ type CheckNameAvailabilityResult struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The ImmutabilityPolicy property of the container. ImmutabilityPolicy *ImmutabilityPolicyProperties `json:"immutabilityPolicy,omitempty"` - // LegalHold - The LegalHold property of the container. + // LegalHold - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` } @@ -1316,33 +1281,9 @@ func (cp ContainerProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1416,7 +1357,7 @@ type Encryption struct { 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 - READ-ONLY; 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"` } @@ -1426,45 +1367,45 @@ type EncryptionServices struct { 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 - READ-ONLY; The encryption function of the table storage service. Table *EncryptionService `json:"table,omitempty"` - // Queue - The encryption function of the queue storage service. + // Queue - READ-ONLY; 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, table, web or dfs // object. type Endpoints struct { - // Blob - Gets the blob endpoint. + // Blob - READ-ONLY; Gets the blob endpoint. Blob *string `json:"blob,omitempty"` - // Queue - Gets the queue endpoint. + // Queue - READ-ONLY; Gets the queue endpoint. Queue *string `json:"queue,omitempty"` - // Table - Gets the table endpoint. + // Table - READ-ONLY; Gets the table endpoint. Table *string `json:"table,omitempty"` - // File - Gets the file endpoint. + // File - READ-ONLY; Gets the file endpoint. File *string `json:"file,omitempty"` - // Web - Gets the web endpoint. + // Web - READ-ONLY; Gets the web endpoint. Web *string `json:"web,omitempty"` - // Dfs - Gets the dfs endpoint. + // Dfs - READ-ONLY; Gets the dfs endpoint. Dfs *string `json:"dfs,omitempty"` } // GeoReplicationStats statistics related to replication for storage account's Blob, Table, Queue and File // services. It is only available when geo-redundant replication is enabled for the storage account. type GeoReplicationStats struct { - // Status - The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable' + // Status - READ-ONLY; The status of the secondary location. Possible values are: - Live: Indicates that the secondary location is active and operational. - Bootstrap: Indicates initial synchronization from the primary location to the secondary location is in progress.This typically occurs when replication is first enabled. - Unavailable: Indicates that the secondary location is temporarily unavailable. Possible values include: 'GeoReplicationStatusLive', 'GeoReplicationStatusBootstrap', 'GeoReplicationStatusUnavailable' Status GeoReplicationStatus `json:"status,omitempty"` - // LastSyncTime - All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. + // LastSyncTime - READ-ONLY; All primary writes preceding this UTC date/time value are guaranteed to be available for read operations. Primary writes following this point in time may or may not be available for reads. Element may be default value if value of LastSyncTime is not available, this can happen if secondary is offline or we are in bootstrap. LastSyncTime *date.Time `json:"lastSyncTime,omitempty"` - // CanFailover - A boolean flag which indicates whether or not account failover is supported for the account. + // CanFailover - READ-ONLY; A boolean flag which indicates whether or not account failover is supported for the account. CanFailover *bool `json:"canFailover,omitempty"` } // Identity identity for the resource. type Identity struct { - // PrincipalID - The principal ID of resource identity. + // PrincipalID - READ-ONLY; The principal ID of resource identity. PrincipalID *string `json:"principalId,omitempty"` - // TenantID - The tenant ID of resource. + // TenantID - READ-ONLY; The tenant ID of resource. TenantID *string `json:"tenantId,omitempty"` // Type - The identity type. Type *string `json:"type,omitempty"` @@ -1476,13 +1417,13 @@ type ImmutabilityPolicy struct { autorest.Response `json:"-"` // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1492,18 +1433,6 @@ func (IP ImmutabilityPolicy) MarshalJSON() ([]byte, error) { 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) } @@ -1571,9 +1500,9 @@ func (IP *ImmutabilityPolicy) UnmarshalJSON(body []byte) error { type ImmutabilityPolicyProperties struct { // ImmutabilityPolicyProperty - The properties of an ImmutabilityPolicy of a blob container. *ImmutabilityPolicyProperty `json:"properties,omitempty"` - // Etag - ImmutabilityPolicy Etag. + // Etag - READ-ONLY; ImmutabilityPolicy Etag. Etag *string `json:"etag,omitempty"` - // UpdateHistory - The ImmutabilityPolicy update history of the blob container. + // UpdateHistory - READ-ONLY; The ImmutabilityPolicy update history of the blob container. UpdateHistory *[]UpdateHistoryProperty `json:"updateHistory,omitempty"` } @@ -1583,12 +1512,6 @@ func (ipp ImmutabilityPolicyProperties) MarshalJSON() ([]byte, error) { 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) } @@ -1638,7 +1561,7 @@ func (ipp *ImmutabilityPolicyProperties) UnmarshalJSON(body []byte) error { 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 - READ-ONLY; The ImmutabilityPolicy state of a blob container, possible values include: Locked and Unlocked. Possible values include: 'Locked', 'Unlocked' State ImmutabilityPolicyState `json:"state,omitempty"` } @@ -1686,7 +1609,7 @@ type LeaseContainerResponse struct { // 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 - READ-ONLY; 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"` @@ -1694,7 +1617,7 @@ type LegalHold struct { // 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 - READ-ONLY; 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"` @@ -1703,7 +1626,7 @@ type LegalHoldProperties struct { // ListAccountSasResponse the List SAS credentials operation response. type ListAccountSasResponse struct { autorest.Response `json:"-"` - // AccountSasToken - List SAS credentials of storage account. + // AccountSasToken - READ-ONLY; List SAS credentials of storage account. AccountSasToken *string `json:"accountSasToken,omitempty"` } @@ -1711,13 +1634,13 @@ type ListAccountSasResponse struct { type ListContainerItem struct { // ContainerProperties - The blob container properties be listed out. *ContainerProperties `json:"properties,omitempty"` - // Etag - Resource Etag. + // Etag - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -1727,18 +1650,6 @@ func (lci ListContainerItem) MarshalJSON() ([]byte, error) { 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) } @@ -1812,38 +1723,26 @@ type ListContainerItems struct { // ListServiceSasResponse the List service SAS credentials operation response. type ListServiceSasResponse struct { autorest.Response `json:"-"` - // ServiceSasToken - List service SAS credentials of specific resource. + // ServiceSasToken - READ-ONLY; List service SAS credentials of specific resource. ServiceSasToken *string `json:"serviceSasToken,omitempty"` } // ManagementPolicy the Get Storage Account ManagementPolicies operation response. type ManagementPolicy struct { autorest.Response `json:"-"` - // ManagementPolicyProperties - Returns the Storage Account Data Policies Rules. + // ManagementPolicyProperties - READ-ONLY; Returns the Storage Account Data Policies Rules. *ManagementPolicyProperties `json:"properties,omitempty"` - // ID - Fully qualified resource Id for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + // ID - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } // MarshalJSON is the custom marshaler for ManagementPolicy. func (mp ManagementPolicy) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if mp.ManagementPolicyProperties != nil { - objectMap["properties"] = mp.ManagementPolicyProperties - } - if mp.ID != nil { - objectMap["id"] = mp.ID - } - if mp.Name != nil { - objectMap["name"] = mp.Name - } - if mp.Type != nil { - objectMap["type"] = mp.Type - } return json.Marshal(objectMap) } @@ -1936,7 +1835,7 @@ type ManagementPolicyFilter struct { // ManagementPolicyProperties the Storage Account ManagementPolicy properties. type ManagementPolicyProperties struct { - // LastModifiedTime - Returns the date and time the ManagementPolicies was last modified. + // LastModifiedTime - READ-ONLY; Returns the date and time the ManagementPolicies was last modified. LastModifiedTime *date.Time `json:"lastModifiedTime,omitempty"` // Policy - The Storage Account ManagementPolicy, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts. Policy *ManagementPolicySchema `json:"policy,omitempty"` @@ -2111,29 +2010,29 @@ type OperationProperties struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -2189,15 +2088,15 @@ type ServiceSpecification struct { 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', 'PremiumZRS' Name SkuName `json:"name,omitempty"` - // Tier - Gets the SKU tier. This is based on the SKU name. Possible values include: 'Standard', 'Premium' + // Tier - READ-ONLY; 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 - READ-ONLY; 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', 'FileStorage', 'BlockBlobStorage' + // Kind - READ-ONLY; Indicates the type of storage account. Possible values include: 'Storage', 'StorageV2', 'BlobStorage', 'FileStorage', 'BlockBlobStorage' 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 - READ-ONLY; 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 - READ-ONLY; 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"` @@ -2206,30 +2105,30 @@ type Sku struct { // 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The tag value. Tag *string `json:"tag,omitempty"` - // Timestamp - Returns the date and time the tag was added. + // Timestamp - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Returns the User Principal Name of the user who added the tag. Upn *string `json:"upn,omitempty"` } @@ -2239,11 +2138,11 @@ type TrackedResource struct { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. Type *string `json:"type,omitempty"` } @@ -2256,43 +2155,34 @@ func (tr TrackedResource) MarshalJSON() ([]byte, error) { 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; 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 - READ-ONLY; Gets the name of the type of usage. Name *UsageName `json:"name,omitempty"` } @@ -2305,9 +2195,9 @@ type UsageListResult struct { // UsageName the usage names that can be used; currently limited to StorageAccount. type UsageName struct { - // Value - Gets a string describing the resource name. + // Value - READ-ONLY; Gets a string describing the resource name. Value *string `json:"value,omitempty"` - // LocalizedValue - Gets a localized string describing the resource name. + // LocalizedValue - READ-ONLY; Gets a localized string describing the resource name. LocalizedValue *string `json:"localizedValue,omitempty"` }