diff --git a/.sha256sum b/.sha256sum index 447304b00f8..7020f805cba 100644 --- a/.sha256sum +++ b/.sha256sum @@ -6,4 +6,4 @@ b1f1de0fe40d05de90742b17928968923b936adc294000f58974f50a297581dd swagger/redhat c023515341196746454c0ae7af077d40d3ec13f6b88b33cb558f0a7ab17a5a24 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2023-07-01-preview/redhatopenshift.json 440748951dd1c3b34b5ccbdcb7cd966e3b89490887a1f1d64429561fad789515 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-09-04/redhatopenshift.json 74a46fdde6ceb0121fe1515c7e11e902dd921b54cffe693307fb02b3dc88f26e swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/stable/2023-11-22/redhatopenshift.json -b0c6ed4e05ede038c10e31ac94e493c74cad84a487ecacd7276c880c3fe753ad swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2024-08-12-preview/redhatopenshift.json +7eca34ebaf0422d0ef5dbb90640cf7b1b24cdd10e16d63f71ef69f7fa460a806 swagger/redhatopenshift/resource-manager/Microsoft.RedHatOpenShift/preview/2024-08-12-preview/redhatopenshift.json diff --git a/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/enums.go b/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/enums.go index 0650354dc1c..1fb8df83296 100644 --- a/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/enums.go +++ b/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/enums.go @@ -121,6 +121,21 @@ func PossibleProvisioningStateValues() []ProvisioningState { return []ProvisioningState{AdminUpdating, Canceled, Creating, Deleting, Failed, Succeeded, Updating} } +// ResourceIdentityType enumerates the values for resource identity type. +type ResourceIdentityType string + +const ( + // SystemAssigned ... + SystemAssigned ResourceIdentityType = "SystemAssigned" + // UserAssigned ... + UserAssigned ResourceIdentityType = "UserAssigned" +) + +// PossibleResourceIdentityTypeValues returns an array of possible values for the ResourceIdentityType const type. +func PossibleResourceIdentityTypeValues() []ResourceIdentityType { + return []ResourceIdentityType{SystemAssigned, UserAssigned} +} + // Visibility enumerates the values for visibility. type Visibility string diff --git a/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/models.go b/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/models.go index 41e54f898a2..de954824239 100644 --- a/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/models.go +++ b/pkg/client/services/redhatopenshift/mgmt/2024-08-12-preview/redhatopenshift/models.go @@ -145,8 +145,11 @@ type EffectiveOutboundIP struct { // Identity identity stores information about the cluster MSI(s) in a workload identity cluster. type Identity struct { - Type *string `json:"type,omitempty"` - PrincipalID *string `json:"principalId,omitempty"` + // Type - Possible values include: 'SystemAssigned', 'UserAssigned' + Type ResourceIdentityType `json:"type,omitempty"` + // PrincipalID - READ-ONLY + PrincipalID *string `json:"principalId,omitempty"` + // TenantID - READ-ONLY TenantID *string `json:"tenantId,omitempty"` UserAssignedIdentities map[string]*ClusterUserAssignedIdentity `json:"userAssignedIdentities"` } @@ -154,15 +157,9 @@ type Identity struct { // MarshalJSON is the custom marshaler for Identity. func (i Identity) MarshalJSON() ([]byte, error) { objectMap := make(map[string]interface{}) - if i.Type != nil { + if i.Type != "" { objectMap["type"] = i.Type } - if i.PrincipalID != nil { - objectMap["principalId"] = i.PrincipalID - } - if i.TenantID != nil { - objectMap["tenantId"] = i.TenantID - } if i.UserAssignedIdentities != nil { objectMap["userAssignedIdentities"] = i.UserAssignedIdentities } diff --git a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/__init__.py b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/__init__.py index f701a8ff322..55ee3f1778f 100644 --- a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/__init__.py +++ b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/__init__.py @@ -108,6 +108,7 @@ OutboundType, PreconfiguredNSG, ProvisioningState, + ResourceIdentityType, Visibility, ) @@ -160,5 +161,6 @@ 'OutboundType', 'PreconfiguredNSG', 'ProvisioningState', + 'ResourceIdentityType', 'Visibility', ] diff --git a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_azure_red_hat_open_shift_client_enums.py b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_azure_red_hat_open_shift_client_enums.py index 12491f0c3bd..a1bd0fc6a9c 100644 --- a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_azure_red_hat_open_shift_client_enums.py +++ b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_azure_red_hat_open_shift_client_enums.py @@ -68,6 +68,13 @@ class ProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): SUCCEEDED = "Succeeded" UPDATING = "Updating" +class ResourceIdentityType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The identity type. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + class Visibility(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Visibility represents visibility. """ diff --git a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models.py b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models.py index b0d19f947a3..696b94fb790 100644 --- a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models.py +++ b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models.py @@ -282,18 +282,25 @@ def __init__( class Identity(msrest.serialization.Model): """Identity stores information about the cluster MSI(s) in a workload identity cluster. - :ivar type: - :vartype type: str + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The identity type. Possible values include: "SystemAssigned", "UserAssigned". + :vartype type: str or + ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ResourceIdentityType :ivar principal_id: :vartype principal_id: str :ivar tenant_id: :vartype tenant_id: str - :ivar user_assigned_identities: UserAssignedIdentities stores a mapping from resource IDs of - managed identities to their client/principal IDs. + :ivar user_assigned_identities: Dictionary of :code:``. :vartype user_assigned_identities: dict[str, ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ClusterUserAssignedIdentity] """ + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, @@ -306,21 +313,17 @@ def __init__( **kwargs ): """ - :keyword type: - :paramtype type: str - :keyword principal_id: - :paramtype principal_id: str - :keyword tenant_id: - :paramtype tenant_id: str - :keyword user_assigned_identities: UserAssignedIdentities stores a mapping from resource IDs of - managed identities to their client/principal IDs. + :keyword type: The identity type. Possible values include: "SystemAssigned", "UserAssigned". + :paramtype type: str or + ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ResourceIdentityType + :keyword user_assigned_identities: Dictionary of :code:``. :paramtype user_assigned_identities: dict[str, ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ClusterUserAssignedIdentity] """ super(Identity, self).__init__(**kwargs) self.type = kwargs.get('type', None) - self.principal_id = kwargs.get('principal_id', None) - self.tenant_id = kwargs.get('tenant_id', None) + self.principal_id = None + self.tenant_id = None self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models_py3.py b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models_py3.py index 29f132173e7..fd80f68c8ad 100644 --- a/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models_py3.py +++ b/python/client/azure/mgmt/redhatopenshift/v2024_08_12_preview/models/_models_py3.py @@ -311,18 +311,25 @@ def __init__( class Identity(msrest.serialization.Model): """Identity stores information about the cluster MSI(s) in a workload identity cluster. - :ivar type: - :vartype type: str + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The identity type. Possible values include: "SystemAssigned", "UserAssigned". + :vartype type: str or + ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ResourceIdentityType :ivar principal_id: :vartype principal_id: str :ivar tenant_id: :vartype tenant_id: str - :ivar user_assigned_identities: UserAssignedIdentities stores a mapping from resource IDs of - managed identities to their client/principal IDs. + :ivar user_assigned_identities: Dictionary of :code:``. :vartype user_assigned_identities: dict[str, ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ClusterUserAssignedIdentity] """ + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, @@ -333,28 +340,22 @@ class Identity(msrest.serialization.Model): def __init__( self, *, - type: Optional[str] = None, - principal_id: Optional[str] = None, - tenant_id: Optional[str] = None, + type: Optional[Union[str, "ResourceIdentityType"]] = None, user_assigned_identities: Optional[Dict[str, "ClusterUserAssignedIdentity"]] = None, **kwargs ): """ - :keyword type: - :paramtype type: str - :keyword principal_id: - :paramtype principal_id: str - :keyword tenant_id: - :paramtype tenant_id: str - :keyword user_assigned_identities: UserAssignedIdentities stores a mapping from resource IDs of - managed identities to their client/principal IDs. + :keyword type: The identity type. Possible values include: "SystemAssigned", "UserAssigned". + :paramtype type: str or + ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ResourceIdentityType + :keyword user_assigned_identities: Dictionary of :code:``. :paramtype user_assigned_identities: dict[str, ~azure.mgmt.redhatopenshift.v2024_08_12_preview.models.ClusterUserAssignedIdentity] """ super(Identity, self).__init__(**kwargs) self.type = type - self.principal_id = principal_id - self.tenant_id = tenant_id + self.principal_id = None + self.tenant_id = None self.user_assigned_identities = user_assigned_identities