From 765655980acd06db62213ca2a3947388cf262905 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 13 Jul 2021 02:09:11 +0000 Subject: [PATCH] CodeGen from PR 14907 in Azure/azure-rest-api-specs Added default values for parameters for Import Export (#14907) * Added default values for parameters * added single multipath for go --- .../storageimportexport/CHANGELOG.md | 57 +++++++- .../2016-11-01/storageimportexport/_meta.json | 2 +- .../2016-11-01/storageimportexport/enums.go | 51 +++++++ .../2016-11-01/storageimportexport/jobs.go | 10 -- .../2016-11-01/storageimportexport/models.go | 124 ++++++++++++++++-- .../storageimportexport/CHANGELOG.md | 49 ++++++- .../2020-08-01/storageimportexport/_meta.json | 2 +- .../2020-08-01/storageimportexport/enums.go | 49 ++++--- .../2020-08-01/storageimportexport/jobs.go | 8 -- .../2020-08-01/storageimportexport/models.go | 25 +++- 10 files changed, 327 insertions(+), 50 deletions(-) diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/CHANGELOG.md b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/CHANGELOG.md index 52911e4cc5e4..70d299ab6b78 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/CHANGELOG.md +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/CHANGELOG.md @@ -1,2 +1,57 @@ -# Change History +# Unreleased +## Breaking Changes + +### Struct Changes + +#### Removed Struct Fields + +1. Export.BlobListblobPath + +### Signature Changes + +#### Struct Fields + +1. DriveStatus.PercentComplete changed type from *int32 to *int64 +1. JobDetails.DeliveryPackage changed type from *PackageInfomation to *DeliveryPackageInformation +1. UpdateJobParametersProperties.DeliveryPackage changed type from *PackageInfomation to *DeliveryPackageInformation + +## Additive Changes + +### New Constants + +1. CreatedByType.Application +1. CreatedByType.Key +1. CreatedByType.ManagedIdentity +1. CreatedByType.User +1. EncryptionKekType.CustomerManaged +1. EncryptionKekType.MicrosoftManaged +1. IdentityType.None +1. IdentityType.SystemAssigned +1. IdentityType.UserAssigned + +### New Funcs + +1. IdentityDetails.MarshalJSON() ([]byte, error) +1. PossibleCreatedByTypeValues() []CreatedByType +1. PossibleEncryptionKekTypeValues() []EncryptionKekType +1. PossibleIdentityTypeValues() []IdentityType +1. ShippingInformation.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### New Structs + +1. DeliveryPackageInformation +1. EncryptionKeyDetails +1. IdentityDetails +1. SystemData + +#### New Struct Fields + +1. Export.BlobListBlobPath +1. JobDetails.EncryptionKey +1. JobResponse.Identity +1. JobResponse.SystemData +1. LocationProperties.AdditionalShippingInformation +1. ShippingInformation.AdditionalInformation diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/_meta.json b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/_meta.json index 32155b93e9b8..553e262dc4f8 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/_meta.json +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "6e9525eb260470229ef8c5bf771b1e9ad3fd9202", "readme": "/_/azure-rest-api-specs/specification/storageimportexport/resource-manager/readme.md", "tag": "package-2016-11", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/enums.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/enums.go index 84a8b806e841..0231bdfd1356 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/enums.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/enums.go @@ -6,6 +6,25 @@ package storageimportexport // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// CreatedByType enumerates the values for created by type. +type CreatedByType string + +const ( + // Application ... + Application CreatedByType = "Application" + // Key ... + Key CreatedByType = "Key" + // ManagedIdentity ... + ManagedIdentity CreatedByType = "ManagedIdentity" + // User ... + User CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{Application, Key, ManagedIdentity, User} +} + // DriveState enumerates the values for drive state. type DriveState string @@ -30,3 +49,35 @@ const ( func PossibleDriveStateValues() []DriveState { return []DriveState{Completed, CompletedMoreInfo, NeverReceived, Received, ShippedBack, Specified, Transferring} } + +// EncryptionKekType enumerates the values for encryption kek type. +type EncryptionKekType string + +const ( + // CustomerManaged ... + CustomerManaged EncryptionKekType = "CustomerManaged" + // MicrosoftManaged ... + MicrosoftManaged EncryptionKekType = "MicrosoftManaged" +) + +// PossibleEncryptionKekTypeValues returns an array of possible values for the EncryptionKekType const type. +func PossibleEncryptionKekTypeValues() []EncryptionKekType { + return []EncryptionKekType{CustomerManaged, MicrosoftManaged} +} + +// IdentityType enumerates the values for identity type. +type IdentityType string + +const ( + // None ... + None IdentityType = "None" + // SystemAssigned ... + SystemAssigned IdentityType = "SystemAssigned" + // UserAssigned ... + UserAssigned IdentityType = "UserAssigned" +) + +// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{None, SystemAssigned, UserAssigned} +} diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go index 83823e3c6e7e..9225e85ef808 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/jobs.go @@ -65,19 +65,9 @@ func (client JobsClient) Create(ctx context.Context, jobName string, resourceGro Chain: []validation.Constraint{{Target: "body.Properties.ReturnShipping.CarrierName", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.Properties.ReturnShipping.CarrierAccountNumber", Name: validation.Null, Rule: true, Chain: nil}, }}, - {Target: "body.Properties.ShippingInformation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "body.Properties.ShippingInformation.RecipientName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.StreetAddress1", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.City", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.StateOrProvince", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.PostalCode", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.CountryOrRegion", Name: validation.Null, Rule: true, Chain: nil}, - }}, {Target: "body.Properties.DeliveryPackage", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.Properties.DeliveryPackage.CarrierName", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.Properties.DeliveryPackage.TrackingNumber", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.DeliveryPackage.DriveCount", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.DeliveryPackage.ShipDate", Name: validation.Null, Rule: true, Chain: nil}, }}, {Target: "body.Properties.ReturnPackage", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.Properties.ReturnPackage.CarrierName", Name: validation.Null, Rule: true, Chain: nil}, diff --git a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/models.go b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/models.go index df3d4cb48255..343a2aa2ed33 100644 --- a/services/storageimportexport/mgmt/2016-11-01/storageimportexport/models.go +++ b/services/storageimportexport/mgmt/2016-11-01/storageimportexport/models.go @@ -10,6 +10,7 @@ import ( "context" "encoding/json" "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/tracing" "net/http" @@ -18,6 +19,19 @@ import ( // The package's fully qualified name. const fqdn = "github.com/Azure/azure-sdk-for-go/services/storageimportexport/mgmt/2016-11-01/storageimportexport" +// DeliveryPackageInformation contains information about the delivery package being shipped by the customer +// to the Microsoft data center. +type DeliveryPackageInformation struct { + // CarrierName - The name of the carrier that is used to ship the import or export drives. + CarrierName *string `json:"carrierName,omitempty"` + // TrackingNumber - The tracking number of the package. + TrackingNumber *string `json:"trackingNumber,omitempty"` + // DriveCount - The number of drives included in the package. + DriveCount *int64 `json:"driveCount,omitempty"` + // ShipDate - The date when the package is shipped. + ShipDate *string `json:"shipDate,omitempty"` +} + // DriveBitLockerKey bitLocker recovery key or password to the specified drive type DriveBitLockerKey struct { // BitLockerKey - BitLocker recovery key or password @@ -43,7 +57,7 @@ type DriveStatus struct { // CopyStatus - Detailed status about the data transfer process. This field is not returned in the response until the drive is in the Transferring state. CopyStatus *string `json:"copyStatus,omitempty"` // PercentComplete - Percentage completed for the drive. - PercentComplete *int32 `json:"percentComplete,omitempty"` + PercentComplete *int64 `json:"percentComplete,omitempty"` // VerboseLogURI - A URI that points to the blob containing the verbose log for the data transfer operation. VerboseLogURI *string `json:"verboseLogUri,omitempty"` // ErrorLogURI - A URI that points to the blob containing the error log for the data transfer operation. @@ -54,6 +68,16 @@ type DriveStatus struct { BytesSucceeded *int64 `json:"bytesSucceeded,omitempty"` } +// EncryptionKeyDetails specifies the encryption key properties +type EncryptionKeyDetails struct { + // KekType - The type of kek encryption key. Possible values include: 'MicrosoftManaged', 'CustomerManaged' + KekType EncryptionKekType `json:"kekType,omitempty"` + // KekURL - Specifies the url for kek encryption key. + KekURL *string `json:"kekUrl,omitempty"` + // KekVaultResourceID - Specifies the keyvault resource id for kek encryption key. + KekVaultResourceID *string `json:"kekVaultResourceID,omitempty"` +} + // ErrorResponse response when errors occurred type ErrorResponse struct { // ErrorResponseError - Describes the error information. @@ -122,8 +146,8 @@ type ErrorResponseErrorDetailsItem struct { type Export struct { // ExportBlobList - A list of the blobs to be exported. *ExportBlobList `json:"blobList,omitempty"` - // BlobListblobPath - The relative URI to the block blob that contains the list of blob paths or blob path prefixes as defined above, beginning with the container name. If the blob is in root container, the URI must begin with $root. - BlobListblobPath *string `json:"blobListblobPath,omitempty"` + // BlobListBlobPath - The relative URI to the block blob that contains the list of blob paths or blob path prefixes as defined above, beginning with the container name. If the blob is in root container, the URI must begin with $root. + BlobListBlobPath *string `json:"blobListBlobPath,omitempty"` } // MarshalJSON is the custom marshaler for Export. @@ -132,8 +156,8 @@ func (e Export) MarshalJSON() ([]byte, error) { if e.ExportBlobList != nil { objectMap["blobList"] = e.ExportBlobList } - if e.BlobListblobPath != nil { - objectMap["blobListblobPath"] = e.BlobListblobPath + if e.BlobListBlobPath != nil { + objectMap["blobListBlobPath"] = e.BlobListBlobPath } return json.Marshal(objectMap) } @@ -156,14 +180,14 @@ func (e *Export) UnmarshalJSON(body []byte) error { } e.ExportBlobList = &exportBlobList } - case "blobListblobPath": + case "blobListBlobPath": if v != nil { - var blobListblobPath string - err = json.Unmarshal(*v, &blobListblobPath) + var blobListBlobPath string + err = json.Unmarshal(*v, &blobListBlobPath) if err != nil { return err } - e.BlobListblobPath = &blobListblobPath + e.BlobListBlobPath = &blobListBlobPath } } } @@ -186,6 +210,25 @@ type GetBitLockerKeysResponse struct { Value *[]DriveBitLockerKey `json:"value,omitempty"` } +// IdentityDetails specifies the identity properties. +type IdentityDetails struct { + // Type - The type of identity. Possible values include: 'None', 'SystemAssigned', 'UserAssigned' + Type IdentityType `json:"type,omitempty"` + // PrincipalID - READ-ONLY; Specifies the principal id for the identity for the job. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; Specifies the tenant id for the identity for the job. + TenantID *string `json:"tenantId,omitempty"` +} + +// MarshalJSON is the custom marshaler for IdentityDetails. +func (ID IdentityDetails) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if ID.Type != "" { + objectMap["type"] = ID.Type + } + return json.Marshal(objectMap) +} + // JobDetails specifies the job properties type JobDetails struct { // StorageAccountID - The resource identifier of the storage account where data will be imported to or exported from. @@ -199,7 +242,7 @@ type JobDetails struct { // ShippingInformation - Contains information about the Microsoft datacenter to which the drives should be shipped. ShippingInformation *ShippingInformation `json:"shippingInformation,omitempty"` // DeliveryPackage - Contains information about the package being shipped by the customer to the Microsoft data center. - DeliveryPackage *PackageInfomation `json:"deliveryPackage,omitempty"` + DeliveryPackage *DeliveryPackageInformation `json:"deliveryPackage,omitempty"` // ReturnPackage - Contains information about the package being shipped from the Microsoft data center to the customer to return the drives. The format is the same as the deliveryPackage property above. This property is not included if the drives have not yet been returned. ReturnPackage *PackageInfomation `json:"returnPackage,omitempty"` // DiagnosticsPath - The virtual blob directory to which the copy logs and backups of drive manifest files (if enabled) will be stored. @@ -222,11 +265,15 @@ type JobDetails struct { Export *Export `json:"export,omitempty"` // ProvisioningState - Specifies the provisioning state of the job. ProvisioningState *string `json:"provisioningState,omitempty"` + // EncryptionKey - Contains information about the encryption key. + EncryptionKey *EncryptionKeyDetails `json:"encryptionKey,omitempty"` } // JobResponse contains the job information. type JobResponse struct { autorest.Response `json:"-"` + // SystemData - READ-ONLY; SystemData of ImportExport Jobs. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Specifies the resource identifier of the job. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Specifies the name of the job. @@ -239,6 +286,8 @@ type JobResponse struct { Tags interface{} `json:"tags,omitempty"` // Properties - Specifies the job properties Properties *JobDetails `json:"properties,omitempty"` + // Identity - Specifies the job identity details + Identity *IdentityDetails `json:"identity,omitempty"` } // MarshalJSON is the custom marshaler for JobResponse. @@ -253,6 +302,9 @@ func (jr JobResponse) MarshalJSON() ([]byte, error) { if jr.Properties != nil { objectMap["properties"] = jr.Properties } + if jr.Identity != nil { + objectMap["identity"] = jr.Identity + } return json.Marshal(objectMap) } @@ -522,6 +574,8 @@ type LocationProperties struct { CountryOrRegion *string `json:"countryOrRegion,omitempty"` // Phone - The phone number for the Azure data center. Phone *string `json:"phone,omitempty"` + // AdditionalShippingInformation - Additional shipping information for customer, specific to datacenter to which customer should send their disks. + AdditionalShippingInformation *string `json:"additionalShippingInformation,omitempty"` // SupportedCarriers - A list of carriers that are supported at this location. SupportedCarriers *[]string `json:"supportedCarriers,omitempty"` // AlternateLocations - A list of location IDs that should be used to ship shipping drives to for jobs created against the current location. If the current location is active, it will be part of the list. If it is temporarily closed due to maintenance, this list may contain other locations. @@ -672,6 +726,54 @@ type ShippingInformation struct { CountryOrRegion *string `json:"countryOrRegion,omitempty"` // Phone - Phone number of the recipient of the returned drives. Phone *string `json:"phone,omitempty"` + // AdditionalInformation - READ-ONLY; Additional shipping information for customer, specific to datacenter to which customer should send their disks. + AdditionalInformation *string `json:"additionalInformation,omitempty"` +} + +// MarshalJSON is the custom marshaler for ShippingInformation. +func (si ShippingInformation) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if si.RecipientName != nil { + objectMap["recipientName"] = si.RecipientName + } + if si.StreetAddress1 != nil { + objectMap["streetAddress1"] = si.StreetAddress1 + } + if si.StreetAddress2 != nil { + objectMap["streetAddress2"] = si.StreetAddress2 + } + if si.City != nil { + objectMap["city"] = si.City + } + if si.StateOrProvince != nil { + objectMap["stateOrProvince"] = si.StateOrProvince + } + if si.PostalCode != nil { + objectMap["postalCode"] = si.PostalCode + } + if si.CountryOrRegion != nil { + objectMap["countryOrRegion"] = si.CountryOrRegion + } + if si.Phone != nil { + objectMap["phone"] = si.Phone + } + return json.Marshal(objectMap) +} + +// SystemData metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // CreatedBy - The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + CreatedByType CreatedByType `json:"createdByType,omitempty"` + // CreatedAt - The timestamp of resource creation (UTC). + CreatedAt *date.Time `json:"createdAt,omitempty"` + // LastModifiedBy - The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` + // LastModifiedAt - The timestamp of resource last modification (UTC) + LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` } // UpdateJobParameters update Job parameters @@ -738,7 +840,7 @@ type UpdateJobParametersProperties struct { // ReturnShipping - Specifies the return carrier and customer's account with the carrier. ReturnShipping *ReturnShipping `json:"returnShipping,omitempty"` // DeliveryPackage - Contains information about the package being shipped by the customer to the Microsoft data center. - DeliveryPackage *PackageInfomation `json:"deliveryPackage,omitempty"` + DeliveryPackage *DeliveryPackageInformation `json:"deliveryPackage,omitempty"` // LogLevel - Indicates whether error logging or verbose logging is enabled. LogLevel *string `json:"logLevel,omitempty"` // BackupDriveManifest - Indicates whether the manifest files on the drives should be copied to block blobs. diff --git a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/CHANGELOG.md b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/CHANGELOG.md index 52911e4cc5e4..9e2bbbda57d0 100644 --- a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/CHANGELOG.md +++ b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/CHANGELOG.md @@ -1,2 +1,49 @@ -# Change History +# Unreleased +## Breaking Changes + +### Removed Funcs + +1. PossibleKekTypeValues() []KekType +1. PossibleTypeValues() []Type + +### Signature Changes + +#### Const Types + +1. CustomerManaged changed type from KekType to EncryptionKekType +1. MicrosoftManaged changed type from KekType to EncryptionKekType +1. None changed type from Type to IdentityType +1. SystemAssigned changed type from Type to IdentityType +1. UserAssigned changed type from Type to IdentityType + +#### Struct Fields + +1. EncryptionKeyDetails.KekType changed type from KekType to EncryptionKekType +1. IdentityDetails.Type changed type from Type to IdentityType + +## Additive Changes + +### New Constants + +1. CreatedByType.Application +1. CreatedByType.Key +1. CreatedByType.ManagedIdentity +1. CreatedByType.User + +### New Funcs + +1. PossibleCreatedByTypeValues() []CreatedByType +1. PossibleEncryptionKekTypeValues() []EncryptionKekType +1. PossibleIdentityTypeValues() []IdentityType + +### Struct Changes + +#### New Structs + +1. SystemData + +#### New Struct Fields + +1. JobResponse.SystemData +1. LocationProperties.AdditionalShippingInformation diff --git a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/_meta.json b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/_meta.json index a8b71ffcaa23..d0de80682d4d 100644 --- a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/_meta.json +++ b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/_meta.json @@ -1,5 +1,5 @@ { - "commit": "3c764635e7d442b3e74caf593029fcd440b3ef82", + "commit": "6e9525eb260470229ef8c5bf771b1e9ad3fd9202", "readme": "/_/azure-rest-api-specs/specification/storageimportexport/resource-manager/readme.md", "tag": "package-2020-08", "use": "@microsoft.azure/autorest.go@2.1.183", diff --git a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/enums.go b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/enums.go index 4e491adf791a..0231bdfd1356 100644 --- a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/enums.go +++ b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/enums.go @@ -6,6 +6,25 @@ package storageimportexport // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. +// CreatedByType enumerates the values for created by type. +type CreatedByType string + +const ( + // Application ... + Application CreatedByType = "Application" + // Key ... + Key CreatedByType = "Key" + // ManagedIdentity ... + ManagedIdentity CreatedByType = "ManagedIdentity" + // User ... + User CreatedByType = "User" +) + +// PossibleCreatedByTypeValues returns an array of possible values for the CreatedByType const type. +func PossibleCreatedByTypeValues() []CreatedByType { + return []CreatedByType{Application, Key, ManagedIdentity, User} +} + // DriveState enumerates the values for drive state. type DriveState string @@ -31,34 +50,34 @@ func PossibleDriveStateValues() []DriveState { return []DriveState{Completed, CompletedMoreInfo, NeverReceived, Received, ShippedBack, Specified, Transferring} } -// KekType enumerates the values for kek type. -type KekType string +// EncryptionKekType enumerates the values for encryption kek type. +type EncryptionKekType string const ( // CustomerManaged ... - CustomerManaged KekType = "CustomerManaged" + CustomerManaged EncryptionKekType = "CustomerManaged" // MicrosoftManaged ... - MicrosoftManaged KekType = "MicrosoftManaged" + MicrosoftManaged EncryptionKekType = "MicrosoftManaged" ) -// PossibleKekTypeValues returns an array of possible values for the KekType const type. -func PossibleKekTypeValues() []KekType { - return []KekType{CustomerManaged, MicrosoftManaged} +// PossibleEncryptionKekTypeValues returns an array of possible values for the EncryptionKekType const type. +func PossibleEncryptionKekTypeValues() []EncryptionKekType { + return []EncryptionKekType{CustomerManaged, MicrosoftManaged} } -// Type enumerates the values for type. -type Type string +// IdentityType enumerates the values for identity type. +type IdentityType string const ( // None ... - None Type = "None" + None IdentityType = "None" // SystemAssigned ... - SystemAssigned Type = "SystemAssigned" + SystemAssigned IdentityType = "SystemAssigned" // UserAssigned ... - UserAssigned Type = "UserAssigned" + UserAssigned IdentityType = "UserAssigned" ) -// PossibleTypeValues returns an array of possible values for the Type const type. -func PossibleTypeValues() []Type { - return []Type{None, SystemAssigned, UserAssigned} +// PossibleIdentityTypeValues returns an array of possible values for the IdentityType const type. +func PossibleIdentityTypeValues() []IdentityType { + return []IdentityType{None, SystemAssigned, UserAssigned} } diff --git a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/jobs.go b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/jobs.go index 56efd700b7ad..89fb65b3e1ec 100644 --- a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/jobs.go +++ b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/jobs.go @@ -65,14 +65,6 @@ func (client JobsClient) Create(ctx context.Context, jobName string, resourceGro Chain: []validation.Constraint{{Target: "body.Properties.ReturnShipping.CarrierName", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.Properties.ReturnShipping.CarrierAccountNumber", Name: validation.Null, Rule: true, Chain: nil}, }}, - {Target: "body.Properties.ShippingInformation", Name: validation.Null, Rule: false, - Chain: []validation.Constraint{{Target: "body.Properties.ShippingInformation.RecipientName", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.StreetAddress1", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.City", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.StateOrProvince", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.PostalCode", Name: validation.Null, Rule: true, Chain: nil}, - {Target: "body.Properties.ShippingInformation.CountryOrRegion", Name: validation.Null, Rule: true, Chain: nil}, - }}, {Target: "body.Properties.DeliveryPackage", Name: validation.Null, Rule: false, Chain: []validation.Constraint{{Target: "body.Properties.DeliveryPackage.CarrierName", Name: validation.Null, Rule: true, Chain: nil}, {Target: "body.Properties.DeliveryPackage.TrackingNumber", Name: validation.Null, Rule: true, Chain: nil}, diff --git a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/models.go b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/models.go index 8923c0547bce..9544eaf525b0 100644 --- a/services/storageimportexport/mgmt/2020-08-01/storageimportexport/models.go +++ b/services/storageimportexport/mgmt/2020-08-01/storageimportexport/models.go @@ -10,6 +10,7 @@ import ( "context" "encoding/json" "github.com/Azure/go-autorest/autorest" + "github.com/Azure/go-autorest/autorest/date" "github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/tracing" "net/http" @@ -70,7 +71,7 @@ type DriveStatus struct { // EncryptionKeyDetails specifies the encryption key properties type EncryptionKeyDetails struct { // KekType - The type of kek encryption key. Possible values include: 'MicrosoftManaged', 'CustomerManaged' - KekType KekType `json:"kekType,omitempty"` + KekType EncryptionKekType `json:"kekType,omitempty"` // KekURL - Specifies the url for kek encryption key. KekURL *string `json:"kekUrl,omitempty"` // KekVaultResourceID - Specifies the keyvault resource id for kek encryption key. @@ -212,7 +213,7 @@ type GetBitLockerKeysResponse struct { // IdentityDetails specifies the identity properties. type IdentityDetails struct { // Type - The type of identity. Possible values include: 'None', 'SystemAssigned', 'UserAssigned' - Type Type `json:"type,omitempty"` + Type IdentityType `json:"type,omitempty"` // PrincipalID - READ-ONLY; Specifies the principal id for the identity for the job. PrincipalID *string `json:"principalId,omitempty"` // TenantID - READ-ONLY; Specifies the tenant id for the identity for the job. @@ -271,6 +272,8 @@ type JobDetails struct { // JobResponse contains the job information. type JobResponse struct { autorest.Response `json:"-"` + // SystemData - READ-ONLY; SystemData of ImportExport Jobs. + SystemData *SystemData `json:"systemData,omitempty"` // ID - READ-ONLY; Specifies the resource identifier of the job. ID *string `json:"id,omitempty"` // Name - READ-ONLY; Specifies the name of the job. @@ -571,6 +574,8 @@ type LocationProperties struct { CountryOrRegion *string `json:"countryOrRegion,omitempty"` // Phone - The phone number for the Azure data center. Phone *string `json:"phone,omitempty"` + // AdditionalShippingInformation - Additional shipping information for customer, specific to datacenter to which customer should send their disks. + AdditionalShippingInformation *string `json:"additionalShippingInformation,omitempty"` // SupportedCarriers - A list of carriers that are supported at this location. SupportedCarriers *[]string `json:"supportedCarriers,omitempty"` // AlternateLocations - A list of location IDs that should be used to ship shipping drives to for jobs created against the current location. If the current location is active, it will be part of the list. If it is temporarily closed due to maintenance, this list may contain other locations. @@ -755,6 +760,22 @@ func (si ShippingInformation) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// SystemData metadata pertaining to creation and last modification of the resource. +type SystemData struct { + // CreatedBy - The identity that created the resource. + CreatedBy *string `json:"createdBy,omitempty"` + // CreatedByType - The type of identity that created the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + CreatedByType CreatedByType `json:"createdByType,omitempty"` + // CreatedAt - The timestamp of resource creation (UTC). + CreatedAt *date.Time `json:"createdAt,omitempty"` + // LastModifiedBy - The identity that last modified the resource. + LastModifiedBy *string `json:"lastModifiedBy,omitempty"` + // LastModifiedByType - The type of identity that last modified the resource. Possible values include: 'User', 'Application', 'ManagedIdentity', 'Key' + LastModifiedByType CreatedByType `json:"lastModifiedByType,omitempty"` + // LastModifiedAt - The timestamp of resource last modification (UTC) + LastModifiedAt *date.Time `json:"lastModifiedAt,omitempty"` +} + // UpdateJobParameters update Job parameters type UpdateJobParameters struct { // Tags - Specifies the tags that will be assigned to the job