From 49f02dc7494be40d6b6394f6f6fb4e9038580960 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 2 May 2022 17:12:03 +0000 Subject: [PATCH] CodeGen from PR 18736 in Azure/azure-rest-api-specs Merge 9922bcf4ca8155f82d1e0f257c1a8fafecb8622c into 398da0c0e050b5f39857661d1b104056ad48c0a2 --- .../mgmt/2018-09-01/iotcentral/CHANGELOG.md | 2 +- .../mgmt/2018-09-01/iotcentral/_meta.json | 2 +- .../mgmt/2021-06-01/iotcentral/CHANGELOG.md | 2 +- .../mgmt/2021-06-01/iotcentral/_meta.json | 2 +- .../iotcentral/CHANGELOG.md | 38 +++- .../2021-11-01-preview/iotcentral/_meta.json | 2 +- .../2021-11-01-preview/iotcentral/enums.go | 45 +++++ .../2021-11-01-preview/iotcentral/models.go | 162 ++++++++++++++++++ 8 files changed, 249 insertions(+), 6 deletions(-) diff --git a/services/iotcentral/mgmt/2018-09-01/iotcentral/CHANGELOG.md b/services/iotcentral/mgmt/2018-09-01/iotcentral/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/iotcentral/mgmt/2018-09-01/iotcentral/CHANGELOG.md +++ b/services/iotcentral/mgmt/2018-09-01/iotcentral/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/iotcentral/mgmt/2018-09-01/iotcentral/_meta.json b/services/iotcentral/mgmt/2018-09-01/iotcentral/_meta.json index 55a49977f572..e5ab71159a15 100644 --- a/services/iotcentral/mgmt/2018-09-01/iotcentral/_meta.json +++ b/services/iotcentral/mgmt/2018-09-01/iotcentral/_meta.json @@ -1,5 +1,5 @@ { - "commit": "a1eee0489c374782a934ec1f093abd16fa7718ca", + "commit": "ad1e63d982f82e4ce72adf941afd6ced70564dd0", "readme": "/_/azure-rest-api-specs/specification/iotcentral/resource-manager/readme.md", "tag": "package-2018-09-01", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/iotcentral/mgmt/2021-06-01/iotcentral/CHANGELOG.md b/services/iotcentral/mgmt/2021-06-01/iotcentral/CHANGELOG.md index 52911e4cc5e4..a1ecf841edb0 100644 --- a/services/iotcentral/mgmt/2021-06-01/iotcentral/CHANGELOG.md +++ b/services/iotcentral/mgmt/2021-06-01/iotcentral/CHANGELOG.md @@ -1,2 +1,2 @@ -# Change History +# Unreleased diff --git a/services/iotcentral/mgmt/2021-06-01/iotcentral/_meta.json b/services/iotcentral/mgmt/2021-06-01/iotcentral/_meta.json index f9e1b1096c05..6743fee44892 100644 --- a/services/iotcentral/mgmt/2021-06-01/iotcentral/_meta.json +++ b/services/iotcentral/mgmt/2021-06-01/iotcentral/_meta.json @@ -1,5 +1,5 @@ { - "commit": "bd64220293a403f70ae8beebd56fb86951007acf", + "commit": "ad1e63d982f82e4ce72adf941afd6ced70564dd0", "readme": "/_/azure-rest-api-specs/specification/iotcentral/resource-manager/readme.md", "tag": "package-2021-06", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/CHANGELOG.md b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/CHANGELOG.md index 52911e4cc5e4..2b42870dc4b3 100644 --- a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/CHANGELOG.md +++ b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/CHANGELOG.md @@ -1,2 +1,38 @@ -# Change History +# Unreleased +## Additive Changes + +### New Constants + +1. IPRuleAction.IPRuleActionAllow +1. ResourceIdentityType.ResourceIdentityTypeSystemAssigned +1. SkuTier.SkuTierBasic +1. SkuTier.SkuTierFree +1. SkuTier.SkuTierPremium +1. SkuTier.SkuTierStandard + +### New Funcs + +1. Identity.MarshalJSON() ([]byte, error) +1. NetworkRuleSetIPRule.MarshalJSON() ([]byte, error) +1. PossibleIPRuleActionValues() []IPRuleAction +1. PossibleResourceIdentityTypeValues() []ResourceIdentityType +1. PossibleSkuTierValues() []SkuTier +1. ResourceModelWithAllowedPropertySet.MarshalJSON() ([]byte, error) +1. ResourceModelWithAllowedPropertySetIdentity.MarshalJSON() ([]byte, error) + +### Struct Changes + +#### New Structs + +1. Identity +1. Plan +1. ResourceModelWithAllowedPropertySet +1. ResourceModelWithAllowedPropertySetIdentity +1. ResourceModelWithAllowedPropertySetPlan +1. ResourceModelWithAllowedPropertySetSku +1. Sku + +#### New Struct Fields + +1. NetworkRuleSetIPRule.Action diff --git a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/_meta.json b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/_meta.json index 5126eba39435..3145293e9883 100644 --- a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/_meta.json +++ b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/_meta.json @@ -1,5 +1,5 @@ { - "commit": "a1a224b54f05debfa94fd19477ed820c64f0f9fc", + "commit": "ad1e63d982f82e4ce72adf941afd6ced70564dd0", "readme": "/_/azure-rest-api-specs/specification/iotcentral/resource-manager/readme.md", "tag": "package-preview-2021-11", "use": "@microsoft.azure/autorest.go@2.1.187", diff --git a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/enums.go b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/enums.go index 0ee611a9aca4..fe592dd97f58 100644 --- a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/enums.go +++ b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/enums.go @@ -57,6 +57,19 @@ func PossibleCreatedByTypeValues() []CreatedByType { return []CreatedByType{CreatedByTypeApplication, CreatedByTypeKey, CreatedByTypeManagedIdentity, CreatedByTypeUser} } +// IPRuleAction enumerates the values for ip rule action. +type IPRuleAction string + +const ( + // IPRuleActionAllow ... + IPRuleActionAllow IPRuleAction = "Allow" +) + +// PossibleIPRuleActionValues returns an array of possible values for the IPRuleAction const type. +func PossibleIPRuleActionValues() []IPRuleAction { + return []IPRuleAction{IPRuleActionAllow} +} + // NetworkAction enumerates the values for network action. type NetworkAction string @@ -147,6 +160,38 @@ func PossiblePublicNetworkAccessValues() []PublicNetworkAccess { return []PublicNetworkAccess{PublicNetworkAccessDisabled, PublicNetworkAccessEnabled} } +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // ResourceIdentityTypeSystemAssigned ... + ResourceIdentityTypeSystemAssigned ResourceIdentityType = "SystemAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{ResourceIdentityTypeSystemAssigned} +} + +// SkuTier enumerates the values for sku tier. +type SkuTier string + +const ( + // SkuTierBasic ... + SkuTierBasic SkuTier = "Basic" + // SkuTierFree ... + SkuTierFree SkuTier = "Free" + // SkuTierPremium ... + SkuTierPremium SkuTier = "Premium" + // SkuTierStandard ... + SkuTierStandard SkuTier = "Standard" +) + +// PossibleSkuTierValues returns an array of possible values for the SkuTier const type. +func PossibleSkuTierValues() []SkuTier { + return []SkuTier{SkuTierBasic, SkuTierFree, SkuTierPremium, SkuTierStandard} +} + // SystemAssignedServiceIdentityType enumerates the values for system assigned service identity type. type SystemAssignedServiceIdentityType string diff --git a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/models.go b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/models.go index 6c95a3377473..ea0636a83a74 100644 --- a/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/models.go +++ b/services/preview/iotcentral/mgmt/2021-11-01-preview/iotcentral/models.go @@ -858,14 +858,47 @@ type ErrorResponse struct { Error *ErrorDetail `json:"error,omitempty"` } +// Identity identity for the resource. +type Identity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'ResourceIdentityTypeSystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for Identity. +func (i Identity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if i.Type != "" { + objectMap["type"] = i.Type + } + return json.Marshal(objectMap) +} + // NetworkRuleSetIPRule an object for an IP range that will be allowed access. type NetworkRuleSetIPRule struct { + // Action - READ-ONLY; The network action for the IP mask. Possible values include: 'IPRuleActionAllow' + Action IPRuleAction `json:"action,omitempty"` // FilterName - The readable name of the IP rule. FilterName *string `json:"filterName,omitempty"` // IPMask - The CIDR block defining the IP range. IPMask *string `json:"ipMask,omitempty"` } +// MarshalJSON is the custom marshaler for NetworkRuleSetIPRule. +func (nrsir NetworkRuleSetIPRule) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if nrsir.FilterName != nil { + objectMap["filterName"] = nrsir.FilterName + } + if nrsir.IPMask != nil { + objectMap["ipMask"] = nrsir.IPMask + } + return json.Marshal(objectMap) +} + // NetworkRuleSets network Rule Set Properties of this IoT Central application. type NetworkRuleSets struct { // ApplyToDevices - Whether these rules apply for device connectivity to IoT Hub and Device Provisioning service associated with this application. @@ -1094,6 +1127,20 @@ func NewOperationListResultPage(cur OperationListResult, getNextPage func(contex } } +// Plan plan for the resource. +type Plan struct { + // Name - A user defined name of the 3rd Party Artifact that is being procured. + Name *string `json:"name,omitempty"` + // Publisher - The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + Publisher *string `json:"publisher,omitempty"` + // Product - The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. + Product *string `json:"product,omitempty"` + // PromotionCode - A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + PromotionCode *string `json:"promotionCode,omitempty"` + // Version - The version of the desired product/artifact. + Version *string `json:"version,omitempty"` +} + // PrivateEndpoint the private endpoint resource. type PrivateEndpoint struct { // ID - READ-ONLY; The ARM identifier for private endpoint. @@ -1463,6 +1510,121 @@ func (r Resource) MarshalJSON() ([]byte, error) { return json.Marshal(objectMap) } +// ResourceModelWithAllowedPropertySet the resource model definition containing the full set of allowed +// properties for a resource. Except properties bag, there cannot be a top level property outside of this +// set. +type ResourceModelWithAllowedPropertySet struct { + // ManagedBy - The fully qualified resource ID of the resource that manages this resource. Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment will not delete the resource if it is removed from the template since it is managed by another resource. + ManagedBy *string `json:"managedBy,omitempty"` + // Kind - Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value. + Kind *string `json:"kind,omitempty"` + // Etag - READ-ONLY; The etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields. + Etag *string `json:"etag,omitempty"` + Identity *ResourceModelWithAllowedPropertySetIdentity `json:"identity,omitempty"` + Sku *ResourceModelWithAllowedPropertySetSku `json:"sku,omitempty"` + Plan *ResourceModelWithAllowedPropertySetPlan `json:"plan,omitempty"` + // Tags - Resource tags. + Tags map[string]*string `json:"tags"` + // Location - The geo-location where the resource lives + Location *string `json:"location,omitempty"` + // 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 - READ-ONLY; The name of the resource + Name *string `json:"name,omitempty"` + // Type - READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string `json:"type,omitempty"` + // SystemData - READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData `json:"systemData,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceModelWithAllowedPropertySet. +func (rmwaps ResourceModelWithAllowedPropertySet) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rmwaps.ManagedBy != nil { + objectMap["managedBy"] = rmwaps.ManagedBy + } + if rmwaps.Kind != nil { + objectMap["kind"] = rmwaps.Kind + } + if rmwaps.Identity != nil { + objectMap["identity"] = rmwaps.Identity + } + if rmwaps.Sku != nil { + objectMap["sku"] = rmwaps.Sku + } + if rmwaps.Plan != nil { + objectMap["plan"] = rmwaps.Plan + } + if rmwaps.Tags != nil { + objectMap["tags"] = rmwaps.Tags + } + if rmwaps.Location != nil { + objectMap["location"] = rmwaps.Location + } + return json.Marshal(objectMap) +} + +// ResourceModelWithAllowedPropertySetIdentity ... +type ResourceModelWithAllowedPropertySetIdentity struct { + // PrincipalID - READ-ONLY; The principal ID of resource identity. + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY; The tenant ID of resource. + TenantID *string `json:"tenantId,omitempty"` + // Type - The identity type. Possible values include: 'ResourceIdentityTypeSystemAssigned' + Type ResourceIdentityType `json:"type,omitempty"` +} + +// MarshalJSON is the custom marshaler for ResourceModelWithAllowedPropertySetIdentity. +func (rmwaps ResourceModelWithAllowedPropertySetIdentity) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]interface{}) + if rmwaps.Type != "" { + objectMap["type"] = rmwaps.Type + } + return json.Marshal(objectMap) +} + +// ResourceModelWithAllowedPropertySetPlan ... +type ResourceModelWithAllowedPropertySetPlan struct { + // Name - A user defined name of the 3rd Party Artifact that is being procured. + Name *string `json:"name,omitempty"` + // Publisher - The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + Publisher *string `json:"publisher,omitempty"` + // Product - The 3rd Party artifact that is being procured. E.g. NewRelic. Product maps to the OfferID specified for the artifact at the time of Data Market onboarding. + Product *string `json:"product,omitempty"` + // PromotionCode - A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + PromotionCode *string `json:"promotionCode,omitempty"` + // Version - The version of the desired product/artifact. + Version *string `json:"version,omitempty"` +} + +// ResourceModelWithAllowedPropertySetSku ... +type ResourceModelWithAllowedPropertySetSku struct { + // Name - The name of the SKU. Ex - P3. It is typically a letter+number code + Name *string `json:"name,omitempty"` + // Tier - Possible values include: 'SkuTierFree', 'SkuTierBasic', 'SkuTierStandard', 'SkuTierPremium' + Tier SkuTier `json:"tier,omitempty"` + // Size - The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + Size *string `json:"size,omitempty"` + // Family - If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string `json:"family,omitempty"` + // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + Capacity *int32 `json:"capacity,omitempty"` +} + +// Sku the resource model definition representing SKU +type Sku struct { + // Name - The name of the SKU. Ex - P3. It is typically a letter+number code + Name *string `json:"name,omitempty"` + // Tier - Possible values include: 'SkuTierFree', 'SkuTierBasic', 'SkuTierStandard', 'SkuTierPremium' + Tier SkuTier `json:"tier,omitempty"` + // Size - The SKU size. When the name field is the combination of tier and some other value, this would be the standalone code. + Size *string `json:"size,omitempty"` + // Family - If the service has different generations of hardware, for the same SKU, then that can be captured here. + Family *string `json:"family,omitempty"` + // Capacity - If the SKU supports scale out/in then the capacity integer should be included. If scale out/in is not possible for the resource this may be omitted. + Capacity *int32 `json:"capacity,omitempty"` +} + // SystemAssignedServiceIdentity managed service identity (either system assigned, or none) type SystemAssignedServiceIdentity struct { // PrincipalID - READ-ONLY; The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.