From d23f34504cd3693ede3eb5cfbb245a39c02a5a4d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 13 May 2025 17:18:19 +0000 Subject: [PATCH] CodeGen from PR 33810 in Azure/azure-rest-api-specs Merge f56e10be6feb15ce5befdc769f63da0716f2cdfb into 8ace4664e1bb2c1d1a1158d26d553991fa6f16b5 --- ...re.ResourceManager.IotOperations.net8.0.cs | 1547 ++++++++++++++++- ...rceManager.IotOperations.netstandard2.0.cs | 1547 ++++++++++++++++- .../Samples/Sample_AkriConnectorResource.cs | 116 ++ .../Sample_AkriConnectorResourceCollection.cs | 205 +++ .../Sample_AkriConnectorTemplateResource.cs | 147 ++ ...AkriConnectorTemplateResourceCollection.cs | 234 +++ .../Sample_AkriDiscoveryHandlerResource.cs | 147 ++ ..._AkriDiscoveryHandlerResourceCollection.cs | 234 +++ .../Samples/Sample_DataflowGraphResource.cs | 130 ++ .../Sample_DataflowGraphResourceCollection.cs | 219 +++ ...perationsBrokerAuthenticationCollection.cs | 18 +- ...tOperationsBrokerAuthenticationResource.cs | 14 +- ...OperationsBrokerAuthorizationCollection.cs | 23 +- ...otOperationsBrokerAuthorizationResource.cs | 19 +- .../Sample_IotOperationsBrokerCollection.cs | 28 +- ...e_IotOperationsBrokerListenerCollection.cs | 23 +- ...ple_IotOperationsBrokerListenerResource.cs | 19 +- .../Sample_IotOperationsBrokerResource.cs | 24 +- .../Sample_IotOperationsDataflowCollection.cs | 38 +- ...IotOperationsDataflowEndpointCollection.cs | 58 +- ...e_IotOperationsDataflowEndpointResource.cs | 54 +- ..._IotOperationsDataflowProfileCollection.cs | 23 +- ...le_IotOperationsDataflowProfileResource.cs | 19 +- .../Sample_IotOperationsDataflowResource.cs | 34 +- .../Sample_IotOperationsInstanceCollection.cs | 10 +- .../Sample_IotOperationsInstanceResource.cs | 6 +- .../Sample_RegistryEndpointResource.cs | 114 ++ ...mple_RegistryEndpointResourceCollection.cs | 201 +++ .../Sample_SubscriptionResourceExtensions.cs | 2 +- .../AkriConnectorResource.Serialization.cs | 26 + .../src/Generated/AkriConnectorResource.cs | 348 ++++ .../AkriConnectorResourceCollection.cs | 493 ++++++ ...AkriConnectorResourceData.Serialization.cs | 171 ++ .../Generated/AkriConnectorResourceData.cs | 85 + ...ConnectorTemplateResource.Serialization.cs | 26 + .../AkriConnectorTemplateResource.cs | 416 +++++ ...AkriConnectorTemplateResourceCollection.cs | 493 ++++++ ...ectorTemplateResourceData.Serialization.cs | 171 ++ .../AkriConnectorTemplateResourceData.cs | 79 + ...iDiscoveryHandlerResource.Serialization.cs | 26 + .../Generated/AkriDiscoveryHandlerResource.cs | 347 ++++ .../AkriDiscoveryHandlerResourceCollection.cs | 493 ++++++ ...coveryHandlerResourceData.Serialization.cs | 171 ++ .../AkriDiscoveryHandlerResourceData.cs | 79 + .../Generated/ArmIotOperationsModelFactory.cs | 229 ++- .../DataflowGraphResource.Serialization.cs | 26 + .../src/Generated/DataflowGraphResource.cs | 348 ++++ .../DataflowGraphResourceCollection.cs | 493 ++++++ ...DataflowGraphResourceData.Serialization.cs | 171 ++ .../Generated/DataflowGraphResourceData.cs | 79 + .../Extensions/IotOperationsExtensions.cs | 103 +- .../MockableIotOperationsArmClient.cs | 60 + ...kableIotOperationsResourceGroupResource.cs | 4 +- ...ckableIotOperationsSubscriptionResource.cs | 4 +- ...perationsBrokerAuthenticationCollection.cs | 20 +- ...sBrokerAuthenticationData.Serialization.cs | 11 +- .../IotOperationsBrokerAuthenticationData.cs | 12 +- ...tOperationsBrokerAuthenticationResource.cs | 12 +- ...OperationsBrokerAuthorizationCollection.cs | 20 +- ...nsBrokerAuthorizationData.Serialization.cs | 11 +- .../IotOperationsBrokerAuthorizationData.cs | 12 +- ...otOperationsBrokerAuthorizationResource.cs | 12 +- .../IotOperationsBrokerCollection.cs | 20 +- .../IotOperationsBrokerData.Serialization.cs | 11 +- .../src/Generated/IotOperationsBrokerData.cs | 12 +- .../IotOperationsBrokerListenerCollection.cs | 20 +- ...rationsBrokerListenerData.Serialization.cs | 11 +- .../IotOperationsBrokerListenerData.cs | 12 +- .../IotOperationsBrokerListenerResource.cs | 12 +- .../Generated/IotOperationsBrokerResource.cs | 24 +- .../IotOperationsDataflowCollection.cs | 20 +- ...IotOperationsDataflowData.Serialization.cs | 11 +- .../Generated/IotOperationsDataflowData.cs | 12 +- ...IotOperationsDataflowEndpointCollection.cs | 20 +- ...tionsDataflowEndpointData.Serialization.cs | 11 +- .../IotOperationsDataflowEndpointData.cs | 12 +- .../IotOperationsDataflowEndpointResource.cs | 12 +- .../IotOperationsDataflowProfileCollection.cs | 20 +- ...ationsDataflowProfileData.Serialization.cs | 11 +- .../IotOperationsDataflowProfileData.cs | 12 +- .../IotOperationsDataflowProfileResource.cs | 85 +- .../IotOperationsDataflowResource.cs | 12 +- .../IotOperationsInstanceCollection.cs | 20 +- .../IotOperationsInstanceResource.cs | 243 ++- .../AkriConnectorResourceOperationSource.cs | 36 + ...onnectorTemplateResourceOperationSource.cs | 36 + ...DiscoveryHandlerResourceOperationSource.cs | 36 + .../DataflowGraphResourceOperationSource.cs | 36 + ...RegistryEndpointResourceOperationSource.cs | 36 + .../AkriConnectorProperties.Serialization.cs | 133 ++ .../Models/AkriConnectorProperties.cs | 65 + ...nnectorResourceListResult.Serialization.cs | 151 ++ .../Models/AkriConnectorResourceListResult.cs | 80 + ...nectorTemplateAioMetadata.Serialization.cs | 140 ++ .../AkriConnectorTemplateAioMetadata.cs | 69 + ...nnectorTemplateAllocation.Serialization.cs | 117 ++ .../Models/AkriConnectorTemplateAllocation.cs | 69 + .../AkriConnectorTemplateAllocationPolicy.cs | 48 + ...plateBucketizedAllocation.Serialization.cs | 118 ++ ...riConnectorTemplateBucketizedAllocation.cs | 42 + ...ntConfigurationSchemaRefs.Serialization.cs | 179 ++ ...eInboundEndpointConfigurationSchemaRefs.cs | 81 + ...DeviceInboundEndpointType.Serialization.cs | 149 ++ ...nectorTemplateDeviceInboundEndpointType.cs | 86 + ...nectorTemplateDiagnostics.Serialization.cs | 144 ++ .../AkriConnectorTemplateDiagnostics.cs | 65 + ...HelmAdvancedConfiguration.Serialization.cs | 163 ++ ...nectorTemplateHelmAdvancedConfiguration.cs | 73 + ...TemplateHelmAuthSecretRef.Serialization.cs | 142 ++ .../AkriConnectorTemplateHelmAuthSecretRef.cs | 89 + ...TemplateHelmConfiguration.Serialization.cs | 118 ++ .../AkriConnectorTemplateHelmConfiguration.cs | 45 + ...HelmConfigurationSettings.Serialization.cs | 196 +++ ...nectorTemplateHelmConfigurationSettings.cs | 109 ++ ...lateHelmContainerRegistry.Serialization.cs | 118 ++ ...iConnectorTemplateHelmContainerRegistry.cs | 45 + ...ContainerRegistrySettings.Serialization.cs | 149 ++ ...orTemplateHelmContainerRegistrySettings.cs | 86 + ...teHelmDeleteConfiguration.Serialization.cs | 199 +++ ...onnectorTemplateHelmDeleteConfiguration.cs | 81 + ...eHelmInstallConfiguration.Serialization.cs | 199 +++ ...nnectorTemplateHelmInstallConfiguration.cs | 81 + ...teHelmRegistryEndpointRef.Serialization.cs | 118 ++ ...onnectorTemplateHelmRegistryEndpointRef.cs | 45 + ...plateHelmRegistrySettings.Serialization.cs | 118 ++ ...riConnectorTemplateHelmRegistrySettings.cs | 69 + ...nnectorTemplateHelmRegistrySettingsType.cs | 51 + ...eHelmUpgradeConfiguration.Serialization.cs | 199 +++ ...nnectorTemplateHelmUpgradeConfiguration.cs | 81 + ...plateManagedConfiguration.Serialization.cs | 118 ++ ...riConnectorTemplateManagedConfiguration.cs | 57 + ...agedConfigurationSettings.Serialization.cs | 192 ++ ...torTemplateManagedConfigurationSettings.cs | 144 ++ ...nnectorTemplateManagedConfigurationType.cs | 51 + ...latePersistentVolumeClaim.Serialization.cs | 134 ++ ...iConnectorTemplatePersistentVolumeClaim.cs | 82 + ...nnectorTemplateProperties.Serialization.cs | 211 +++ .../Models/AkriConnectorTemplateProperties.cs | 123 ++ ...emplateResourceListResult.Serialization.cs | 151 ++ ...AkriConnectorTemplateResourceListResult.cs | 80 + ...plateRuntimeConfiguration.Serialization.cs | 118 ++ ...riConnectorTemplateRuntimeConfiguration.cs | 69 + ...nnectorTemplateRuntimeConfigurationType.cs | 51 + ...RuntimeImageConfiguration.Serialization.cs | 226 +++ ...nectorTemplateRuntimeImageConfiguration.cs | 58 + ...mageConfigurationSettings.Serialization.cs | 192 ++ ...mplateRuntimeImageConfigurationSettings.cs | 107 ++ ...eStatefulSetConfiguration.Serialization.cs | 256 +++ ...TemplateRuntimeStatefulSetConfiguration.cs | 87 + ...onnectorTemplateTrustList.Serialization.cs | 126 ++ .../Models/AkriConnectorTemplateTrustList.cs | 75 + ...nnectorsContainerRegistry.Serialization.cs | 118 ++ .../Models/AkriConnectorsContainerRegistry.cs | 45 + ...ContainerRegistrySettings.Serialization.cs | 151 ++ ...AkriConnectorsContainerRegistrySettings.cs | 80 + .../AkriConnectorsDigest.Serialization.cs | 118 ++ .../Generated/Models/AkriConnectorsDigest.cs | 45 + .../Models/AkriConnectorsImagePullPolicy.cs | 54 + ...ConnectorsImagePullSecret.Serialization.cs | 126 ++ .../Models/AkriConnectorsImagePullSecret.cs | 75 + ...nectorsMqttAuthentication.Serialization.cs | 117 ++ .../AkriConnectorsMqttAuthentication.cs | 69 + .../AkriConnectorsMqttAuthenticationMethod.cs | 48 + ...ttConnectionConfiguration.Serialization.cs | 227 +++ ...riConnectorsMqttConnectionConfiguration.cs | 97 ++ .../Models/AkriConnectorsMqttProtocolType.cs | 48 + ...ectorsRegistryEndpointRef.Serialization.cs | 118 ++ .../AkriConnectorsRegistryEndpointRef.cs | 45 + ...onnectorsRegistrySettings.Serialization.cs | 118 ++ .../Models/AkriConnectorsRegistrySettings.cs | 69 + .../AkriConnectorsRegistrySettingsType.cs | 51 + .../AkriConnectorsSecret.Serialization.cs | 142 ++ .../Generated/Models/AkriConnectorsSecret.cs | 89 + ...viceAccountAuthentication.Serialization.cs | 118 ++ ...iConnectorsServiceAccountAuthentication.cs | 51 + ...rviceAccountTokenSettings.Serialization.cs | 126 ++ ...riConnectorsServiceAccountTokenSettings.cs | 75 + .../Models/AkriConnectorsTag.Serialization.cs | 118 ++ .../src/Generated/Models/AkriConnectorsTag.cs | 45 + ...nnectorsTagDigestSettings.Serialization.cs | 118 ++ .../Models/AkriConnectorsTagDigestSettings.cs | 69 + .../Models/AkriConnectorsTagDigestType.cs | 51 + ...scoveryHandlerAioMetadata.Serialization.cs | 140 ++ .../Models/AkriDiscoveryHandlerAioMetadata.cs | 69 + ...scoveryHandlerDiagnostics.Serialization.cs | 144 ++ .../Models/AkriDiscoveryHandlerDiagnostics.cs | 65 + ...verableDeviceEndpointType.Serialization.cs | 134 ++ ...ryHandlerDiscoverableDeviceEndpointType.cs | 82 + ...HandlerImageConfiguration.Serialization.cs | 192 ++ .../AkriDiscoveryHandlerImageConfiguration.cs | 107 ++ ...iscoveryHandlerProperties.Serialization.cs | 289 +++ .../Models/AkriDiscoveryHandlerProperties.cs | 144 ++ ...HandlerResourceListResult.Serialization.cs | 151 ++ .../AkriDiscoveryHandlerResourceListResult.cs | 80 + ...iDiscoveryHandlerSchedule.Serialization.cs | 119 ++ .../Models/AkriDiscoveryHandlerSchedule.cs | 69 + ...HandlerScheduleContinuous.Serialization.cs | 118 ++ .../AkriDiscoveryHandlerScheduleContinuous.cs | 45 + ...coveryHandlerScheduleCron.Serialization.cs | 118 ++ .../AkriDiscoveryHandlerScheduleCron.cs | 45 + ...eryHandlerScheduleRunOnce.Serialization.cs | 118 ++ .../AkriDiscoveryHandlerScheduleRunOnce.cs | 45 + .../AkriDiscoveryHandlerScheduleType.cs | 54 + ...eviceRegistryNamespaceRef.Serialization.cs | 126 ++ .../Models/AzureDeviceRegistryNamespaceRef.cs | 76 + ...erAuthenticatorMethodX509.Serialization.cs | 17 +- .../Models/BrokerAuthenticatorMethodX509.cs | 6 +- .../BrokerAuthenticatorValidationMethod.cs | 51 + .../Models/BrokerPersistence.Serialization.cs | 224 +++ .../src/Generated/Models/BrokerPersistence.cs | 157 ++ ...ersistenceDynamicSettings.Serialization.cs | 134 ++ .../BrokerPersistenceDynamicSettings.cs | 82 + ...okerPersistenceEncryption.Serialization.cs | 126 ++ .../Models/BrokerPersistenceEncryption.cs | 72 + .../Models/BrokerPersistencePolicyMode.cs | 54 + ...etainMessagesCustomPolicy.Serialization.cs | 118 ++ .../BrokerRetainMessagesCustomPolicy.cs | 45 + ...okerRetainMessagesDynamic.Serialization.cs | 126 ++ .../Models/BrokerRetainMessagesDynamic.cs | 72 + ...rokerRetainMessagesPolicy.Serialization.cs | 117 ++ .../Models/BrokerRetainMessagesPolicy.cs | 69 + ...kerRetainMessagesSettings.Serialization.cs | 158 ++ .../Models/BrokerRetainMessagesSettings.cs | 79 + ...kerStateStoreCustomPolicy.Serialization.cs | 118 ++ .../Models/BrokerStateStoreCustomPolicy.cs | 45 + .../BrokerStateStoreDynamic.Serialization.cs | 126 ++ .../Models/BrokerStateStoreDynamic.cs | 72 + .../Models/BrokerStateStoreKeyType.cs | 54 + .../BrokerStateStorePolicy.Serialization.cs | 117 ++ .../Models/BrokerStateStorePolicy.cs | 69 + ...StateStorePolicyResources.Serialization.cs | 144 ++ .../Models/BrokerStateStorePolicyResources.cs | 82 + ...rStateStorePolicySettings.Serialization.cs | 158 ++ .../Models/BrokerStateStorePolicySettings.cs | 79 + ...bscriberQueueCustomPolicy.Serialization.cs | 118 ++ .../BrokerSubscriberQueueCustomPolicy.cs | 45 + ...QueueCustomPolicySettings.Serialization.cs | 183 ++ ...okerSubscriberQueueCustomPolicySettings.cs | 85 + ...kerSubscriberQueueDynamic.Serialization.cs | 126 ++ .../Models/BrokerSubscriberQueueDynamic.cs | 72 + ...okerSubscriberQueuePolicy.Serialization.cs | 117 ++ .../Models/BrokerSubscriberQueuePolicy.cs | 69 + ...tafloGraphDestinationNode.Serialization.cs | 124 ++ .../Models/DatafloGraphDestinationNode.cs | 48 + ...ntAuthenticationAnonymous.Serialization.cs | 118 ++ ...DataflowEndpointAuthenticationAnonymous.cs | 60 + ...cationServiceAccountToken.Serialization.cs | 2 +- ...dpointAuthenticationServiceAccountToken.cs | 2 +- ...ndpointAuthenticationX509.Serialization.cs | 2 +- .../DataflowEndpointAuthenticationX509.cs | 2 +- ...flowEndpointOpenTelemetry.Serialization.cs | 164 ++ .../Models/DataflowEndpointOpenTelemetry.cs | 102 ++ .../Generated/Models/DataflowEndpointType.cs | 3 + .../Models/DataflowEnpointHostType.cs | 63 + ...aflowGraphConnectionInput.Serialization.cs | 141 ++ .../Models/DataflowGraphConnectionInput.cs | 79 + ...flowGraphConnectionOutput.Serialization.cs | 126 ++ .../Models/DataflowGraphConnectionOutput.cs | 75 + ...phDestinationNodeSettings.Serialization.cs | 149 ++ .../DataflowGraphDestinationNodeSettings.cs | 86 + .../DataflowGraphGraphNode.Serialization.cs | 124 ++ .../Models/DataflowGraphGraphNode.cs | 48 + ...aphGraphNodeConfiguration.Serialization.cs | 134 ++ .../DataflowGraphGraphNodeConfiguration.cs | 82 + .../Models/DataflowGraphNode.Serialization.cs | 121 ++ .../src/Generated/Models/DataflowGraphNode.cs | 83 + ...taflowGraphNodeConnection.Serialization.cs | 134 ++ .../Models/DataflowGraphNodeConnection.cs | 88 + ...lowGraphNodeGraphSettings.Serialization.cs | 159 ++ .../Models/DataflowGraphNodeGraphSettings.cs | 87 + .../Generated/Models/DataflowGraphNodeType.cs | 54 + .../DataflowGraphProperties.Serialization.cs | 205 +++ .../Models/DataflowGraphProperties.cs | 107 ++ ...owGraphResourceListResult.Serialization.cs | 151 ++ .../Models/DataflowGraphResourceListResult.cs | 80 + ...taflowGraphSchemaSettings.Serialization.cs | 141 ++ .../Models/DataflowGraphSchemaSettings.cs | 79 + .../DataflowGraphSerializationFormat.cs | 57 + .../DataflowGraphSourceNode.Serialization.cs | 124 ++ .../Models/DataflowGraphSourceNode.cs | 48 + ...taflowGraphSourceSettings.Serialization.cs | 144 ++ .../Models/DataflowGraphSourceSettings.cs | 83 + ...ryAnonymousAuthentication.Serialization.cs | 118 ++ ...lowOpenTelemetryAnonymousAuthentication.cs | 45 + ...enTelemetryAuthentication.Serialization.cs | 119 ++ .../DataflowOpenTelemetryAuthentication.cs | 69 + ...taflowOpenTelemetryAuthenticationMethod.cs | 54 + ...viceAccountAuthentication.Serialization.cs | 118 ++ ...enTelemetryServiceAccountAuthentication.cs | 51 + ...CertificateAuthentication.Serialization.cs | 118 ++ ...nTelemetryX509CertificateAuthentication.cs | 51 + .../Models/InstanceFeature.Serialization.cs | 159 ++ .../src/Generated/Models/InstanceFeature.cs | 70 + .../Generated/Models/InstanceFeatureMode.cs | 54 + ...perationsBrokerProperties.Serialization.cs | 16 + .../Models/IotOperationsBrokerProperties.cs | 6 +- ...ataflowEndpointProperties.Serialization.cs | 32 + ...IotOperationsDataflowEndpointProperties.cs | 10 +- ...rationsInstanceProperties.Serialization.cs | 66 +- .../Models/IotOperationsInstanceProperties.cs | 29 +- ...ntAnonymousAuthentication.Serialization.cs | 118 ++ ...RegistryEndpointAnonymousAuthentication.cs | 45 + ...EndpointAnonymousSettings.Serialization.cs | 118 ++ .../RegistryEndpointAnonymousSettings.cs | 60 + ...tPullSecretAuthentication.Serialization.cs | 118 ++ ...ndpointArtifactPullSecretAuthentication.cs | 51 + ...rtifactPullSecretSettings.Serialization.cs | 126 ++ ...istryEndpointArtifactPullSecretSettings.cs | 75 + ...tryEndpointAuthentication.Serialization.cs | 120 ++ .../Models/RegistryEndpointAuthentication.cs | 69 + .../RegistryEndpointAuthenticationMethod.cs | 57 + ...egistryEndpointProperties.Serialization.cs | 164 ++ .../Models/RegistryEndpointProperties.cs | 112 ++ ...ndpointResourceListResult.Serialization.cs | 151 ++ .../RegistryEndpointResourceListResult.cs | 80 + ...nedIdentityAuthentication.Serialization.cs | 118 ++ ...intSystemAssignedIdentityAuthentication.cs | 56 + ...edManagedIdentitySettings.Serialization.cs | 129 ++ ...ntSystemAssignedManagedIdentitySettings.cs | 65 + ...ryEndpointTrustedSettings.Serialization.cs | 126 ++ .../Models/RegistryEndpointTrustedSettings.cs | 87 + ...EndpointTrustedSigningKey.Serialization.cs | 118 ++ .../RegistryEndpointTrustedSigningKey.cs | 69 + ...rustedSigningKeyConfigMap.Serialization.cs | 118 ++ ...istryEndpointTrustedSigningKeyConfigMap.cs | 45 + ...ntTrustedSigningKeySecret.Serialization.cs | 118 ++ ...RegistryEndpointTrustedSigningKeySecret.cs | 45 + .../RegistryEndpointTrustedSigningKeyType.cs | 51 + ...nedIdentityAuthentication.Serialization.cs | 118 ++ ...pointUserAssignedIdentityAuthentication.cs | 45 + ...edManagedIdentitySettings.Serialization.cs | 145 ++ ...ointUserAssignedManagedIdentitySettings.cs | 86 + .../SecretProviderClassRef.Serialization.cs | 126 ++ .../Models/SecretProviderClassRef.cs | 76 + ...nnectorTemplateAllocation.Serialization.cs | 110 ++ .../UnknownAkriConnectorTemplateAllocation.cs | 29 + ...plateHelmRegistrySettings.Serialization.cs | 110 ++ ...riConnectorTemplateHelmRegistrySettings.cs | 29 + ...agedConfigurationSettings.Serialization.cs | 217 +++ ...torTemplateManagedConfigurationSettings.cs | 42 + ...plateRuntimeConfiguration.Serialization.cs | 110 ++ ...riConnectorTemplateRuntimeConfiguration.cs | 29 + ...nectorsMqttAuthentication.Serialization.cs | 110 ++ ...UnknownAkriConnectorsMqttAuthentication.cs | 29 + ...onnectorsRegistrySettings.Serialization.cs | 110 ++ .../UnknownAkriConnectorsRegistrySettings.cs | 29 + ...nnectorsTagDigestSettings.Serialization.cs | 110 ++ .../UnknownAkriConnectorsTagDigestSettings.cs | 29 + ...iDiscoveryHandlerSchedule.Serialization.cs | 110 ++ .../UnknownAkriDiscoveryHandlerSchedule.cs | 29 + ...rokerRetainMessagesPolicy.Serialization.cs | 110 ++ .../UnknownBrokerRetainMessagesPolicy.cs | 29 + ...ownBrokerStateStorePolicy.Serialization.cs | 110 ++ .../Models/UnknownBrokerStateStorePolicy.cs | 29 + ...okerSubscriberQueuePolicy.Serialization.cs | 110 ++ .../UnknownBrokerSubscriberQueuePolicy.cs | 29 + .../UnknownDataflowGraphNode.Serialization.cs | 116 ++ .../Models/UnknownDataflowGraphNode.cs | 30 + ...enTelemetryAuthentication.Serialization.cs | 110 ++ ...nownDataflowOpenTelemetryAuthentication.cs | 29 + ...tryEndpointAuthentication.Serialization.cs | 110 ++ .../UnknownRegistryEndpointAuthentication.cs | 29 + ...EndpointTrustedSigningKey.Serialization.cs | 110 ++ ...nknownRegistryEndpointTrustedSigningKey.cs | 29 + ...ClaimResourceRequirements.Serialization.cs | 27 +- .../Models/VolumeClaimResourceRequirements.cs | 19 +- ...esourceRequirementsClaims.Serialization.cs | 126 ++ .../VolumeClaimResourceRequirementsClaims.cs | 75 + .../RegistryEndpointResource.Serialization.cs | 26 + .../src/Generated/RegistryEndpointResource.cs | 347 ++++ .../RegistryEndpointResourceCollection.cs | 493 ++++++ ...istryEndpointResourceData.Serialization.cs | 171 ++ .../Generated/RegistryEndpointResourceData.cs | 79 + .../AkriConnectorRestOperations.cs | 549 ++++++ .../AkriConnectorTemplateRestOperations.cs | 513 ++++++ .../AkriDiscoveryHandlerRestOperations.cs | 513 ++++++ .../BrokerAuthenticationRestOperations.cs | 2 +- .../BrokerAuthorizationRestOperations.cs | 2 +- .../BrokerListenerRestOperations.cs | 2 +- .../RestOperations/BrokerRestOperations.cs | 2 +- .../DataflowEndpointRestOperations.cs | 2 +- .../DataflowGraphRestOperations.cs | 549 ++++++ .../DataflowProfileRestOperations.cs | 2 +- .../RestOperations/DataflowRestOperations.cs | 2 +- .../RestOperations/InstanceRestOperations.cs | 2 +- .../RegistryEndpointRestOperations.cs | 513 ++++++ .../tsp-location.yaml | 3 +- sdk/storage/ci.yml | 2 + 388 files changed, 40897 insertions(+), 467 deletions(-) create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorResourceOperationSource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorTemplateResourceOperationSource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriDiscoveryHandlerResourceOperationSource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/DataflowGraphResourceOperationSource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/RegistryEndpointResourceOperationSource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocationPolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettingsType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfigurationType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullPolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthenticationMethod.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttProtocolType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettingsType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorValidationMethod.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistencePolicyMode.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreKeyType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEnpointHostType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSerializationFormat.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthenticationMethod.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeatureMode.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthenticationMethod.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyType.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceCollection.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.Serialization.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorRestOperations.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorTemplateRestOperations.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriDiscoveryHandlerRestOperations.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowGraphRestOperations.cs create mode 100644 sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/RegistryEndpointRestOperations.cs diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.net8.0.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.net8.0.cs index 07e03845afb4..d7550fcdf4bc 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.net8.0.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.net8.0.cs @@ -1,11 +1,206 @@ namespace Azure.ResourceManager.IotOperations { + public partial class AkriConnectorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AkriConnectorResource() { } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AkriConnectorResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AkriConnectorResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string akriConnectorName, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string akriConnectorName, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AkriConnectorResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? AkriConnectorProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AkriConnectorTemplateResource() { } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAkriConnectorResource(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAkriConnectorResourceAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorResourceCollection GetAkriConnectorResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AkriConnectorTemplateResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AkriConnectorTemplateResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string akriConnectorTemplateName, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string akriConnectorTemplateName, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AkriConnectorTemplateResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AkriDiscoveryHandlerResource() { } + public virtual Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AkriDiscoveryHandlerResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AkriDiscoveryHandlerResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string akriDiscoveryHandlerName, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string akriDiscoveryHandlerName, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AkriDiscoveryHandlerResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AzureResourceManagerIotOperationsContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureResourceManagerIotOperationsContext() { } public static Azure.ResourceManager.IotOperations.AzureResourceManagerIotOperationsContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class DataflowGraphResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataflowGraphResource() { } + public virtual Azure.ResourceManager.IotOperations.DataflowGraphResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataflowGraphResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataflowGraphResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dataflowGraphName, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dataflowGraphName, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataflowGraphResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class IotOperationsBrokerAuthenticationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected IotOperationsBrokerAuthenticationCollection() { } @@ -25,7 +220,7 @@ protected IotOperationsBrokerAuthenticationCollection() { } } public partial class IotOperationsBrokerAuthenticationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerAuthenticationData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerAuthenticationData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthenticationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -73,7 +268,7 @@ protected IotOperationsBrokerAuthorizationCollection() { } } public partial class IotOperationsBrokerAuthorizationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerAuthorizationData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerAuthorizationData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthorizationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -121,7 +316,7 @@ protected IotOperationsBrokerCollection() { } } public partial class IotOperationsBrokerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -150,7 +345,7 @@ protected IotOperationsBrokerListenerCollection() { } } public partial class IotOperationsBrokerListenerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerListenerData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerListenerData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerListenerProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -226,7 +421,7 @@ protected IotOperationsDataflowCollection() { } } public partial class IotOperationsDataflowData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsDataflowData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsDataflowData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -255,7 +450,7 @@ protected IotOperationsDataflowEndpointCollection() { } } public partial class IotOperationsDataflowEndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsDataflowEndpointData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsDataflowEndpointData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -303,7 +498,7 @@ protected IotOperationsDataflowProfileCollection() { } } public partial class IotOperationsDataflowProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsDataflowProfileData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsDataflowProfileData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProfileProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -324,6 +519,9 @@ protected IotOperationsDataflowProfileResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataflowGraphResource(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataflowGraphResourceAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.DataflowGraphResourceCollection GetDataflowGraphResources() { throw null; } public virtual Azure.Response GetIotOperationsDataflow(string dataflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIotOperationsDataflowAsync(string dataflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowCollection GetIotOperationsDataflows() { throw null; } @@ -356,6 +554,10 @@ protected IotOperationsDataflowResource() { } } public static partial class IotOperationsExtensions { + public static Azure.ResourceManager.IotOperations.AkriConnectorResource GetAkriConnectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriConnectorTemplateResource GetAkriConnectorTemplateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResource GetAkriDiscoveryHandlerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.IotOperations.DataflowGraphResource GetDataflowGraphResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthenticationResource GetIotOperationsBrokerAuthenticationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthorizationResource GetIotOperationsBrokerAuthorizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerListenerResource GetIotOperationsBrokerListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -369,6 +571,7 @@ public static partial class IotOperationsExtensions public static Azure.ResourceManager.IotOperations.IotOperationsInstanceCollection GetIotOperationsInstances(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetIotOperationsInstances(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetIotOperationsInstancesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.IotOperations.RegistryEndpointResource GetRegistryEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class IotOperationsInstanceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -412,6 +615,12 @@ protected IotOperationsInstanceResource() { } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAkriConnectorTemplateResource(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAkriConnectorTemplateResourceAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceCollection GetAkriConnectorTemplateResources() { throw null; } + public virtual Azure.Response GetAkriDiscoveryHandlerResource(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAkriDiscoveryHandlerResourceAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceCollection GetAkriDiscoveryHandlerResources() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIotOperationsBroker(string brokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIotOperationsBrokerAsync(string brokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -422,6 +631,9 @@ protected IotOperationsInstanceResource() { } public virtual Azure.Response GetIotOperationsDataflowProfile(string dataflowProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIotOperationsDataflowProfileAsync(string dataflowProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowProfileCollection GetIotOperationsDataflowProfiles() { throw null; } + public virtual Azure.Response GetRegistryEndpointResource(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRegistryEndpointResourceAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.RegistryEndpointResourceCollection GetRegistryEndpointResources() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -434,12 +646,64 @@ protected IotOperationsInstanceResource() { } public virtual Azure.Response Update(Azure.ResourceManager.IotOperations.Models.IotOperationsInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.IotOperations.Models.IotOperationsInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class RegistryEndpointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RegistryEndpointResource() { } + public virtual Azure.ResourceManager.IotOperations.RegistryEndpointResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class RegistryEndpointResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected RegistryEndpointResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string registryEndpointName, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string registryEndpointName, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class RegistryEndpointResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.IotOperations.Mocking { public partial class MockableIotOperationsArmClient : Azure.ResourceManager.ArmResource { protected MockableIotOperationsArmClient() { } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorResource GetAkriConnectorResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorTemplateResource GetAkriConnectorTemplateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResource GetAkriDiscoveryHandlerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.DataflowGraphResource GetDataflowGraphResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthenticationResource GetIotOperationsBrokerAuthenticationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthorizationResource GetIotOperationsBrokerAuthorizationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsBrokerListenerResource GetIotOperationsBrokerListenerResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -448,6 +712,7 @@ protected MockableIotOperationsArmClient() { } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowProfileResource GetIotOperationsDataflowProfileResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowResource GetIotOperationsDataflowResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsInstanceResource GetIotOperationsInstanceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.RegistryEndpointResource GetRegistryEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableIotOperationsResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -465,8 +730,607 @@ protected MockableIotOperationsSubscriptionResource() { } } namespace Azure.ResourceManager.IotOperations.Models { + public partial class AkriConnectorsContainerRegistry : Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsContainerRegistry(Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings containerRegistrySettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings ContainerRegistrySettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsContainerRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsContainerRegistrySettings(string registry) { } + public System.Collections.Generic.IList ImagePullSecrets { get { throw null; } } + public string Registry { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsDigest : Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsDigest(string digest) { } + public string Digest { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsDigest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsDigest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AkriConnectorsImagePullPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AkriConnectorsImagePullPolicy(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy Always { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy IfNotPresent { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy Never { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AkriConnectorsImagePullSecret : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsImagePullSecret(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullSecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullSecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorsMqttAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorsMqttAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsMqttConnectionConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsMqttConnectionConfiguration() { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication Authentication { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public int? KeepAliveSeconds { get { throw null; } set { } } + public int? MaxInflightMessages { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType? Protocol { get { throw null; } set { } } + public int? SessionExpirySeconds { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsTlsProperties Tls { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AkriConnectorsMqttProtocolType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AkriConnectorsMqttProtocolType(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType Mqtt { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AkriConnectorsRegistryEndpointRef : Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsRegistryEndpointRef(string registryEndpointRef) { } + public string RegistryEndpointRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistryEndpointRef System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistryEndpointRef System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorsRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorsRegistrySettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsSecret : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsSecret(string secretKey, string secretAlias, string secretRef) { } + public string SecretAlias { get { throw null; } set { } } + public string SecretKey { get { throw null; } set { } } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsSecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsSecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsServiceAccountAuthentication : Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsServiceAccountAuthentication(Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountTokenSettings serviceAccountTokenSettings) { } + public string ServiceAccountTokenAudience { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsServiceAccountTokenSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsServiceAccountTokenSettings(string audience) { } + public string Audience { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountTokenSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountTokenSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsTag : Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsTag(string tag) { } + public string Tag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorsTagDigestSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorsTagDigestSettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateAioMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateAioMetadata() { } + public string AioMaxVersion { get { throw null; } set { } } + public string AioMinVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateAllocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateAllocation() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateBucketizedAllocation : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateBucketizedAllocation(int bucketSize) { } + public int BucketSize { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateBucketizedAllocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateBucketizedAllocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs() { } + public string AdditionalConfigSchemaRef { get { throw null; } set { } } + public string DefaultDatasetConfigSchemaRef { get { throw null; } set { } } + public string DefaultEventsConfigSchemaRef { get { throw null; } set { } } + public string DefaultProcessControlConfigSchemaRef { get { throw null; } set { } } + public string DefaultStreamsConfigSchemaRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateDeviceInboundEndpointType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateDeviceInboundEndpointType(string endpointType, string version) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs ConfigurationSchemaRefs { get { throw null; } set { } } + public string EndpointType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmAdvancedConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmAdvancedConfiguration() { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmDeleteConfiguration Delete { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmInstallConfiguration Install { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmUpgradeConfiguration Upgrade { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAdvancedConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAdvancedConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmAuthSecretRef : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmAuthSecretRef(string secretRef, string passwordKey, string usernameKey) { } + public string PasswordKey { get { throw null; } set { } } + public string SecretRef { get { throw null; } set { } } + public string UsernameKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAuthSecretRef System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAuthSecretRef System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmConfiguration(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings helmConfigurationSettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings HelmConfigurationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmConfigurationSettings(string releaseName, string version) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAdvancedConfiguration AdvancedConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings RegistrySettings { get { throw null; } set { } } + public string ReleaseName { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Values { get { throw null; } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmContainerRegistry : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmContainerRegistry(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings containerRegistrySettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings ContainerRegistrySettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmContainerRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmContainerRegistrySettings(string registry, string repository) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAuthSecretRef AuthSecretRef { get { throw null; } set { } } + public string Registry { get { throw null; } set { } } + public string Repository { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmDeleteConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmDeleteConfiguration() { } + public bool? Atomic { get { throw null; } set { } } + public bool? DisableHooks { get { throw null; } set { } } + public int? Timeout { get { throw null; } set { } } + public bool? Wait { get { throw null; } set { } } + public bool? WaitForJobs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmDeleteConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmDeleteConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmInstallConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmInstallConfiguration() { } + public bool? Atomic { get { throw null; } set { } } + public bool? DisableHooks { get { throw null; } set { } } + public int? Timeout { get { throw null; } set { } } + public bool? Wait { get { throw null; } set { } } + public bool? WaitForJobs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmInstallConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmInstallConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmRegistryEndpointRef : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmRegistryEndpointRef(string registryEndpointRef) { } + public string RegistryEndpointRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistryEndpointRef System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistryEndpointRef System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateHelmRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateHelmRegistrySettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmUpgradeConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmUpgradeConfiguration() { } + public bool? Atomic { get { throw null; } set { } } + public bool? DisableHooks { get { throw null; } set { } } + public int? Timeout { get { throw null; } set { } } + public bool? Wait { get { throw null; } set { } } + public bool? WaitForJobs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmUpgradeConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmUpgradeConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateManagedConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateManagedConfiguration(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings managedConfigurationSettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings ManagedConfigurationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateManagedConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateManagedConfigurationSettings() { } + public System.Collections.Generic.IDictionary AdditionalConfiguration { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation Allocation { get { throw null; } set { } } + public System.Collections.Generic.IList PersistentVolumeClaims { get { throw null; } } + public System.Collections.Generic.IList> PersistentVolumeClaimTemplates { get { throw null; } } + public System.Collections.Generic.IList Secrets { get { throw null; } } + public string TrustListSecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplatePersistentVolumeClaim : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplatePersistentVolumeClaim(string claimName, string mountPath) { } + public string ClaimName { get { throw null; } set { } } + public string MountPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplatePersistentVolumeClaim System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplatePersistentVolumeClaim System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateProperties(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration, System.Collections.Generic.IEnumerable deviceInboundEndpointTypes) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata AioMetadata { get { throw null; } set { } } + public System.Collections.Generic.IList DeviceInboundEndpointTypes { get { throw null; } } + public string DiagnosticsLevel { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration MqttConnectionConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration RuntimeConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateRuntimeConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateRuntimeConfiguration() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateRuntimeImageConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateRuntimeImageConfiguration(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings imageConfigurationSettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings ImageConfigurationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateRuntimeImageConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateRuntimeImageConfigurationSettings(string imageName) { } + public string ImageName { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy? ImagePullPolicy { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings RegistrySettings { get { throw null; } set { } } + public int? Replicas { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings TagDigestSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateRuntimeStatefulSetConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateRuntimeStatefulSetConfiguration(System.Collections.Generic.IDictionary statefulSetConfigurationSettings) { } + public System.Collections.Generic.IDictionary StatefulSetConfigurationSettings { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeStatefulSetConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeStatefulSetConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerAioMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerAioMetadata() { } + public string AioMaxVersion { get { throw null; } set { } } + public string AioMinVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerDiscoverableDeviceEndpointType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerDiscoverableDeviceEndpointType(string endpointType, string version) { } + public string EndpointType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerDiscoverableDeviceEndpointType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerDiscoverableDeviceEndpointType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerImageConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerImageConfiguration(string imageName) { } + public string ImageName { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy? ImagePullPolicy { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings RegistrySettings { get { throw null; } set { } } + public int? Replicas { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings TagDigestSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerProperties(System.Collections.Generic.IEnumerable discoverableDeviceEndpointTypes, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration imageConfiguration, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule schedule) { } + public System.Collections.Generic.IDictionary AdditionalConfiguration { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata AioMetadata { get { throw null; } set { } } + public string DiagnosticsLevel { get { throw null; } set { } } + public System.Collections.Generic.IList DiscoverableDeviceEndpointTypes { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration ImageConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? Mode { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration MqttConnectionConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule Schedule { get { throw null; } set { } } + public System.Collections.Generic.IList Secrets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriDiscoveryHandlerSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriDiscoveryHandlerSchedule() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerScheduleContinuous : Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerScheduleContinuous(string continuous) { } + public string Continuous { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleContinuous System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleContinuous System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerScheduleCron : Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerScheduleCron(string cron) { } + public string Cron { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleCron System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleCron System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerScheduleRunOnce : Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerScheduleRunOnce(string runOnce) { } + public string RunOnce { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleRunOnce System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleRunOnce System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public static partial class ArmIotOperationsModelFactory { + public static Azure.ResourceManager.IotOperations.AkriConnectorResourceData AkriConnectorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? akriConnectorProvisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties AkriConnectorTemplateProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata aioMetadata = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration = null, string diagnosticsLevel = null, System.Collections.Generic.IEnumerable deviceInboundEndpointTypes = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = null) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData AkriConnectorTemplateResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties AkriDiscoveryHandlerProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata aioMetadata = null, System.Collections.Generic.IDictionary additionalConfiguration = null, string diagnosticsLevel = null, Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? mode = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), System.Collections.Generic.IEnumerable discoverableDeviceEndpointTypes = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = null, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration imageConfiguration = null, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule schedule = null, System.Collections.Generic.IEnumerable secrets = null) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData AkriDiscoveryHandlerResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties DataflowGraphProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? mode = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? requestDiskPersistence = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), System.Collections.Generic.IEnumerable nodes = null, System.Collections.Generic.IEnumerable nodeConnections = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } + public static Azure.ResourceManager.IotOperations.DataflowGraphResourceData DataflowGraphResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthenticationData IotOperationsBrokerAuthenticationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthenticationProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthenticationProperties IotOperationsBrokerAuthenticationProperties(System.Collections.Generic.IEnumerable authenticationMethods = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthorizationData IotOperationsBrokerAuthorizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthorizationProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } @@ -474,15 +1338,17 @@ public static partial class ArmIotOperationsModelFactory public static Azure.ResourceManager.IotOperations.IotOperationsBrokerData IotOperationsBrokerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerListenerData IotOperationsBrokerListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerListenerProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerListenerProperties IotOperationsBrokerListenerProperties(string serviceName = null, System.Collections.Generic.IEnumerable ports = null, Azure.ResourceManager.IotOperations.Models.BlockerListenerServiceType? serviceType = default(Azure.ResourceManager.IotOperations.Models.BlockerListenerServiceType?), Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } - public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties IotOperationsBrokerProperties(Azure.ResourceManager.IotOperations.Models.BrokerAdvancedSettings advanced = null, Azure.ResourceManager.IotOperations.Models.BrokerCardinality cardinality = null, Azure.ResourceManager.IotOperations.Models.BrokerDiagnostics diagnostics = null, Azure.ResourceManager.IotOperations.Models.DiskBackedMessageBuffer diskBackedMessageBuffer = null, Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? generateResourceLimitsCpu = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile? memoryProfile = default(Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile?), Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties IotOperationsBrokerProperties(Azure.ResourceManager.IotOperations.Models.BrokerAdvancedSettings advanced = null, Azure.ResourceManager.IotOperations.Models.BrokerCardinality cardinality = null, Azure.ResourceManager.IotOperations.Models.BrokerDiagnostics diagnostics = null, Azure.ResourceManager.IotOperations.Models.DiskBackedMessageBuffer diskBackedMessageBuffer = null, Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? generateResourceLimitsCpu = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile? memoryProfile = default(Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile?), Azure.ResourceManager.IotOperations.Models.BrokerPersistence persistence = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsDataflowData IotOperationsDataflowData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsDataflowEndpointData IotOperationsDataflowEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } - public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties IotOperationsDataflowEndpointProperties(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType endpointType = default(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType), Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataExplorer dataExplorerSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataLakeStorage dataLakeStorageSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointFabricOneLake fabricOneLakeSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointKafka kafkaSettings = null, string localStoragePersistentVolumeClaimRef = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointMqtt mqttSettings = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties IotOperationsDataflowEndpointProperties(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType endpointType = default(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType), Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType? hostType = default(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType?), Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataExplorer dataExplorerSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataLakeStorage dataLakeStorageSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointFabricOneLake fabricOneLakeSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointKafka kafkaSettings = null, string localStoragePersistentVolumeClaimRef = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointMqtt mqttSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry openTelemetrySettings = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsDataflowProfileData IotOperationsDataflowProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProfileProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProfileProperties IotOperationsDataflowProfileProperties(Azure.ResourceManager.IotOperations.Models.DataflowProfileDiagnostics diagnostics = null, int? instanceCount = default(int?), Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProperties IotOperationsDataflowProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? mode = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), System.Collections.Generic.IEnumerable operations = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsInstanceData IotOperationsInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.IotOperations.Models.IotOperationsInstanceProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.IotOperations.Models.IotOperationsInstanceProperties IotOperationsInstanceProperties(string description = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), string version = null, Azure.Core.ResourceIdentifier schemaRegistryRefResourceId = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.IotOperationsInstanceProperties IotOperationsInstanceProperties(string description = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), string version = null, Azure.Core.ResourceIdentifier schemaRegistryRefResourceId = null, Azure.Core.ResourceIdentifier defaultSecretProviderClassRefResourceId = null, System.Collections.Generic.IDictionary features = null, Azure.Core.ResourceIdentifier adrNamespaceRefResourceId = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties RegistryEndpointProperties(string host = null, Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication authentication = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey trustTrustedSigningKeys = null) { throw null; } + public static Azure.ResourceManager.IotOperations.RegistryEndpointResourceData RegistryEndpointResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BlockerListenerServiceType : System.IEquatable @@ -566,6 +1432,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class BrokerAuthenticatorMethodX509 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BrokerAuthenticatorMethodX509() { } + public Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod? AdditionalValidation { get { throw null; } set { } } public System.Collections.Generic.IDictionary AuthorizationAttributes { get { throw null; } } public string TrustedClientCaCert { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -587,6 +1454,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BrokerAuthenticatorValidationMethod : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BrokerAuthenticatorValidationMethod(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod AzureDeviceRegistry { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod None { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod left, Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod left, Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod right) { throw null; } + public override string ToString() { throw null; } + } public partial class BrokerAuthorizationConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BrokerAuthorizationConfig() { } @@ -762,6 +1647,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.BrokerOperatorValue left, Azure.ResourceManager.IotOperations.Models.BrokerOperatorValue right) { throw null; } public override string ToString() { throw null; } } + public partial class BrokerPersistence : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerPersistence(string maxSize) { } + public Azure.ResourceManager.IotOperations.Models.BrokerPersistenceDynamicSettings DynamicSettings { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? EncryptionMode { get { throw null; } set { } } + public string MaxSize { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.VolumeClaimSpec PersistentVolumeClaimSpec { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy Retain { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy StateStore { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy SubscriberQueue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerPersistenceDynamicSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerPersistenceDynamicSettings(string userPropertyKey, string userPropertyValue) { } + public string UserPropertyKey { get { throw null; } set { } } + public string UserPropertyValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistenceDynamicSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistenceDynamicSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BrokerProtocolType : System.IEquatable { @@ -812,6 +1726,137 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class BrokerRetainMessagesCustomPolicy : Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerRetainMessagesCustomPolicy(Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings retainSettings) { } + public Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings RetainSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesCustomPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesCustomPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class BrokerRetainMessagesPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BrokerRetainMessagesPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerRetainMessagesSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerRetainMessagesSettings() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? DynamicMode { get { throw null; } set { } } + public System.Collections.Generic.IList Topics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerStateStoreCustomPolicy : Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerStateStoreCustomPolicy(Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings stateStoreSettings) { } + public Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings StateStoreSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStoreCustomPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStoreCustomPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BrokerStateStoreKeyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BrokerStateStoreKeyType(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType Binary { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType Pattern { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType left, Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType left, Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class BrokerStateStorePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BrokerStateStorePolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerStateStorePolicyResources : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerStateStorePolicyResources(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType keyType, System.Collections.Generic.IEnumerable keys) { } + public System.Collections.Generic.IList Keys { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType KeyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicyResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicyResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerStateStorePolicySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerStateStorePolicySettings() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? DynamicMode { get { throw null; } set { } } + public System.Collections.Generic.IList StateStoreResources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerSubscriberQueueCustomPolicy : Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerSubscriberQueueCustomPolicy(Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings subscriberQueueSettings) { } + public Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings SubscriberQueueSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerSubscriberQueueCustomPolicySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerSubscriberQueueCustomPolicySettings() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? DynamicMode { get { throw null; } set { } } + public System.Collections.Generic.IList SubscriberClientIds { get { throw null; } } + public System.Collections.Generic.IList Topics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class BrokerSubscriberQueuePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BrokerSubscriberQueuePolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CertManagerCertConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CertManagerCertConfig(string duration, string renewBefore, Azure.ResourceManager.IotOperations.Models.CertManagerPrivateKey privateKey) { } @@ -920,6 +1965,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataExplorerAuthMethod left, Azure.ResourceManager.IotOperations.Models.DataExplorerAuthMethod right) { throw null; } public override string ToString() { throw null; } } + public partial class DatafloGraphDestinationNode : Azure.ResourceManager.IotOperations.Models.DataflowGraphNode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatafloGraphDestinationNode(string name, Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings destinationSettings) : base (default(string)) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings DestinationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DatafloGraphDestinationNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DatafloGraphDestinationNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowBuiltInTransformationDataset : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowBuiltInTransformationDataset(string key, System.Collections.Generic.IEnumerable inputs) { } @@ -991,6 +2047,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataflowEndpointAuthenticationAnonymous : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointAuthenticationAnonymous() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowEndpointAuthenticationSasl : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowEndpointAuthenticationSasl(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationSaslType saslType, string secretRef) { } @@ -1022,6 +2088,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationSaslType left, Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationSaslType right) { throw null; } public override string ToString() { throw null; } } + public partial class DataflowEndpointAuthenticationServiceAccountToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointAuthenticationServiceAccountToken(string audience) { } + public string Audience { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationServiceAccountToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationServiceAccountToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowEndpointAuthenticationUserAssignedManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowEndpointAuthenticationUserAssignedManagedIdentity(string clientId, string tenantId) { } @@ -1035,6 +2112,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataflowEndpointAuthenticationX509 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointAuthenticationX509(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationX509 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationX509 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowEndpointDataExplorer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowEndpointDataExplorer(Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataExplorerAuthentication authentication, string database, string host) { } @@ -1291,6 +2379,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataflowEndpointOpenTelemetry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointOpenTelemetry(string host, Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication authentication) { } + public Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication Authentication { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsBatchingConfig Batching { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsTlsProperties Tls { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataflowEndpointType : System.IEquatable { @@ -1303,6 +2405,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType Kafka { get { throw null; } } public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType LocalStorage { get { throw null; } } public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType Mqtt { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType OpenTelemetry { get { throw null; } } public bool Equals(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1314,6 +2417,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataflowEnpointHostType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataflowEnpointHostType(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType CustomKafka { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType CustomMqtt { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType EventGrid { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType Eventhub { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType FabricRT { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType LocalBroker { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType left, Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType left, Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataflowFilterType : System.IEquatable { private readonly object _dummy; @@ -1330,6 +2455,171 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowFilterType left, Azure.ResourceManager.IotOperations.Models.DataflowFilterType right) { throw null; } public override string ToString() { throw null; } } + public partial class DataflowGraphConnectionInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphConnectionInput(string name) { } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings Schema { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphConnectionOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphConnectionOutput(string name) { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphDestinationNodeSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphDestinationNodeSettings(string endpointRef, string dataDestination) { } + public string DataDestination { get { throw null; } set { } } + public string EndpointRef { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings OutputSchemaSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphGraphNode : Azure.ResourceManager.IotOperations.Models.DataflowGraphNode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphGraphNode(string name, Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings graphSettings) : base (default(string)) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings GraphSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphGraphNodeConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphGraphNodeConfiguration(string key, string value) { } + public string Key { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNodeConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNodeConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataflowGraphNode : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataflowGraphNode(string name) { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphNodeConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphNodeConnection(Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput from, Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionOutput to) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput From { get { throw null; } set { } } + public string ToName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphNodeGraphSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphNodeGraphSettings(string registryEndpointRef, string artifact) { } + public string Artifact { get { throw null; } set { } } + public System.Collections.Generic.IList Configuration { get { throw null; } } + public string RegistryEndpointRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphProperties(System.Collections.Generic.IEnumerable nodes, System.Collections.Generic.IEnumerable nodeConnections) { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IList NodeConnections { get { throw null; } } + public System.Collections.Generic.IList Nodes { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? RequestDiskPersistence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphSchemaSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphSchemaSettings(string schemaRef) { } + public string SchemaRef { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat? SerializationFormat { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataflowGraphSerializationFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataflowGraphSerializationFormat(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Avro { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Delta { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Json { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Parquet { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat left, Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat left, Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataflowGraphSourceNode : Azure.ResourceManager.IotOperations.Models.DataflowGraphNode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphSourceNode(string name, Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings sourceSettings) : base (default(string)) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings SourceSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphSourceSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphSourceSettings(string endpointRef, System.Collections.Generic.IEnumerable dataSources) { } + public System.Collections.Generic.IList DataSources { get { throw null; } } + public string EndpointRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataflowMappingType : System.IEquatable { @@ -1351,6 +2641,49 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowMappingType left, Azure.ResourceManager.IotOperations.Models.DataflowMappingType right) { throw null; } public override string ToString() { throw null; } } + public partial class DataflowOpenTelemetryAnonymousAuthentication : Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowOpenTelemetryAnonymousAuthentication(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous anonymousSettings) { } + public Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous AnonymousSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAnonymousAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAnonymousAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataflowOpenTelemetryAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataflowOpenTelemetryAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowOpenTelemetryServiceAccountAuthentication : Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowOpenTelemetryServiceAccountAuthentication(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationServiceAccountToken serviceAccountTokenSettings) { } + public string ServiceAccountTokenAudience { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryServiceAccountAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryServiceAccountAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowOpenTelemetryX509CertificateAuthentication : Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowOpenTelemetryX509CertificateAuthentication(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationX509 x509CertificateSettings) { } + public string X509CertificateSecretRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryX509CertificateAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryX509CertificateAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowOperationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowOperationProperties(Azure.ResourceManager.IotOperations.Models.DataflowOperationType operationType) { } @@ -1491,6 +2824,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.FabricOneLakeAuthMethod left, Azure.ResourceManager.IotOperations.Models.FabricOneLakeAuthMethod right) { throw null; } public override string ToString() { throw null; } } + public partial class InstanceFeature : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InstanceFeature() { } + public Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Settings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.InstanceFeature System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.InstanceFeature System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InstanceFeatureMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceFeatureMode(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode Disabled { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode Preview { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode Stable { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode left, Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode left, Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class IotOperationsBatchingConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IotOperationsBatchingConfig() { } @@ -1550,6 +2914,7 @@ public IotOperationsBrokerProperties() { } public Azure.ResourceManager.IotOperations.Models.DiskBackedMessageBuffer DiskBackedMessageBuffer { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? GenerateResourceLimitsCpu { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile? MemoryProfile { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerPersistence Persistence { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1565,9 +2930,11 @@ public IotOperationsDataflowEndpointProperties(Azure.ResourceManager.IotOperatio public Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataLakeStorage DataLakeStorageSettings { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointType EndpointType { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointFabricOneLake FabricOneLakeSettings { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType? HostType { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointKafka KafkaSettings { get { throw null; } set { } } public string LocalStoragePersistentVolumeClaimRef { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointMqtt MqttSettings { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry OpenTelemetrySettings { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1646,7 +3013,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class IotOperationsInstanceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IotOperationsInstanceProperties(Azure.ResourceManager.IotOperations.Models.SchemaRegistryRef schemaRegistryRef) { } + public Azure.Core.ResourceIdentifier AdrNamespaceRefResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DefaultSecretProviderClassRefResourceId { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Features { get { throw null; } } public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SchemaRegistryRefResourceId { get { throw null; } set { } } public string Version { get { throw null; } } @@ -1864,6 +3234,151 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.PrivateKeyRotationPolicy left, Azure.ResourceManager.IotOperations.Models.PrivateKeyRotationPolicy right) { throw null; } public override string ToString() { throw null; } } + public partial class RegistryEndpointAnonymousAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointAnonymousAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings anonymousSettings) { } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings AnonymousSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointAnonymousSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointAnonymousSettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointArtifactPullSecretAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointArtifactPullSecretAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretSettings artifactPullSecretSettings) { } + public string SecretRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointArtifactPullSecretSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointArtifactPullSecretSettings(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class RegistryEndpointAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected RegistryEndpointAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointProperties(string host, Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication authentication) { } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication Authentication { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey TrustTrustedSigningKeys { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointSystemAssignedIdentityAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointSystemAssignedIdentityAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedManagedIdentitySettings systemAssignedManagedIdentitySettings) { } + public string SystemAssignedManagedIdentityAudience { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedIdentityAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedIdentityAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointSystemAssignedManagedIdentitySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointSystemAssignedManagedIdentitySettings() { } + public string Audience { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedManagedIdentitySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedManagedIdentitySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class RegistryEndpointTrustedSigningKey : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected RegistryEndpointTrustedSigningKey() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointTrustedSigningKeyConfigMap : Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointTrustedSigningKeyConfigMap(string configMapRef) { } + public string ConfigMapRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeyConfigMap System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeyConfigMap System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointTrustedSigningKeySecret : Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointTrustedSigningKeySecret(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeySecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeySecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointUserAssignedIdentityAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointUserAssignedIdentityAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings userAssignedManagedIdentitySettings) { } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings UserAssignedManagedIdentitySettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedIdentityAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedIdentityAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointUserAssignedManagedIdentitySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointUserAssignedManagedIdentitySettings(string clientId, string tenantId) { } + public string ClientId { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + public string TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SanForCert : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SanForCert(System.Collections.Generic.IEnumerable dns, System.Collections.Generic.IEnumerable ip) { } @@ -2008,6 +3523,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class VolumeClaimResourceRequirements : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VolumeClaimResourceRequirements() { } + public System.Collections.Generic.IList Claims { get { throw null; } } public System.Collections.Generic.IDictionary Limits { get { throw null; } } public System.Collections.Generic.IDictionary Requests { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2017,6 +3533,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VolumeClaimResourceRequirementsClaims : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VolumeClaimResourceRequirementsClaims(string name) { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.VolumeClaimResourceRequirementsClaims System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.VolumeClaimResourceRequirementsClaims System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VolumeClaimSpec : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VolumeClaimSpec() { } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.netstandard2.0.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.netstandard2.0.cs index 07e03845afb4..d7550fcdf4bc 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.netstandard2.0.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/api/Azure.ResourceManager.IotOperations.netstandard2.0.cs @@ -1,11 +1,206 @@ namespace Azure.ResourceManager.IotOperations { + public partial class AkriConnectorResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AkriConnectorResource() { } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AkriConnectorResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AkriConnectorResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string akriConnectorName, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string akriConnectorName, Azure.ResourceManager.IotOperations.AkriConnectorResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AkriConnectorResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? AkriConnectorProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AkriConnectorTemplateResource() { } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAkriConnectorResource(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAkriConnectorResourceAsync(string akriConnectorName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorResourceCollection GetAkriConnectorResources() { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AkriConnectorTemplateResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AkriConnectorTemplateResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string akriConnectorTemplateName, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string akriConnectorTemplateName, Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AkriConnectorTemplateResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AkriDiscoveryHandlerResource() { } + public virtual Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AkriDiscoveryHandlerResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AkriDiscoveryHandlerResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string akriDiscoveryHandlerName, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string akriDiscoveryHandlerName, Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class AkriDiscoveryHandlerResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AzureResourceManagerIotOperationsContext : System.ClientModel.Primitives.ModelReaderWriterContext { internal AzureResourceManagerIotOperationsContext() { } public static Azure.ResourceManager.IotOperations.AzureResourceManagerIotOperationsContext Default { get { throw null; } } protected override bool TryGetTypeBuilderCore(System.Type type, out System.ClientModel.Primitives.ModelReaderWriterTypeBuilder builder) { throw null; } } + public partial class DataflowGraphResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected DataflowGraphResource() { } + public virtual Azure.ResourceManager.IotOperations.DataflowGraphResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class DataflowGraphResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected DataflowGraphResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string dataflowGraphName, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string dataflowGraphName, Azure.ResourceManager.IotOperations.DataflowGraphResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class DataflowGraphResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.DataflowGraphResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class IotOperationsBrokerAuthenticationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected IotOperationsBrokerAuthenticationCollection() { } @@ -25,7 +220,7 @@ protected IotOperationsBrokerAuthenticationCollection() { } } public partial class IotOperationsBrokerAuthenticationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerAuthenticationData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerAuthenticationData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthenticationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -73,7 +268,7 @@ protected IotOperationsBrokerAuthorizationCollection() { } } public partial class IotOperationsBrokerAuthorizationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerAuthorizationData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerAuthorizationData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthorizationProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -121,7 +316,7 @@ protected IotOperationsBrokerCollection() { } } public partial class IotOperationsBrokerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -150,7 +345,7 @@ protected IotOperationsBrokerListenerCollection() { } } public partial class IotOperationsBrokerListenerData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsBrokerListenerData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsBrokerListenerData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerListenerProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -226,7 +421,7 @@ protected IotOperationsDataflowCollection() { } } public partial class IotOperationsDataflowData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsDataflowData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsDataflowData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -255,7 +450,7 @@ protected IotOperationsDataflowEndpointCollection() { } } public partial class IotOperationsDataflowEndpointData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsDataflowEndpointData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsDataflowEndpointData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -303,7 +498,7 @@ protected IotOperationsDataflowProfileCollection() { } } public partial class IotOperationsDataflowProfileData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public IotOperationsDataflowProfileData(Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation) { } + public IotOperationsDataflowProfileData() { } public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProfileProperties Properties { get { throw null; } set { } } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -324,6 +519,9 @@ protected IotOperationsDataflowProfileResource() { } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetDataflowGraphResource(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetDataflowGraphResourceAsync(string dataflowGraphName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.DataflowGraphResourceCollection GetDataflowGraphResources() { throw null; } public virtual Azure.Response GetIotOperationsDataflow(string dataflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIotOperationsDataflowAsync(string dataflowName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowCollection GetIotOperationsDataflows() { throw null; } @@ -356,6 +554,10 @@ protected IotOperationsDataflowResource() { } } public static partial class IotOperationsExtensions { + public static Azure.ResourceManager.IotOperations.AkriConnectorResource GetAkriConnectorResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriConnectorTemplateResource GetAkriConnectorTemplateResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResource GetAkriDiscoveryHandlerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.IotOperations.DataflowGraphResource GetDataflowGraphResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthenticationResource GetIotOperationsBrokerAuthenticationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthorizationResource GetIotOperationsBrokerAuthorizationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerListenerResource GetIotOperationsBrokerListenerResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -369,6 +571,7 @@ public static partial class IotOperationsExtensions public static Azure.ResourceManager.IotOperations.IotOperationsInstanceCollection GetIotOperationsInstances(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetIotOperationsInstances(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetIotOperationsInstancesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.IotOperations.RegistryEndpointResource GetRegistryEndpointResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class IotOperationsInstanceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -412,6 +615,12 @@ protected IotOperationsInstanceResource() { } public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetAkriConnectorTemplateResource(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAkriConnectorTemplateResourceAsync(string akriConnectorTemplateName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceCollection GetAkriConnectorTemplateResources() { throw null; } + public virtual Azure.Response GetAkriDiscoveryHandlerResource(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAkriDiscoveryHandlerResourceAsync(string akriDiscoveryHandlerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceCollection GetAkriDiscoveryHandlerResources() { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetIotOperationsBroker(string brokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIotOperationsBrokerAsync(string brokerName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -422,6 +631,9 @@ protected IotOperationsInstanceResource() { } public virtual Azure.Response GetIotOperationsDataflowProfile(string dataflowProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetIotOperationsDataflowProfileAsync(string dataflowProfileName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowProfileCollection GetIotOperationsDataflowProfiles() { throw null; } + public virtual Azure.Response GetRegistryEndpointResource(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetRegistryEndpointResourceAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.IotOperations.RegistryEndpointResourceCollection GetRegistryEndpointResources() { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -434,12 +646,64 @@ protected IotOperationsInstanceResource() { } public virtual Azure.Response Update(Azure.ResourceManager.IotOperations.Models.IotOperationsInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.IotOperations.Models.IotOperationsInstancePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class RegistryEndpointResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected RegistryEndpointResource() { } + public virtual Azure.ResourceManager.IotOperations.RegistryEndpointResourceData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class RegistryEndpointResourceCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected RegistryEndpointResourceCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string registryEndpointName, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string registryEndpointName, Azure.ResourceManager.IotOperations.RegistryEndpointResourceData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string registryEndpointName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class RegistryEndpointResourceData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointResourceData() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation ExtendedLocation { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties Properties { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.RegistryEndpointResourceData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.IotOperations.Mocking { public partial class MockableIotOperationsArmClient : Azure.ResourceManager.ArmResource { protected MockableIotOperationsArmClient() { } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorResource GetAkriConnectorResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriConnectorTemplateResource GetAkriConnectorTemplateResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResource GetAkriDiscoveryHandlerResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.DataflowGraphResource GetDataflowGraphResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthenticationResource GetIotOperationsBrokerAuthenticationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthorizationResource GetIotOperationsBrokerAuthorizationResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsBrokerListenerResource GetIotOperationsBrokerListenerResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -448,6 +712,7 @@ protected MockableIotOperationsArmClient() { } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowProfileResource GetIotOperationsDataflowProfileResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsDataflowResource GetIotOperationsDataflowResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.IotOperations.IotOperationsInstanceResource GetIotOperationsInstanceResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.IotOperations.RegistryEndpointResource GetRegistryEndpointResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableIotOperationsResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -465,8 +730,607 @@ protected MockableIotOperationsSubscriptionResource() { } } namespace Azure.ResourceManager.IotOperations.Models { + public partial class AkriConnectorsContainerRegistry : Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsContainerRegistry(Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings containerRegistrySettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings ContainerRegistrySettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsContainerRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsContainerRegistrySettings(string registry) { } + public System.Collections.Generic.IList ImagePullSecrets { get { throw null; } } + public string Registry { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsContainerRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsDigest : Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsDigest(string digest) { } + public string Digest { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsDigest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsDigest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AkriConnectorsImagePullPolicy : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AkriConnectorsImagePullPolicy(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy Always { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy IfNotPresent { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy Never { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AkriConnectorsImagePullSecret : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsImagePullSecret(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullSecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullSecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorsMqttAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorsMqttAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsMqttConnectionConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsMqttConnectionConfiguration() { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication Authentication { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public int? KeepAliveSeconds { get { throw null; } set { } } + public int? MaxInflightMessages { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType? Protocol { get { throw null; } set { } } + public int? SessionExpirySeconds { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsTlsProperties Tls { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AkriConnectorsMqttProtocolType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AkriConnectorsMqttProtocolType(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType Mqtt { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType left, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttProtocolType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class AkriConnectorsRegistryEndpointRef : Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsRegistryEndpointRef(string registryEndpointRef) { } + public string RegistryEndpointRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistryEndpointRef System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistryEndpointRef System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorsRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorsRegistrySettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsSecret : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsSecret(string secretKey, string secretAlias, string secretRef) { } + public string SecretAlias { get { throw null; } set { } } + public string SecretKey { get { throw null; } set { } } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsSecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsSecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsServiceAccountAuthentication : Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsServiceAccountAuthentication(Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountTokenSettings serviceAccountTokenSettings) { } + public string ServiceAccountTokenAudience { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsServiceAccountTokenSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsServiceAccountTokenSettings(string audience) { } + public string Audience { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountTokenSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsServiceAccountTokenSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorsTag : Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorsTag(string tag) { } + public string Tag { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTag System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTag System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorsTagDigestSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorsTagDigestSettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateAioMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateAioMetadata() { } + public string AioMaxVersion { get { throw null; } set { } } + public string AioMinVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateAllocation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateAllocation() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateBucketizedAllocation : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateBucketizedAllocation(int bucketSize) { } + public int BucketSize { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateBucketizedAllocation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateBucketizedAllocation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs() { } + public string AdditionalConfigSchemaRef { get { throw null; } set { } } + public string DefaultDatasetConfigSchemaRef { get { throw null; } set { } } + public string DefaultEventsConfigSchemaRef { get { throw null; } set { } } + public string DefaultProcessControlConfigSchemaRef { get { throw null; } set { } } + public string DefaultStreamsConfigSchemaRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateDeviceInboundEndpointType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateDeviceInboundEndpointType(string endpointType, string version) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs ConfigurationSchemaRefs { get { throw null; } set { } } + public string EndpointType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateDeviceInboundEndpointType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmAdvancedConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmAdvancedConfiguration() { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmDeleteConfiguration Delete { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmInstallConfiguration Install { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmUpgradeConfiguration Upgrade { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAdvancedConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAdvancedConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmAuthSecretRef : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmAuthSecretRef(string secretRef, string passwordKey, string usernameKey) { } + public string PasswordKey { get { throw null; } set { } } + public string SecretRef { get { throw null; } set { } } + public string UsernameKey { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAuthSecretRef System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAuthSecretRef System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmConfiguration(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings helmConfigurationSettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings HelmConfigurationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmConfigurationSettings(string releaseName, string version) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAdvancedConfiguration AdvancedConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings RegistrySettings { get { throw null; } set { } } + public string ReleaseName { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Values { get { throw null; } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmContainerRegistry : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmContainerRegistry(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings containerRegistrySettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings ContainerRegistrySettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmContainerRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmContainerRegistrySettings(string registry, string repository) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmAuthSecretRef AuthSecretRef { get { throw null; } set { } } + public string Registry { get { throw null; } set { } } + public string Repository { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmContainerRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmDeleteConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmDeleteConfiguration() { } + public bool? Atomic { get { throw null; } set { } } + public bool? DisableHooks { get { throw null; } set { } } + public int? Timeout { get { throw null; } set { } } + public bool? Wait { get { throw null; } set { } } + public bool? WaitForJobs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmDeleteConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmDeleteConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmInstallConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmInstallConfiguration() { } + public bool? Atomic { get { throw null; } set { } } + public bool? DisableHooks { get { throw null; } set { } } + public int? Timeout { get { throw null; } set { } } + public bool? Wait { get { throw null; } set { } } + public bool? WaitForJobs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmInstallConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmInstallConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmRegistryEndpointRef : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmRegistryEndpointRef(string registryEndpointRef) { } + public string RegistryEndpointRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistryEndpointRef System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistryEndpointRef System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateHelmRegistrySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateHelmRegistrySettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmRegistrySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateHelmUpgradeConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateHelmUpgradeConfiguration() { } + public bool? Atomic { get { throw null; } set { } } + public bool? DisableHooks { get { throw null; } set { } } + public int? Timeout { get { throw null; } set { } } + public bool? Wait { get { throw null; } set { } } + public bool? WaitForJobs { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmUpgradeConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateHelmUpgradeConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateManagedConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateManagedConfiguration(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings managedConfigurationSettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings ManagedConfigurationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateManagedConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateManagedConfigurationSettings() { } + public System.Collections.Generic.IDictionary AdditionalConfiguration { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAllocation Allocation { get { throw null; } set { } } + public System.Collections.Generic.IList PersistentVolumeClaims { get { throw null; } } + public System.Collections.Generic.IList> PersistentVolumeClaimTemplates { get { throw null; } } + public System.Collections.Generic.IList Secrets { get { throw null; } } + public string TrustListSecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplatePersistentVolumeClaim : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplatePersistentVolumeClaim(string claimName, string mountPath) { } + public string ClaimName { get { throw null; } set { } } + public string MountPath { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplatePersistentVolumeClaim System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplatePersistentVolumeClaim System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateProperties(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration, System.Collections.Generic.IEnumerable deviceInboundEndpointTypes) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata AioMetadata { get { throw null; } set { } } + public System.Collections.Generic.IList DeviceInboundEndpointTypes { get { throw null; } } + public string DiagnosticsLevel { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration MqttConnectionConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration RuntimeConfiguration { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriConnectorTemplateRuntimeConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriConnectorTemplateRuntimeConfiguration() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateRuntimeImageConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateRuntimeImageConfiguration(Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings imageConfigurationSettings) { } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings ImageConfigurationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateRuntimeImageConfigurationSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateRuntimeImageConfigurationSettings(string imageName) { } + public string ImageName { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy? ImagePullPolicy { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings RegistrySettings { get { throw null; } set { } } + public int? Replicas { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings TagDigestSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeImageConfigurationSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriConnectorTemplateRuntimeStatefulSetConfiguration : Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateManagedConfigurationSettings, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriConnectorTemplateRuntimeStatefulSetConfiguration(System.Collections.Generic.IDictionary statefulSetConfigurationSettings) { } + public System.Collections.Generic.IDictionary StatefulSetConfigurationSettings { get { throw null; } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeStatefulSetConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeStatefulSetConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerAioMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerAioMetadata() { } + public string AioMaxVersion { get { throw null; } set { } } + public string AioMinVersion { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerDiscoverableDeviceEndpointType : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerDiscoverableDeviceEndpointType(string endpointType, string version) { } + public string EndpointType { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerDiscoverableDeviceEndpointType System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerDiscoverableDeviceEndpointType System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerImageConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerImageConfiguration(string imageName) { } + public string ImageName { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsImagePullPolicy? ImagePullPolicy { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsRegistrySettings RegistrySettings { get { throw null; } set { } } + public int? Replicas { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsTagDigestSettings TagDigestSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerProperties(System.Collections.Generic.IEnumerable discoverableDeviceEndpointTypes, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration imageConfiguration, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule schedule) { } + public System.Collections.Generic.IDictionary AdditionalConfiguration { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata AioMetadata { get { throw null; } set { } } + public string DiagnosticsLevel { get { throw null; } set { } } + public System.Collections.Generic.IList DiscoverableDeviceEndpointTypes { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration ImageConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? Mode { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration MqttConnectionConfiguration { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule Schedule { get { throw null; } set { } } + public System.Collections.Generic.IList Secrets { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class AkriDiscoveryHandlerSchedule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected AkriDiscoveryHandlerSchedule() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerScheduleContinuous : Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerScheduleContinuous(string continuous) { } + public string Continuous { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleContinuous System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleContinuous System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerScheduleCron : Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerScheduleCron(string cron) { } + public string Cron { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleCron System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleCron System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AkriDiscoveryHandlerScheduleRunOnce : Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AkriDiscoveryHandlerScheduleRunOnce(string runOnce) { } + public string RunOnce { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleRunOnce System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerScheduleRunOnce System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public static partial class ArmIotOperationsModelFactory { + public static Azure.ResourceManager.IotOperations.AkriConnectorResourceData AkriConnectorResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? akriConnectorProvisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties AkriConnectorTemplateProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateAioMetadata aioMetadata = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration = null, string diagnosticsLevel = null, System.Collections.Generic.IEnumerable deviceInboundEndpointTypes = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = null) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriConnectorTemplateResourceData AkriConnectorTemplateResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorTemplateProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties AkriDiscoveryHandlerProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerAioMetadata aioMetadata = null, System.Collections.Generic.IDictionary additionalConfiguration = null, string diagnosticsLevel = null, Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? mode = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), System.Collections.Generic.IEnumerable discoverableDeviceEndpointTypes = null, Azure.ResourceManager.IotOperations.Models.AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = null, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerImageConfiguration imageConfiguration = null, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerSchedule schedule = null, System.Collections.Generic.IEnumerable secrets = null) { throw null; } + public static Azure.ResourceManager.IotOperations.AkriDiscoveryHandlerResourceData AkriDiscoveryHandlerResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.AkriDiscoveryHandlerProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties DataflowGraphProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? mode = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? requestDiskPersistence = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), System.Collections.Generic.IEnumerable nodes = null, System.Collections.Generic.IEnumerable nodeConnections = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } + public static Azure.ResourceManager.IotOperations.DataflowGraphResourceData DataflowGraphResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthenticationData IotOperationsBrokerAuthenticationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthenticationProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthenticationProperties IotOperationsBrokerAuthenticationProperties(System.Collections.Generic.IEnumerable authenticationMethods = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerAuthorizationData IotOperationsBrokerAuthorizationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerAuthorizationProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } @@ -474,15 +1338,17 @@ public static partial class ArmIotOperationsModelFactory public static Azure.ResourceManager.IotOperations.IotOperationsBrokerData IotOperationsBrokerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsBrokerListenerData IotOperationsBrokerListenerData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerListenerProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerListenerProperties IotOperationsBrokerListenerProperties(string serviceName = null, System.Collections.Generic.IEnumerable ports = null, Azure.ResourceManager.IotOperations.Models.BlockerListenerServiceType? serviceType = default(Azure.ResourceManager.IotOperations.Models.BlockerListenerServiceType?), Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } - public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties IotOperationsBrokerProperties(Azure.ResourceManager.IotOperations.Models.BrokerAdvancedSettings advanced = null, Azure.ResourceManager.IotOperations.Models.BrokerCardinality cardinality = null, Azure.ResourceManager.IotOperations.Models.BrokerDiagnostics diagnostics = null, Azure.ResourceManager.IotOperations.Models.DiskBackedMessageBuffer diskBackedMessageBuffer = null, Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? generateResourceLimitsCpu = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile? memoryProfile = default(Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile?), Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties IotOperationsBrokerProperties(Azure.ResourceManager.IotOperations.Models.BrokerAdvancedSettings advanced = null, Azure.ResourceManager.IotOperations.Models.BrokerCardinality cardinality = null, Azure.ResourceManager.IotOperations.Models.BrokerDiagnostics diagnostics = null, Azure.ResourceManager.IotOperations.Models.DiskBackedMessageBuffer diskBackedMessageBuffer = null, Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? generateResourceLimitsCpu = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile? memoryProfile = default(Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile?), Azure.ResourceManager.IotOperations.Models.BrokerPersistence persistence = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsDataflowData IotOperationsDataflowData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsDataflowEndpointData IotOperationsDataflowEndpointData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } - public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties IotOperationsDataflowEndpointProperties(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType endpointType = default(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType), Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataExplorer dataExplorerSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataLakeStorage dataLakeStorageSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointFabricOneLake fabricOneLakeSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointKafka kafkaSettings = null, string localStoragePersistentVolumeClaimRef = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointMqtt mqttSettings = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties IotOperationsDataflowEndpointProperties(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType endpointType = default(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType), Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType? hostType = default(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType?), Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataExplorer dataExplorerSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataLakeStorage dataLakeStorageSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointFabricOneLake fabricOneLakeSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointKafka kafkaSettings = null, string localStoragePersistentVolumeClaimRef = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointMqtt mqttSettings = null, Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry openTelemetrySettings = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsDataflowProfileData IotOperationsDataflowProfileData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProfileProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProfileProperties IotOperationsDataflowProfileProperties(Azure.ResourceManager.IotOperations.Models.DataflowProfileDiagnostics diagnostics = null, int? instanceCount = default(int?), Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowProperties IotOperationsDataflowProperties(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? mode = default(Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode?), System.Collections.Generic.IEnumerable operations = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?)) { throw null; } public static Azure.ResourceManager.IotOperations.IotOperationsInstanceData IotOperationsInstanceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.IotOperations.Models.IotOperationsInstanceProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null) { throw null; } - public static Azure.ResourceManager.IotOperations.Models.IotOperationsInstanceProperties IotOperationsInstanceProperties(string description = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), string version = null, Azure.Core.ResourceIdentifier schemaRegistryRefResourceId = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.IotOperationsInstanceProperties IotOperationsInstanceProperties(string description = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), string version = null, Azure.Core.ResourceIdentifier schemaRegistryRefResourceId = null, Azure.Core.ResourceIdentifier defaultSecretProviderClassRefResourceId = null, System.Collections.Generic.IDictionary features = null, Azure.Core.ResourceIdentifier adrNamespaceRefResourceId = null) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties RegistryEndpointProperties(string host = null, Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication authentication = null, Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? provisioningState = default(Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState?), Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey trustTrustedSigningKeys = null) { throw null; } + public static Azure.ResourceManager.IotOperations.RegistryEndpointResourceData RegistryEndpointResourceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties properties = null, Azure.ResourceManager.IotOperations.Models.IotOperationsExtendedLocation extendedLocation = null) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BlockerListenerServiceType : System.IEquatable @@ -566,6 +1432,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class BrokerAuthenticatorMethodX509 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BrokerAuthenticatorMethodX509() { } + public Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod? AdditionalValidation { get { throw null; } set { } } public System.Collections.Generic.IDictionary AuthorizationAttributes { get { throw null; } } public string TrustedClientCaCert { get { throw null; } set { } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -587,6 +1454,24 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BrokerAuthenticatorValidationMethod : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BrokerAuthenticatorValidationMethod(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod AzureDeviceRegistry { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod None { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod left, Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod left, Azure.ResourceManager.IotOperations.Models.BrokerAuthenticatorValidationMethod right) { throw null; } + public override string ToString() { throw null; } + } public partial class BrokerAuthorizationConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public BrokerAuthorizationConfig() { } @@ -762,6 +1647,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.BrokerOperatorValue left, Azure.ResourceManager.IotOperations.Models.BrokerOperatorValue right) { throw null; } public override string ToString() { throw null; } } + public partial class BrokerPersistence : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerPersistence(string maxSize) { } + public Azure.ResourceManager.IotOperations.Models.BrokerPersistenceDynamicSettings DynamicSettings { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? EncryptionMode { get { throw null; } set { } } + public string MaxSize { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.VolumeClaimSpec PersistentVolumeClaimSpec { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy Retain { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy StateStore { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy SubscriberQueue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistence System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistence System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerPersistenceDynamicSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerPersistenceDynamicSettings(string userPropertyKey, string userPropertyValue) { } + public string UserPropertyKey { get { throw null; } set { } } + public string UserPropertyValue { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistenceDynamicSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerPersistenceDynamicSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct BrokerProtocolType : System.IEquatable { @@ -812,6 +1726,137 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class BrokerRetainMessagesCustomPolicy : Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerRetainMessagesCustomPolicy(Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings retainSettings) { } + public Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings RetainSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesCustomPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesCustomPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class BrokerRetainMessagesPolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BrokerRetainMessagesPolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerRetainMessagesSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerRetainMessagesSettings() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? DynamicMode { get { throw null; } set { } } + public System.Collections.Generic.IList Topics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerRetainMessagesSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerStateStoreCustomPolicy : Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerStateStoreCustomPolicy(Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings stateStoreSettings) { } + public Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings StateStoreSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStoreCustomPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStoreCustomPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct BrokerStateStoreKeyType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public BrokerStateStoreKeyType(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType Binary { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType Pattern { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType String { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType left, Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType left, Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class BrokerStateStorePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BrokerStateStorePolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerStateStorePolicyResources : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerStateStorePolicyResources(Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType keyType, System.Collections.Generic.IEnumerable keys) { } + public System.Collections.Generic.IList Keys { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.BrokerStateStoreKeyType KeyType { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicyResources System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicyResources System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerStateStorePolicySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerStateStorePolicySettings() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? DynamicMode { get { throw null; } set { } } + public System.Collections.Generic.IList StateStoreResources { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerStateStorePolicySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerSubscriberQueueCustomPolicy : Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerSubscriberQueueCustomPolicy(Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings subscriberQueueSettings) { } + public Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings SubscriberQueueSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class BrokerSubscriberQueueCustomPolicySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public BrokerSubscriberQueueCustomPolicySettings() { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? DynamicMode { get { throw null; } set { } } + public System.Collections.Generic.IList SubscriberClientIds { get { throw null; } } + public System.Collections.Generic.IList Topics { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueueCustomPolicySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class BrokerSubscriberQueuePolicy : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected BrokerSubscriberQueuePolicy() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.BrokerSubscriberQueuePolicy System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CertManagerCertConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CertManagerCertConfig(string duration, string renewBefore, Azure.ResourceManager.IotOperations.Models.CertManagerPrivateKey privateKey) { } @@ -920,6 +1965,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataExplorerAuthMethod left, Azure.ResourceManager.IotOperations.Models.DataExplorerAuthMethod right) { throw null; } public override string ToString() { throw null; } } + public partial class DatafloGraphDestinationNode : Azure.ResourceManager.IotOperations.Models.DataflowGraphNode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatafloGraphDestinationNode(string name, Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings destinationSettings) : base (default(string)) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings DestinationSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DatafloGraphDestinationNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DatafloGraphDestinationNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowBuiltInTransformationDataset : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowBuiltInTransformationDataset(string key, System.Collections.Generic.IEnumerable inputs) { } @@ -991,6 +2047,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataflowEndpointAuthenticationAnonymous : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointAuthenticationAnonymous() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowEndpointAuthenticationSasl : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowEndpointAuthenticationSasl(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationSaslType saslType, string secretRef) { } @@ -1022,6 +2088,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationSaslType left, Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationSaslType right) { throw null; } public override string ToString() { throw null; } } + public partial class DataflowEndpointAuthenticationServiceAccountToken : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointAuthenticationServiceAccountToken(string audience) { } + public string Audience { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationServiceAccountToken System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationServiceAccountToken System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowEndpointAuthenticationUserAssignedManagedIdentity : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowEndpointAuthenticationUserAssignedManagedIdentity(string clientId, string tenantId) { } @@ -1035,6 +2112,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataflowEndpointAuthenticationX509 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointAuthenticationX509(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationX509 System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationX509 System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowEndpointDataExplorer : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowEndpointDataExplorer(Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataExplorerAuthentication authentication, string database, string host) { } @@ -1291,6 +2379,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataflowEndpointOpenTelemetry : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowEndpointOpenTelemetry(string host, Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication authentication) { } + public Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication Authentication { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsBatchingConfig Batching { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsTlsProperties Tls { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataflowEndpointType : System.IEquatable { @@ -1303,6 +2405,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType Kafka { get { throw null; } } public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType LocalStorage { get { throw null; } } public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType Mqtt { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEndpointType OpenTelemetry { get { throw null; } } public bool Equals(Azure.ResourceManager.IotOperations.Models.DataflowEndpointType other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1314,6 +2417,28 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public override string ToString() { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataflowEnpointHostType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataflowEnpointHostType(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType CustomKafka { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType CustomMqtt { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType EventGrid { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType Eventhub { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType FabricRT { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType LocalBroker { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType left, Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType left, Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataflowFilterType : System.IEquatable { private readonly object _dummy; @@ -1330,6 +2455,171 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowFilterType left, Azure.ResourceManager.IotOperations.Models.DataflowFilterType right) { throw null; } public override string ToString() { throw null; } } + public partial class DataflowGraphConnectionInput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphConnectionInput(string name) { } + public string Name { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings Schema { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphConnectionOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphConnectionOutput(string name) { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphDestinationNodeSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphDestinationNodeSettings(string endpointRef, string dataDestination) { } + public string DataDestination { get { throw null; } set { } } + public string EndpointRef { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings OutputSchemaSettings { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphDestinationNodeSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphGraphNode : Azure.ResourceManager.IotOperations.Models.DataflowGraphNode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphGraphNode(string name, Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings graphSettings) : base (default(string)) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings GraphSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphGraphNodeConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphGraphNodeConfiguration(string key, string value) { } + public string Key { get { throw null; } set { } } + public string Value { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNodeConfiguration System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphGraphNodeConfiguration System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataflowGraphNode : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataflowGraphNode(string name) { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphNodeConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphNodeConnection(Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput from, Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionOutput to) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphConnectionInput From { get { throw null; } set { } } + public string ToName { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeConnection System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeConnection System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphNodeGraphSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphNodeGraphSettings(string registryEndpointRef, string artifact) { } + public string Artifact { get { throw null; } set { } } + public System.Collections.Generic.IList Configuration { get { throw null; } } + public string RegistryEndpointRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphNodeGraphSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphProperties(System.Collections.Generic.IEnumerable nodes, System.Collections.Generic.IEnumerable nodeConnections) { } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IList NodeConnections { get { throw null; } } + public System.Collections.Generic.IList Nodes { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? RequestDiskPersistence { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphSchemaSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphSchemaSettings(string schemaRef) { } + public string SchemaRef { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat? SerializationFormat { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSchemaSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataflowGraphSerializationFormat : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataflowGraphSerializationFormat(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Avro { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Delta { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Json { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat Parquet { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat left, Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat left, Azure.ResourceManager.IotOperations.Models.DataflowGraphSerializationFormat right) { throw null; } + public override string ToString() { throw null; } + } + public partial class DataflowGraphSourceNode : Azure.ResourceManager.IotOperations.Models.DataflowGraphNode, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphSourceNode(string name, Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings sourceSettings) : base (default(string)) { } + public Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings SourceSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceNode System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceNode System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowGraphSourceSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowGraphSourceSettings(string endpointRef, System.Collections.Generic.IEnumerable dataSources) { } + public System.Collections.Generic.IList DataSources { get { throw null; } } + public string EndpointRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowGraphSourceSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct DataflowMappingType : System.IEquatable { @@ -1351,6 +2641,49 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.DataflowMappingType left, Azure.ResourceManager.IotOperations.Models.DataflowMappingType right) { throw null; } public override string ToString() { throw null; } } + public partial class DataflowOpenTelemetryAnonymousAuthentication : Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowOpenTelemetryAnonymousAuthentication(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous anonymousSettings) { } + public Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationAnonymous AnonymousSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAnonymousAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAnonymousAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataflowOpenTelemetryAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected DataflowOpenTelemetryAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowOpenTelemetryServiceAccountAuthentication : Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowOpenTelemetryServiceAccountAuthentication(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationServiceAccountToken serviceAccountTokenSettings) { } + public string ServiceAccountTokenAudience { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryServiceAccountAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryServiceAccountAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataflowOpenTelemetryX509CertificateAuthentication : Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataflowOpenTelemetryX509CertificateAuthentication(Azure.ResourceManager.IotOperations.Models.DataflowEndpointAuthenticationX509 x509CertificateSettings) { } + public string X509CertificateSecretRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryX509CertificateAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.DataflowOpenTelemetryX509CertificateAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DataflowOperationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public DataflowOperationProperties(Azure.ResourceManager.IotOperations.Models.DataflowOperationType operationType) { } @@ -1491,6 +2824,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.FabricOneLakeAuthMethod left, Azure.ResourceManager.IotOperations.Models.FabricOneLakeAuthMethod right) { throw null; } public override string ToString() { throw null; } } + public partial class InstanceFeature : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InstanceFeature() { } + public Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode? Mode { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Settings { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.InstanceFeature System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.InstanceFeature System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct InstanceFeatureMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public InstanceFeatureMode(string value) { throw null; } + public static Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode Disabled { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode Preview { get { throw null; } } + public static Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode Stable { get { throw null; } } + public bool Equals(Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode left, Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode right) { throw null; } + public static implicit operator Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode left, Azure.ResourceManager.IotOperations.Models.InstanceFeatureMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class IotOperationsBatchingConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IotOperationsBatchingConfig() { } @@ -1550,6 +2914,7 @@ public IotOperationsBrokerProperties() { } public Azure.ResourceManager.IotOperations.Models.DiskBackedMessageBuffer DiskBackedMessageBuffer { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsOperationalMode? GenerateResourceLimitsCpu { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.BrokerMemoryProfile? MemoryProfile { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.BrokerPersistence Persistence { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotOperations.Models.IotOperationsBrokerProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1565,9 +2930,11 @@ public IotOperationsDataflowEndpointProperties(Azure.ResourceManager.IotOperatio public Azure.ResourceManager.IotOperations.Models.DataflowEndpointDataLakeStorage DataLakeStorageSettings { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointType EndpointType { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointFabricOneLake FabricOneLakeSettings { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowEnpointHostType? HostType { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointKafka KafkaSettings { get { throw null; } set { } } public string LocalStoragePersistentVolumeClaimRef { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.DataflowEndpointMqtt MqttSettings { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.DataflowEndpointOpenTelemetry OpenTelemetrySettings { get { throw null; } set { } } public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } Azure.ResourceManager.IotOperations.Models.IotOperationsDataflowEndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1646,7 +3013,10 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class IotOperationsInstanceProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public IotOperationsInstanceProperties(Azure.ResourceManager.IotOperations.Models.SchemaRegistryRef schemaRegistryRef) { } + public Azure.Core.ResourceIdentifier AdrNamespaceRefResourceId { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier DefaultSecretProviderClassRefResourceId { get { throw null; } set { } } public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Features { get { throw null; } } public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } public Azure.Core.ResourceIdentifier SchemaRegistryRefResourceId { get { throw null; } set { } } public string Version { get { throw null; } } @@ -1864,6 +3234,151 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.IotOperations.Models.PrivateKeyRotationPolicy left, Azure.ResourceManager.IotOperations.Models.PrivateKeyRotationPolicy right) { throw null; } public override string ToString() { throw null; } } + public partial class RegistryEndpointAnonymousAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointAnonymousAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings anonymousSettings) { } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings AnonymousSettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointAnonymousSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointAnonymousSettings() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAnonymousSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointArtifactPullSecretAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointArtifactPullSecretAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretSettings artifactPullSecretSettings) { } + public string SecretRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointArtifactPullSecretSettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointArtifactPullSecretSettings(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretSettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointArtifactPullSecretSettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class RegistryEndpointAuthentication : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected RegistryEndpointAuthentication() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointProperties(string host, Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication authentication) { } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication Authentication { get { throw null; } set { } } + public string Host { get { throw null; } set { } } + public Azure.ResourceManager.IotOperations.Models.IotOperationsProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey TrustTrustedSigningKeys { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointSystemAssignedIdentityAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointSystemAssignedIdentityAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedManagedIdentitySettings systemAssignedManagedIdentitySettings) { } + public string SystemAssignedManagedIdentityAudience { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedIdentityAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedIdentityAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointSystemAssignedManagedIdentitySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointSystemAssignedManagedIdentitySettings() { } + public string Audience { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedManagedIdentitySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointSystemAssignedManagedIdentitySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class RegistryEndpointTrustedSigningKey : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + protected RegistryEndpointTrustedSigningKey() { } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointTrustedSigningKeyConfigMap : Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointTrustedSigningKeyConfigMap(string configMapRef) { } + public string ConfigMapRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeyConfigMap System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeyConfigMap System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointTrustedSigningKeySecret : Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKey, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointTrustedSigningKeySecret(string secretRef) { } + public string SecretRef { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeySecret System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointTrustedSigningKeySecret System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointUserAssignedIdentityAuthentication : Azure.ResourceManager.IotOperations.Models.RegistryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointUserAssignedIdentityAuthentication(Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings userAssignedManagedIdentitySettings) { } + public Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings UserAssignedManagedIdentitySettings { get { throw null; } set { } } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedIdentityAuthentication System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedIdentityAuthentication System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RegistryEndpointUserAssignedManagedIdentitySettings : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RegistryEndpointUserAssignedManagedIdentitySettings(string clientId, string tenantId) { } + public string ClientId { get { throw null; } set { } } + public string Scope { get { throw null; } set { } } + public string TenantId { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.RegistryEndpointUserAssignedManagedIdentitySettings System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SanForCert : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SanForCert(System.Collections.Generic.IEnumerable dns, System.Collections.Generic.IEnumerable ip) { } @@ -2008,6 +3523,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class VolumeClaimResourceRequirements : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VolumeClaimResourceRequirements() { } + public System.Collections.Generic.IList Claims { get { throw null; } } public System.Collections.Generic.IDictionary Limits { get { throw null; } } public System.Collections.Generic.IDictionary Requests { get { throw null; } } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2017,6 +3533,17 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class VolumeClaimResourceRequirementsClaims : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public VolumeClaimResourceRequirementsClaims(string name) { } + public string Name { get { throw null; } set { } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.VolumeClaimResourceRequirementsClaims System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.IotOperations.Models.VolumeClaimResourceRequirementsClaims System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class VolumeClaimSpec : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public VolumeClaimSpec() { } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResource.cs new file mode 100644 index 000000000000..8ba48ee2e4d7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResource.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_AkriConnectorResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AkriConnectorGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorResource created on azure + // for more information of creating AkriConnectorResource, please refer to the document of AkriConnectorResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + string akriConnectorName = "resource-name123"; + ResourceIdentifier akriConnectorResourceId = AkriConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName); + AkriConnectorResource akriConnectorResource = client.GetAkriConnectorResource(akriConnectorResourceId); + + // invoke the operation + AkriConnectorResource result = await akriConnectorResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AkriConnectorDeleteMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorResource created on azure + // for more information of creating AkriConnectorResource, please refer to the document of AkriConnectorResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + string akriConnectorName = "resource-name123"; + ResourceIdentifier akriConnectorResourceId = AkriConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName); + AkriConnectorResource akriConnectorResource = client.GetAkriConnectorResource(akriConnectorResourceId); + + // invoke the operation + await akriConnectorResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AkriConnectorCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorResource created on azure + // for more information of creating AkriConnectorResource, please refer to the document of AkriConnectorResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + string akriConnectorName = "resource-name123"; + ResourceIdentifier akriConnectorResourceId = AkriConnectorResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName); + AkriConnectorResource akriConnectorResource = client.GetAkriConnectorResource(akriConnectorResourceId); + + // invoke the operation + AkriConnectorResourceData data = new AkriConnectorResourceData + { + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await akriConnectorResource.UpdateAsync(WaitUntil.Completed, data); + AkriConnectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResourceCollection.cs new file mode 100644 index 000000000000..5529c05ec7a5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorResourceCollection.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_AkriConnectorResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AkriConnectorCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // get the collection of this AkriConnectorResource + AkriConnectorResourceCollection collection = akriConnectorTemplateResource.GetAkriConnectorResources(); + + // invoke the operation + string akriConnectorName = "resource-name123"; + AkriConnectorResourceData data = new AkriConnectorResourceData + { + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, akriConnectorName, data); + AkriConnectorResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AkriConnectorGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // get the collection of this AkriConnectorResource + AkriConnectorResourceCollection collection = akriConnectorTemplateResource.GetAkriConnectorResources(); + + // invoke the operation + string akriConnectorName = "resource-name123"; + AkriConnectorResource result = await collection.GetAsync(akriConnectorName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AkriConnectorListByTemplateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_ListByTemplate_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_ListByTemplate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // get the collection of this AkriConnectorResource + AkriConnectorResourceCollection collection = akriConnectorTemplateResource.GetAkriConnectorResources(); + + // invoke the operation and iterate over the result + await foreach (AkriConnectorResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AkriConnectorGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // get the collection of this AkriConnectorResource + AkriConnectorResourceCollection collection = akriConnectorTemplateResource.GetAkriConnectorResources(); + + // invoke the operation + string akriConnectorName = "resource-name123"; + bool result = await collection.ExistsAsync(akriConnectorName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AkriConnectorGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnector_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // get the collection of this AkriConnectorResource + AkriConnectorResourceCollection collection = akriConnectorTemplateResource.GetAkriConnectorResources(); + + // invoke the operation + string akriConnectorName = "resource-name123"; + NullableResponse response = await collection.GetIfExistsAsync(akriConnectorName); + AkriConnectorResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResource.cs new file mode 100644 index 000000000000..71af95b0816e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResource.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_AkriConnectorTemplateResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AkriConnectorTemplateGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // invoke the operation + AkriConnectorTemplateResource result = await akriConnectorTemplateResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorTemplateResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AkriConnectorTemplateDeleteMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // invoke the operation + await akriConnectorTemplateResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AkriConnectorTemplateCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriConnectorTemplateResource created on azure + // for more information of creating AkriConnectorTemplateResource, please refer to the document of AkriConnectorTemplateResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriConnectorTemplateName = "resource-name123"; + ResourceIdentifier akriConnectorTemplateResourceId = AkriConnectorTemplateResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + AkriConnectorTemplateResource akriConnectorTemplateResource = client.GetAkriConnectorTemplateResource(akriConnectorTemplateResourceId); + + // invoke the operation + AkriConnectorTemplateResourceData data = new AkriConnectorTemplateResourceData + { + Properties = new AkriConnectorTemplateProperties(null, new AkriConnectorTemplateDeviceInboundEndpointType[] + { +new AkriConnectorTemplateDeviceInboundEndpointType("chkkpymxhp", "chkkpymxhp") +{ +ConfigurationSchemaRefs = new AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs +{ +DefaultDatasetConfigSchemaRef = "nsifbedzo", +DefaultEventsConfigSchemaRef = "tloquokslyfukgwhklpvpybdgykl", +DefaultProcessControlConfigSchemaRef = "mvjycfnxovmiijpwlpbeacryfdo", +DefaultStreamsConfigSchemaRef = "kdaitmohr", +AdditionalConfigSchemaRef = "uxvyqeqxbamqwjy", +}, +} + }) + { + AioMetadata = new AkriConnectorTemplateAioMetadata + { + AioMinVersion = "tkiz", + AioMaxVersion = "qoxwkvfxvqedqtju", + }, + MqttConnectionConfiguration = new AkriConnectorsMqttConnectionConfiguration + { + Host = "kj", + Protocol = AkriConnectorsMqttProtocolType.Mqtt, + KeepAliveSeconds = 0, + MaxInflightMessages = 0, + SessionExpirySeconds = 0, + Tls = new IotOperationsTlsProperties + { + Mode = IotOperationsOperationalMode.Enabled, + TrustedCaCertificateConfigMapRef = "tectjjvukvelsreihwadh", + }, + }, + }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await akriConnectorTemplateResource.UpdateAsync(WaitUntil.Completed, data); + AkriConnectorTemplateResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorTemplateResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResourceCollection.cs new file mode 100644 index 000000000000..9569b2a8bec6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriConnectorTemplateResourceCollection.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_AkriConnectorTemplateResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AkriConnectorTemplateCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriConnectorTemplateResource + AkriConnectorTemplateResourceCollection collection = iotOperationsInstance.GetAkriConnectorTemplateResources(); + + // invoke the operation + string akriConnectorTemplateName = "resource-name123"; + AkriConnectorTemplateResourceData data = new AkriConnectorTemplateResourceData + { + Properties = new AkriConnectorTemplateProperties(null, new AkriConnectorTemplateDeviceInboundEndpointType[] + { +new AkriConnectorTemplateDeviceInboundEndpointType("chkkpymxhp", "chkkpymxhp") +{ +ConfigurationSchemaRefs = new AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs +{ +DefaultDatasetConfigSchemaRef = "nsifbedzo", +DefaultEventsConfigSchemaRef = "tloquokslyfukgwhklpvpybdgykl", +DefaultProcessControlConfigSchemaRef = "mvjycfnxovmiijpwlpbeacryfdo", +DefaultStreamsConfigSchemaRef = "kdaitmohr", +AdditionalConfigSchemaRef = "uxvyqeqxbamqwjy", +}, +} + }) + { + AioMetadata = new AkriConnectorTemplateAioMetadata + { + AioMinVersion = "tkiz", + AioMaxVersion = "qoxwkvfxvqedqtju", + }, + MqttConnectionConfiguration = new AkriConnectorsMqttConnectionConfiguration + { + Host = "kj", + Protocol = AkriConnectorsMqttProtocolType.Mqtt, + KeepAliveSeconds = 0, + MaxInflightMessages = 0, + SessionExpirySeconds = 0, + Tls = new IotOperationsTlsProperties + { + Mode = IotOperationsOperationalMode.Enabled, + TrustedCaCertificateConfigMapRef = "tectjjvukvelsreihwadh", + }, + }, + }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, akriConnectorTemplateName, data); + AkriConnectorTemplateResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorTemplateResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AkriConnectorTemplateGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriConnectorTemplateResource + AkriConnectorTemplateResourceCollection collection = iotOperationsInstance.GetAkriConnectorTemplateResources(); + + // invoke the operation + string akriConnectorTemplateName = "resource-name123"; + AkriConnectorTemplateResource result = await collection.GetAsync(akriConnectorTemplateName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorTemplateResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AkriConnectorTemplateListByInstanceResourceMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_ListByInstanceResource_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_ListByInstanceResource" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriConnectorTemplateResource + AkriConnectorTemplateResourceCollection collection = iotOperationsInstance.GetAkriConnectorTemplateResources(); + + // invoke the operation and iterate over the result + await foreach (AkriConnectorTemplateResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorTemplateResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AkriConnectorTemplateGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriConnectorTemplateResource + AkriConnectorTemplateResourceCollection collection = iotOperationsInstance.GetAkriConnectorTemplateResources(); + + // invoke the operation + string akriConnectorTemplateName = "resource-name123"; + bool result = await collection.ExistsAsync(akriConnectorTemplateName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AkriConnectorTemplateGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriConnectorTemplate_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriConnectorTemplateResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriConnectorTemplateResource + AkriConnectorTemplateResourceCollection collection = iotOperationsInstance.GetAkriConnectorTemplateResources(); + + // invoke the operation + string akriConnectorTemplateName = "resource-name123"; + NullableResponse response = await collection.GetIfExistsAsync(akriConnectorTemplateName); + AkriConnectorTemplateResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriConnectorTemplateResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResource.cs new file mode 100644 index 000000000000..7b4bd8cf4f22 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResource.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_AkriDiscoveryHandlerResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AkriDiscoveryHandlerGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriDiscoveryHandlerResource created on azure + // for more information of creating AkriDiscoveryHandlerResource, please refer to the document of AkriDiscoveryHandlerResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriDiscoveryHandlerName = "resource-name123"; + ResourceIdentifier akriDiscoveryHandlerResourceId = AkriDiscoveryHandlerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName); + AkriDiscoveryHandlerResource akriDiscoveryHandlerResource = client.GetAkriDiscoveryHandlerResource(akriDiscoveryHandlerResourceId); + + // invoke the operation + AkriDiscoveryHandlerResource result = await akriDiscoveryHandlerResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriDiscoveryHandlerResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_AkriDiscoveryHandlerDeleteMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriDiscoveryHandlerResource created on azure + // for more information of creating AkriDiscoveryHandlerResource, please refer to the document of AkriDiscoveryHandlerResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriDiscoveryHandlerName = "resource-name123"; + ResourceIdentifier akriDiscoveryHandlerResourceId = AkriDiscoveryHandlerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName); + AkriDiscoveryHandlerResource akriDiscoveryHandlerResource = client.GetAkriDiscoveryHandlerResource(akriDiscoveryHandlerResourceId); + + // invoke the operation + await akriDiscoveryHandlerResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_AkriDiscoveryHandlerCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this AkriDiscoveryHandlerResource created on azure + // for more information of creating AkriDiscoveryHandlerResource, please refer to the document of AkriDiscoveryHandlerResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + string akriDiscoveryHandlerName = "resource-name123"; + ResourceIdentifier akriDiscoveryHandlerResourceId = AkriDiscoveryHandlerResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName); + AkriDiscoveryHandlerResource akriDiscoveryHandlerResource = client.GetAkriDiscoveryHandlerResource(akriDiscoveryHandlerResourceId); + + // invoke the operation + AkriDiscoveryHandlerResourceData data = new AkriDiscoveryHandlerResourceData + { + Properties = new AkriDiscoveryHandlerProperties(new AkriDiscoveryHandlerDiscoverableDeviceEndpointType[] + { +new AkriDiscoveryHandlerDiscoverableDeviceEndpointType("chkkpymxhp", "chkkpymxhp") + }, new AkriDiscoveryHandlerImageConfiguration("vrglpcosiuiulgwqkjbrdxnyjphp") + { + ImagePullPolicy = AkriConnectorsImagePullPolicy.Always, + Replicas = 4, + }, null) + { + AioMetadata = new AkriDiscoveryHandlerAioMetadata + { + AioMinVersion = "nxusafsppaikld", + AioMaxVersion = "yrmlixhxsnrgialgwruyk", + }, + AdditionalConfiguration = +{ +["key2206"] = "ysosuqsgtnwlyq" +}, + Mode = IotOperationsOperationalMode.Enabled, + MqttConnectionConfiguration = new AkriConnectorsMqttConnectionConfiguration + { + Host = "mfxhevl", + Protocol = AkriConnectorsMqttProtocolType.Mqtt, + KeepAliveSeconds = 0, + MaxInflightMessages = 0, + SessionExpirySeconds = 0, + Tls = new IotOperationsTlsProperties + { + Mode = IotOperationsOperationalMode.Enabled, + TrustedCaCertificateConfigMapRef = "tectjjvukvelsreihwadh", + }, + }, + Secrets = { new AkriConnectorsSecret("qblyfotyqcojcchpji", "daizzyhqznrvmmrg", "vqxrhffxxfwqagwjcjimkmzjoxu") }, + }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await akriDiscoveryHandlerResource.UpdateAsync(WaitUntil.Completed, data); + AkriDiscoveryHandlerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriDiscoveryHandlerResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResourceCollection.cs new file mode 100644 index 000000000000..6dc2d058d926 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_AkriDiscoveryHandlerResourceCollection.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_AkriDiscoveryHandlerResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AkriDiscoveryHandlerCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriDiscoveryHandlerResource + AkriDiscoveryHandlerResourceCollection collection = iotOperationsInstance.GetAkriDiscoveryHandlerResources(); + + // invoke the operation + string akriDiscoveryHandlerName = "resource-name123"; + AkriDiscoveryHandlerResourceData data = new AkriDiscoveryHandlerResourceData + { + Properties = new AkriDiscoveryHandlerProperties(new AkriDiscoveryHandlerDiscoverableDeviceEndpointType[] + { +new AkriDiscoveryHandlerDiscoverableDeviceEndpointType("chkkpymxhp", "chkkpymxhp") + }, new AkriDiscoveryHandlerImageConfiguration("vrglpcosiuiulgwqkjbrdxnyjphp") + { + ImagePullPolicy = AkriConnectorsImagePullPolicy.Always, + Replicas = 4, + }, null) + { + AioMetadata = new AkriDiscoveryHandlerAioMetadata + { + AioMinVersion = "nxusafsppaikld", + AioMaxVersion = "yrmlixhxsnrgialgwruyk", + }, + AdditionalConfiguration = +{ +["key2206"] = "ysosuqsgtnwlyq" +}, + Mode = IotOperationsOperationalMode.Enabled, + MqttConnectionConfiguration = new AkriConnectorsMqttConnectionConfiguration + { + Host = "mfxhevl", + Protocol = AkriConnectorsMqttProtocolType.Mqtt, + KeepAliveSeconds = 0, + MaxInflightMessages = 0, + SessionExpirySeconds = 0, + Tls = new IotOperationsTlsProperties + { + Mode = IotOperationsOperationalMode.Enabled, + TrustedCaCertificateConfigMapRef = "tectjjvukvelsreihwadh", + }, + }, + Secrets = { new AkriConnectorsSecret("qblyfotyqcojcchpji", "daizzyhqznrvmmrg", "vqxrhffxxfwqagwjcjimkmzjoxu") }, + }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, akriDiscoveryHandlerName, data); + AkriDiscoveryHandlerResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriDiscoveryHandlerResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_AkriDiscoveryHandlerGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriDiscoveryHandlerResource + AkriDiscoveryHandlerResourceCollection collection = iotOperationsInstance.GetAkriDiscoveryHandlerResources(); + + // invoke the operation + string akriDiscoveryHandlerName = "resource-name123"; + AkriDiscoveryHandlerResource result = await collection.GetAsync(akriDiscoveryHandlerName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriDiscoveryHandlerResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_AkriDiscoveryHandlerListByInstanceResourceMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_ListByInstanceResource_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_ListByInstanceResource" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriDiscoveryHandlerResource + AkriDiscoveryHandlerResourceCollection collection = iotOperationsInstance.GetAkriDiscoveryHandlerResources(); + + // invoke the operation and iterate over the result + await foreach (AkriDiscoveryHandlerResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriDiscoveryHandlerResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_AkriDiscoveryHandlerGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriDiscoveryHandlerResource + AkriDiscoveryHandlerResourceCollection collection = iotOperationsInstance.GetAkriDiscoveryHandlerResources(); + + // invoke the operation + string akriDiscoveryHandlerName = "resource-name123"; + bool result = await collection.ExistsAsync(akriDiscoveryHandlerName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_AkriDiscoveryHandlerGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/AkriDiscoveryHandler_Get_MaximumSet_Gen.json + // this example is just showing the usage of "AkriDiscoveryHandlerResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-name123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this AkriDiscoveryHandlerResource + AkriDiscoveryHandlerResourceCollection collection = iotOperationsInstance.GetAkriDiscoveryHandlerResources(); + + // invoke the operation + string akriDiscoveryHandlerName = "resource-name123"; + NullableResponse response = await collection.GetIfExistsAsync(akriDiscoveryHandlerName); + AkriDiscoveryHandlerResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + AkriDiscoveryHandlerResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResource.cs new file mode 100644 index 000000000000..078a598ebb55 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResource.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_DataflowGraphResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DataflowGraphGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataflowGraphResource created on azure + // for more information of creating DataflowGraphResource, please refer to the document of DataflowGraphResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + string dataflowGraphName = "resource-123"; + ResourceIdentifier dataflowGraphResourceId = DataflowGraphResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName); + DataflowGraphResource dataflowGraphResource = client.GetDataflowGraphResource(dataflowGraphResourceId); + + // invoke the operation + DataflowGraphResource result = await dataflowGraphResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataflowGraphResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_DataflowGraphDeleteMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataflowGraphResource created on azure + // for more information of creating DataflowGraphResource, please refer to the document of DataflowGraphResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + string dataflowGraphName = "resource-123"; + ResourceIdentifier dataflowGraphResourceId = DataflowGraphResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName); + DataflowGraphResource dataflowGraphResource = client.GetDataflowGraphResource(dataflowGraphResourceId); + + // invoke the operation + await dataflowGraphResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_DataflowGraphCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this DataflowGraphResource created on azure + // for more information of creating DataflowGraphResource, please refer to the document of DataflowGraphResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + string dataflowGraphName = "resource-123"; + ResourceIdentifier dataflowGraphResourceId = DataflowGraphResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName); + DataflowGraphResource dataflowGraphResource = client.GetDataflowGraphResource(dataflowGraphResourceId); + + // invoke the operation + DataflowGraphResourceData data = new DataflowGraphResourceData + { + Properties = new DataflowGraphProperties(Array.Empty(), new DataflowGraphNodeConnection[] + { +new DataflowGraphNodeConnection(new DataflowGraphConnectionInput("wsqbccd") +{ +Schema = new DataflowGraphSchemaSettings("gkyqreiunkvdgggy") +{ +SerializationFormat = DataflowGraphSerializationFormat.Delta, +}, +}, new DataflowGraphConnectionOutput("dqvkpqshglptwrjfeblfzbofmkfktzbjhidsvqctmbzocbtgtkbgrayg")) + }) + { + Mode = IotOperationsOperationalMode.Enabled, + RequestDiskPersistence = IotOperationsOperationalMode.Enabled, + }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await dataflowGraphResource.UpdateAsync(WaitUntil.Completed, data); + DataflowGraphResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataflowGraphResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResourceCollection.cs new file mode 100644 index 000000000000..a9a6438c21f5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_DataflowGraphResourceCollection.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_DataflowGraphResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_DataflowGraphCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsDataflowProfileResource created on azure + // for more information of creating IotOperationsDataflowProfileResource, please refer to the document of IotOperationsDataflowProfileResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + ResourceIdentifier iotOperationsDataflowProfileResourceId = IotOperationsDataflowProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); + + // get the collection of this DataflowGraphResource + DataflowGraphResourceCollection collection = iotOperationsDataflowProfile.GetDataflowGraphResources(); + + // invoke the operation + string dataflowGraphName = "resource-123"; + DataflowGraphResourceData data = new DataflowGraphResourceData + { + Properties = new DataflowGraphProperties(Array.Empty(), new DataflowGraphNodeConnection[] + { +new DataflowGraphNodeConnection(new DataflowGraphConnectionInput("wsqbccd") +{ +Schema = new DataflowGraphSchemaSettings("gkyqreiunkvdgggy") +{ +SerializationFormat = DataflowGraphSerializationFormat.Delta, +}, +}, new DataflowGraphConnectionOutput("dqvkpqshglptwrjfeblfzbofmkfktzbjhidsvqctmbzocbtgtkbgrayg")) + }) + { + Mode = IotOperationsOperationalMode.Enabled, + RequestDiskPersistence = IotOperationsOperationalMode.Enabled, + }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowGraphName, data); + DataflowGraphResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataflowGraphResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_DataflowGraphGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsDataflowProfileResource created on azure + // for more information of creating IotOperationsDataflowProfileResource, please refer to the document of IotOperationsDataflowProfileResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + ResourceIdentifier iotOperationsDataflowProfileResourceId = IotOperationsDataflowProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); + + // get the collection of this DataflowGraphResource + DataflowGraphResourceCollection collection = iotOperationsDataflowProfile.GetDataflowGraphResources(); + + // invoke the operation + string dataflowGraphName = "resource-123"; + DataflowGraphResource result = await collection.GetAsync(dataflowGraphName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataflowGraphResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_DataflowGraphListByDataflowProfileMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_ListByDataflowProfile_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_ListByDataflowProfile" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsDataflowProfileResource created on azure + // for more information of creating IotOperationsDataflowProfileResource, please refer to the document of IotOperationsDataflowProfileResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + ResourceIdentifier iotOperationsDataflowProfileResourceId = IotOperationsDataflowProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); + + // get the collection of this DataflowGraphResource + DataflowGraphResourceCollection collection = iotOperationsDataflowProfile.GetDataflowGraphResources(); + + // invoke the operation and iterate over the result + await foreach (DataflowGraphResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataflowGraphResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_DataflowGraphGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsDataflowProfileResource created on azure + // for more information of creating IotOperationsDataflowProfileResource, please refer to the document of IotOperationsDataflowProfileResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + ResourceIdentifier iotOperationsDataflowProfileResourceId = IotOperationsDataflowProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); + + // get the collection of this DataflowGraphResource + DataflowGraphResourceCollection collection = iotOperationsDataflowProfile.GetDataflowGraphResources(); + + // invoke the operation + string dataflowGraphName = "resource-123"; + bool result = await collection.ExistsAsync(dataflowGraphName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_DataflowGraphGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/DataflowGraph_Get_MaximumSet_Gen.json + // this example is just showing the usage of "DataflowGraphResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsDataflowProfileResource created on azure + // for more information of creating IotOperationsDataflowProfileResource, please refer to the document of IotOperationsDataflowProfileResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string dataflowProfileName = "resource-123"; + ResourceIdentifier iotOperationsDataflowProfileResourceId = IotOperationsDataflowProfileResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); + + // get the collection of this DataflowGraphResource + DataflowGraphResourceCollection collection = iotOperationsDataflowProfile.GetDataflowGraphResources(); + + // invoke the operation + string dataflowGraphName = "resource-123"; + NullableResponse response = await collection.GetIfExistsAsync(dataflowGraphName); + DataflowGraphResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + DataflowGraphResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs index 9f121cef1865..a0743cba657c 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_IotOperationsBrokerAuthenticationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerAuthenticationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -43,7 +43,7 @@ public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdateComplex() // invoke the operation string authenticationName = "resource-name123"; - IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData { Properties = new IotOperationsBrokerAuthenticationProperties(new BrokerAuthenticatorMethods[] { @@ -75,6 +75,7 @@ public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdateComplex() }, } }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authenticationName, data); IotOperationsBrokerAuthenticationResource result = lro.Value; @@ -90,7 +91,7 @@ public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdate() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +113,7 @@ public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdate() // invoke the operation string authenticationName = "resource-name123"; - IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData { Properties = new IotOperationsBrokerAuthenticationProperties(new BrokerAuthenticatorMethods[] { @@ -141,6 +142,7 @@ public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdate() }, } }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authenticationName, data); IotOperationsBrokerAuthenticationResource result = lro.Value; @@ -156,7 +158,7 @@ public async Task CreateOrUpdate_BrokerAuthenticationCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_BrokerAuthenticationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +193,7 @@ public async Task Get_BrokerAuthenticationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_BrokerAuthenticationListByResourceGroup() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -228,7 +230,7 @@ public async Task GetAll_BrokerAuthenticationListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_BrokerAuthenticationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -259,7 +261,7 @@ public async Task Exists_BrokerAuthenticationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_BrokerAuthenticationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs index 6058e48bf430..d85b48c41e2c 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthenticationResource.cs @@ -21,7 +21,7 @@ public partial class Sample_IotOperationsBrokerAuthenticationResource [Ignore("Only validating compilation of examples")] public async Task Get_BrokerAuthenticationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_BrokerAuthenticationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BrokerAuthenticationDelete() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_Delete_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Delete_BrokerAuthenticationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerAuthenticationCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerAuthenticationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Update_BrokerAuthenticationCreateOrUpdateComplex() IotOperationsBrokerAuthenticationResource iotOperationsBrokerAuthentication = client.GetIotOperationsBrokerAuthenticationResource(iotOperationsBrokerAuthenticationResourceId); // invoke the operation - IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData { Properties = new IotOperationsBrokerAuthenticationProperties(new BrokerAuthenticatorMethods[] { @@ -132,6 +132,7 @@ public async Task Update_BrokerAuthenticationCreateOrUpdateComplex() }, } }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerAuthentication.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerAuthenticationResource result = lro.Value; @@ -147,7 +148,7 @@ public async Task Update_BrokerAuthenticationCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerAuthenticationCreateOrUpdate() { - // Generated from example definition: 2024-11-01/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthentication_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthenticationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +167,7 @@ public async Task Update_BrokerAuthenticationCreateOrUpdate() IotOperationsBrokerAuthenticationResource iotOperationsBrokerAuthentication = client.GetIotOperationsBrokerAuthenticationResource(iotOperationsBrokerAuthenticationResourceId); // invoke the operation - IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthenticationData data = new IotOperationsBrokerAuthenticationData { Properties = new IotOperationsBrokerAuthenticationProperties(new BrokerAuthenticatorMethods[] { @@ -195,6 +196,7 @@ public async Task Update_BrokerAuthenticationCreateOrUpdate() }, } }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerAuthentication.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerAuthenticationResource result = lro.Value; diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs index 8c81822dcbba..9aa3f930c9ce 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_IotOperationsBrokerAuthorizationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerAuthorizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -43,7 +43,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateComplex() // invoke the operation string authorizationName = "resource-name123"; - IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData { Properties = new IotOperationsBrokerAuthorizationProperties(new BrokerAuthorizationConfig { @@ -75,6 +75,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateComplex() StateStoreResources = {new StateStoreResourceRule(StateStoreResourceKeyType.Pattern, new string[]{"myreadkey", "myotherkey?", "mynumerickeysuffix[0-9]", "clients:{principal.clientId}:*"}, StateStoreResourceDefinitionMethod.Read), new StateStoreResourceRule(StateStoreResourceKeyType.Binary, new string[]{"MTE2IDEwMSAxMTUgMTE2"}, StateStoreResourceDefinitionMethod.ReadWrite)}, }}, }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationName, data); IotOperationsBrokerAuthorizationResource result = lro.Value; @@ -90,7 +91,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdate() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -112,7 +113,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdate() // invoke the operation string authorizationName = "resource-name123"; - IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData { Properties = new IotOperationsBrokerAuthorizationProperties(new BrokerAuthorizationConfig { @@ -137,6 +138,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdate() StateStoreResources = {new StateStoreResourceRule(StateStoreResourceKeyType.Pattern, new string[]{"tkounsqtwvzyaklxjqoerpu"}, StateStoreResourceDefinitionMethod.Read)}, }}, }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationName, data); IotOperationsBrokerAuthorizationResource result = lro.Value; @@ -152,7 +154,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateSimple() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_CreateOrUpdate_Simple.json // this example is just showing the usage of "BrokerAuthorizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +176,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateSimple() // invoke the operation string authorizationName = "resource-name123"; - IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData { Properties = new IotOperationsBrokerAuthorizationProperties(new BrokerAuthorizationConfig { @@ -199,6 +201,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateSimple() StateStoreResources = {new StateStoreResourceRule(StateStoreResourceKeyType.Pattern, new string[]{"*"}, StateStoreResourceDefinitionMethod.ReadWrite)}, }}, }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, authorizationName, data); IotOperationsBrokerAuthorizationResource result = lro.Value; @@ -214,7 +217,7 @@ public async Task CreateOrUpdate_BrokerAuthorizationCreateOrUpdateSimple() [Ignore("Only validating compilation of examples")] public async Task Get_BrokerAuthorizationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -249,7 +252,7 @@ public async Task Get_BrokerAuthorizationGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_BrokerAuthorizationListByResourceGroup() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -286,7 +289,7 @@ public async Task GetAll_BrokerAuthorizationListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_BrokerAuthorizationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -317,7 +320,7 @@ public async Task Exists_BrokerAuthorizationGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_BrokerAuthorizationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs index 8284be4044ef..20782ab008b6 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerAuthorizationResource.cs @@ -21,7 +21,7 @@ public partial class Sample_IotOperationsBrokerAuthorizationResource [Ignore("Only validating compilation of examples")] public async Task Get_BrokerAuthorizationGet() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task Get_BrokerAuthorizationGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BrokerAuthorizationDelete() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_Delete_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task Delete_BrokerAuthorizationDelete() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerAuthorizationCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerAuthorizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -100,7 +100,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdateComplex() IotOperationsBrokerAuthorizationResource iotOperationsBrokerAuthorization = client.GetIotOperationsBrokerAuthorizationResource(iotOperationsBrokerAuthorizationResourceId); // invoke the operation - IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData { Properties = new IotOperationsBrokerAuthorizationProperties(new BrokerAuthorizationConfig { @@ -132,6 +132,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdateComplex() StateStoreResources = {new StateStoreResourceRule(StateStoreResourceKeyType.Pattern, new string[]{"myreadkey", "myotherkey?", "mynumerickeysuffix[0-9]", "clients:{principal.clientId}:*"}, StateStoreResourceDefinitionMethod.Read), new StateStoreResourceRule(StateStoreResourceKeyType.Binary, new string[]{"MTE2IDEwMSAxMTUgMTE2"}, StateStoreResourceDefinitionMethod.ReadWrite)}, }}, }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerAuthorization.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerAuthorizationResource result = lro.Value; @@ -147,7 +148,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerAuthorizationCreateOrUpdate() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerAuthorizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +167,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdate() IotOperationsBrokerAuthorizationResource iotOperationsBrokerAuthorization = client.GetIotOperationsBrokerAuthorizationResource(iotOperationsBrokerAuthorizationResourceId); // invoke the operation - IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData { Properties = new IotOperationsBrokerAuthorizationProperties(new BrokerAuthorizationConfig { @@ -191,6 +192,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdate() StateStoreResources = {new StateStoreResourceRule(StateStoreResourceKeyType.Pattern, new string[]{"tkounsqtwvzyaklxjqoerpu"}, StateStoreResourceDefinitionMethod.Read)}, }}, }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerAuthorization.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerAuthorizationResource result = lro.Value; @@ -206,7 +208,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerAuthorizationCreateOrUpdateSimple() { - // Generated from example definition: 2024-11-01/BrokerAuthorization_CreateOrUpdate_Simple.json + // Generated from example definition: 2025-07-01-preview/BrokerAuthorization_CreateOrUpdate_Simple.json // this example is just showing the usage of "BrokerAuthorizationResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -225,7 +227,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdateSimple() IotOperationsBrokerAuthorizationResource iotOperationsBrokerAuthorization = client.GetIotOperationsBrokerAuthorizationResource(iotOperationsBrokerAuthorizationResourceId); // invoke the operation - IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerAuthorizationData data = new IotOperationsBrokerAuthorizationData { Properties = new IotOperationsBrokerAuthorizationProperties(new BrokerAuthorizationConfig { @@ -250,6 +252,7 @@ public async Task Update_BrokerAuthorizationCreateOrUpdateSimple() StateStoreResources = {new StateStoreResourceRule(StateStoreResourceKeyType.Pattern, new string[]{"*"}, StateStoreResourceDefinitionMethod.ReadWrite)}, }}, }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerAuthorization.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerAuthorizationResource result = lro.Value; diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerCollection.cs index 2162fc3a56a4..e5a5df7dc7e4 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsBrokerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -41,7 +41,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateComplex() // invoke the operation string brokerName = "resource-name123"; - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { @@ -56,6 +56,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateComplex() GenerateResourceLimitsCpu = IotOperationsOperationalMode.Enabled, MemoryProfile = BrokerMemoryProfile.Medium, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, brokerName, data); IotOperationsBrokerResource result = lro.Value; @@ -71,7 +72,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerCreateOrUpdate() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +93,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdate() // invoke the operation string brokerName = "resource-name123"; - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { @@ -225,6 +226,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdate() GenerateResourceLimitsCpu = IotOperationsOperationalMode.Enabled, MemoryProfile = BrokerMemoryProfile.Tiny, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, brokerName, data); IotOperationsBrokerResource result = lro.Value; @@ -240,7 +242,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerCreateOrUpdateMinimal() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Minimal.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_Minimal.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,12 +263,13 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateMinimal() // invoke the operation string brokerName = "resource-name123"; - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { MemoryProfile = BrokerMemoryProfile.Tiny, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, brokerName, data); IotOperationsBrokerResource result = lro.Value; @@ -282,7 +285,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateMinimal() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerCreateOrUpdateSimple() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Simple.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_Simple.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -303,7 +306,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateSimple() // invoke the operation string brokerName = "resource-name123"; - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { @@ -317,6 +320,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateSimple() GenerateResourceLimitsCpu = IotOperationsOperationalMode.Enabled, MemoryProfile = BrokerMemoryProfile.Low, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, brokerName, data); IotOperationsBrokerResource result = lro.Value; @@ -332,7 +336,7 @@ public async Task CreateOrUpdate_BrokerCreateOrUpdateSimple() [Ignore("Only validating compilation of examples")] public async Task Get_BrokerGet() { - // Generated from example definition: 2024-11-01/Broker_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -366,7 +370,7 @@ public async Task Get_BrokerGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_BrokerListByResourceGroup() { - // Generated from example definition: 2024-11-01/Broker_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -402,7 +406,7 @@ public async Task GetAll_BrokerListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_BrokerGet() { - // Generated from example definition: 2024-11-01/Broker_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -432,7 +436,7 @@ public async Task Exists_BrokerGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_BrokerGet() { - // Generated from example definition: 2024-11-01/Broker_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs index 2b711a83140c..07318d305302 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsBrokerListenerCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerListenerCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerListenerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdateComplex() // invoke the operation string listenerName = "resource-name123"; - IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData { Properties = new IotOperationsBrokerListenerProperties(new BrokerListenerPort[] { @@ -76,6 +76,7 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdateComplex() { ServiceType = BlockerListenerServiceType.LoadBalancer, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, listenerName, data); IotOperationsBrokerListenerResource result = lro.Value; @@ -91,7 +92,7 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerListenerCreateOrUpdate() { - // Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -113,7 +114,7 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdate() // invoke the operation string listenerName = "resource-name123"; - IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData { Properties = new IotOperationsBrokerListenerProperties(new BrokerListenerPort[] { @@ -141,6 +142,7 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdate() ServiceName = "tpfiszlapdpxktx", ServiceType = BlockerListenerServiceType.ClusterIP, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, listenerName, data); IotOperationsBrokerListenerResource result = lro.Value; @@ -156,7 +158,7 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_BrokerListenerCreateOrUpdateSimple() { - // Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_Simple.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_CreateOrUpdate_Simple.json // this example is just showing the usage of "BrokerListenerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -178,12 +180,13 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdateSimple() // invoke the operation string listenerName = "resource-name123"; - IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData { Properties = new IotOperationsBrokerListenerProperties(new BrokerListenerPort[] { new BrokerListenerPort(1883) }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, listenerName, data); IotOperationsBrokerListenerResource result = lro.Value; @@ -199,7 +202,7 @@ public async Task CreateOrUpdate_BrokerListenerCreateOrUpdateSimple() [Ignore("Only validating compilation of examples")] public async Task Get_BrokerListenerGet() { - // Generated from example definition: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +237,7 @@ public async Task Get_BrokerListenerGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_BrokerListenerListByResourceGroup() { - // Generated from example definition: 2024-11-01/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -271,7 +274,7 @@ public async Task GetAll_BrokerListenerListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_BrokerListenerGet() { - // Generated from example definition: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -302,7 +305,7 @@ public async Task Exists_BrokerListenerGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_BrokerListenerGet() { - // Generated from example definition: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs index cba233d24ac7..8c16d7faf4e6 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerListenerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsBrokerListenerResource [Ignore("Only validating compilation of examples")] public async Task Get_BrokerListenerGet() { - // Generated from example definition: 2024-11-01/BrokerListener_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_BrokerListenerGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BrokerListenerDelete() { - // Generated from example definition: 2024-11-01/BrokerListener_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_Delete_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_BrokerListenerDelete() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerListenerCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerListenerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Update_BrokerListenerCreateOrUpdateComplex() IotOperationsBrokerListenerResource iotOperationsBrokerListener = client.GetIotOperationsBrokerListenerResource(iotOperationsBrokerListenerResourceId); // invoke the operation - IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData { Properties = new IotOperationsBrokerListenerProperties(new BrokerListenerPort[] { @@ -133,6 +133,7 @@ public async Task Update_BrokerListenerCreateOrUpdateComplex() { ServiceType = BlockerListenerServiceType.LoadBalancer, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerListener.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerListenerResource result = lro.Value; @@ -148,7 +149,7 @@ public async Task Update_BrokerListenerCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerListenerCreateOrUpdate() { - // Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerListenerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -167,7 +168,7 @@ public async Task Update_BrokerListenerCreateOrUpdate() IotOperationsBrokerListenerResource iotOperationsBrokerListener = client.GetIotOperationsBrokerListenerResource(iotOperationsBrokerListenerResourceId); // invoke the operation - IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData { Properties = new IotOperationsBrokerListenerProperties(new BrokerListenerPort[] { @@ -195,6 +196,7 @@ public async Task Update_BrokerListenerCreateOrUpdate() ServiceName = "tpfiszlapdpxktx", ServiceType = BlockerListenerServiceType.ClusterIP, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerListener.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerListenerResource result = lro.Value; @@ -210,7 +212,7 @@ public async Task Update_BrokerListenerCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerListenerCreateOrUpdateSimple() { - // Generated from example definition: 2024-11-01/BrokerListener_CreateOrUpdate_Simple.json + // Generated from example definition: 2025-07-01-preview/BrokerListener_CreateOrUpdate_Simple.json // this example is just showing the usage of "BrokerListenerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -229,12 +231,13 @@ public async Task Update_BrokerListenerCreateOrUpdateSimple() IotOperationsBrokerListenerResource iotOperationsBrokerListener = client.GetIotOperationsBrokerListenerResource(iotOperationsBrokerListenerResourceId); // invoke the operation - IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerListenerData data = new IotOperationsBrokerListenerData { Properties = new IotOperationsBrokerListenerProperties(new BrokerListenerPort[] { new BrokerListenerPort(1883) }), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBrokerListener.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerListenerResource result = lro.Value; diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerResource.cs index 47157e7c8f23..ecad46824d16 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsBrokerResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsBrokerResource [Ignore("Only validating compilation of examples")] public async Task Get_BrokerGet() { - // Generated from example definition: 2024-11-01/Broker_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_Get_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_BrokerGet() [Ignore("Only validating compilation of examples")] public async Task Delete_BrokerDelete() { - // Generated from example definition: 2024-11-01/Broker_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_Delete_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_BrokerDelete() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerCreateOrUpdateComplex() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Complex.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_Complex.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Update_BrokerCreateOrUpdateComplex() IotOperationsBrokerResource iotOperationsBroker = client.GetIotOperationsBrokerResource(iotOperationsBrokerResourceId); // invoke the operation - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { @@ -111,6 +111,7 @@ public async Task Update_BrokerCreateOrUpdateComplex() GenerateResourceLimitsCpu = IotOperationsOperationalMode.Enabled, MemoryProfile = BrokerMemoryProfile.Medium, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBroker.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerResource result = lro.Value; @@ -126,7 +127,7 @@ public async Task Update_BrokerCreateOrUpdateComplex() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerCreateOrUpdate() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -144,7 +145,7 @@ public async Task Update_BrokerCreateOrUpdate() IotOperationsBrokerResource iotOperationsBroker = client.GetIotOperationsBrokerResource(iotOperationsBrokerResourceId); // invoke the operation - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { @@ -277,6 +278,7 @@ public async Task Update_BrokerCreateOrUpdate() GenerateResourceLimitsCpu = IotOperationsOperationalMode.Enabled, MemoryProfile = BrokerMemoryProfile.Tiny, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBroker.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerResource result = lro.Value; @@ -292,7 +294,7 @@ public async Task Update_BrokerCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerCreateOrUpdateMinimal() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Minimal.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_Minimal.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -310,12 +312,13 @@ public async Task Update_BrokerCreateOrUpdateMinimal() IotOperationsBrokerResource iotOperationsBroker = client.GetIotOperationsBrokerResource(iotOperationsBrokerResourceId); // invoke the operation - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { MemoryProfile = BrokerMemoryProfile.Tiny, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBroker.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerResource result = lro.Value; @@ -331,7 +334,7 @@ public async Task Update_BrokerCreateOrUpdateMinimal() [Ignore("Only validating compilation of examples")] public async Task Update_BrokerCreateOrUpdateSimple() { - // Generated from example definition: 2024-11-01/Broker_CreateOrUpdate_Simple.json + // Generated from example definition: 2025-07-01-preview/Broker_CreateOrUpdate_Simple.json // this example is just showing the usage of "BrokerResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -349,7 +352,7 @@ public async Task Update_BrokerCreateOrUpdateSimple() IotOperationsBrokerResource iotOperationsBroker = client.GetIotOperationsBrokerResource(iotOperationsBrokerResourceId); // invoke the operation - IotOperationsBrokerData data = new IotOperationsBrokerData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsBrokerData data = new IotOperationsBrokerData { Properties = new IotOperationsBrokerProperties { @@ -363,6 +366,7 @@ public async Task Update_BrokerCreateOrUpdateSimple() GenerateResourceLimitsCpu = IotOperationsOperationalMode.Enabled, MemoryProfile = BrokerMemoryProfile.Low, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsBroker.UpdateAsync(WaitUntil.Completed, data); IotOperationsBrokerResource result = lro.Value; diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowCollection.cs index 728994d656b3..9ff13b3739da 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsDataflowCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexContextualization() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,7 +42,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexContextualization( // invoke the operation string dataflowName = "aio-to-adx-contexualized"; - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -72,6 +72,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexContextualization( { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowName, data); IotOperationsDataflowResource result = lro.Value; @@ -87,7 +88,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexContextualization( [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexEventHub() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +110,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexEventHub() // invoke the operation string dataflowName = "aio-to-event-hub-transformed"; - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -153,6 +154,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexEventHub() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowName, data); IotOperationsDataflowResource result = lro.Value; @@ -168,7 +170,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateComplexEventHub() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowCreateOrUpdateFilterToTopic() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_FilterToTopic.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -190,7 +192,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateFilterToTopic() // invoke the operation string dataflowName = "mqtt-filter-to-topic"; - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -224,6 +226,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateFilterToTopic() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowName, data); IotOperationsDataflowResource result = lro.Value; @@ -239,7 +242,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateFilterToTopic() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowCreateOrUpdate() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -261,7 +264,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdate() // invoke the operation string dataflowName = "resource-name123"; - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -302,6 +305,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdate() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowName, data); IotOperationsDataflowResource result = lro.Value; @@ -317,7 +321,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleEventGrid() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -339,7 +343,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleEventGrid() // invoke the operation string dataflowName = "aio-to-event-grid"; - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -357,6 +361,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleEventGrid() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowName, data); IotOperationsDataflowResource result = lro.Value; @@ -372,7 +377,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleEventGrid() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleFabric() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_SimpleFabric.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -394,7 +399,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleFabric() // invoke the operation string dataflowName = "aio-to-fabric"; - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -420,6 +425,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleFabric() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowName, data); IotOperationsDataflowResource result = lro.Value; @@ -435,7 +441,7 @@ public async Task CreateOrUpdate_DataflowCreateOrUpdateSimpleFabric() [Ignore("Only validating compilation of examples")] public async Task Get_DataflowGet() { - // Generated from example definition: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -470,7 +476,7 @@ public async Task Get_DataflowGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DataflowListByProfileResource() { - // Generated from example definition: 2024-11-01/Dataflow_ListByProfileResource_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_ListByProfileResource_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -507,7 +513,7 @@ public async Task GetAll_DataflowListByProfileResource() [Ignore("Only validating compilation of examples")] public async Task Exists_DataflowGet() { - // Generated from example definition: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -538,7 +544,7 @@ public async Task Exists_DataflowGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DataflowGet() { - // Generated from example definition: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs index 5a7b23188428..25f2075011bd 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsDataflowEndpointCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADLSv2() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -41,7 +41,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADLSv2() // invoke the operation string dataflowEndpointName = "adlsv2-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.DataLakeStorage) { @@ -50,6 +50,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADLSv2() AccessTokenSecretRef = "my-secret", }, "example.blob.core.windows.net"), }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -65,7 +66,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADLSv2() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADX() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_ADX.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -86,7 +87,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADX() // invoke the operation string dataflowEndpointName = "adx-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.DataExplorer) { @@ -99,6 +100,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADX() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -114,7 +116,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateADX() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateAIO() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_AIO.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -135,7 +137,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateAIO() // invoke the operation string dataflowEndpointName = "aio-builtin-broker-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Mqtt) { @@ -152,6 +154,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateAIO() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -167,7 +170,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateAIO() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventGrid() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -188,7 +191,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventGrid() // invoke the operation string dataflowEndpointName = "event-grid-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Mqtt) { @@ -201,6 +204,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventGrid() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -216,7 +220,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventGrid() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventHub() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -237,7 +241,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventHub() // invoke the operation string dataflowEndpointName = "event-hub-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Kafka) { @@ -250,6 +254,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventHub() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -265,7 +270,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateEventHub() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateFabric() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -286,12 +291,13 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateFabric() // invoke the operation string dataflowEndpointName = "fabric-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.FabricOneLake) { FabricOneLakeSettings = new DataflowEndpointFabricOneLake(new DataflowEndpointFabricOneLakeAuthentication(FabricOneLakeAuthMethod.SystemAssignedManagedIdentity), new DataflowEndpointFabricOneLakeNames("example-lakehouse", "example-workspace"), DataflowEndpointFabricPathType.Tables, "onelake.dfs.fabric.microsoft.com"), }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -307,7 +313,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateFabric() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateKafka() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -328,7 +334,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateKafka() // invoke the operation string dataflowEndpointName = "generic-kafka-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Kafka) { @@ -357,6 +363,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateKafka() CloudEventAttributes = CloudEventAttributeType.Propagate, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -372,7 +379,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateKafka() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateLocalStorage() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -393,12 +400,13 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateLocalStorage() // invoke the operation string dataflowEndpointName = "local-storage-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.LocalStorage) { LocalStoragePersistentVolumeClaimRef = "example-pvc", }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -414,7 +422,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateLocalStorage() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateMQTT() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -435,7 +443,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateMQTT() // invoke the operation string dataflowEndpointName = "generic-mqtt-broker-endpoint"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Mqtt) { @@ -458,6 +466,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateMQTT() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -473,7 +482,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdateMQTT() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdate() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -494,7 +503,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdate() // invoke the operation string dataflowEndpointName = "resource-name123"; - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.DataExplorer) { @@ -602,6 +611,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdate() CloudEventAttributes = new CloudEventAttributeType("PassThrough"), }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowEndpointName, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -617,7 +627,7 @@ public async Task CreateOrUpdate_DataflowEndpointCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_DataflowEndpointGet() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -651,7 +661,7 @@ public async Task Get_DataflowEndpointGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DataflowEndpointListByResourceGroup() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -687,7 +697,7 @@ public async Task GetAll_DataflowEndpointListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_DataflowEndpointGet() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -717,7 +727,7 @@ public async Task Exists_DataflowEndpointGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DataflowEndpointGet() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs index a625776d2c9d..592b05039d1c 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowEndpointResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsDataflowEndpointResource [Ignore("Only validating compilation of examples")] public async Task Get_DataflowEndpointGet() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_DataflowEndpointGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DataflowEndpointDelete() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_Delete_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DataflowEndpointDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateADLSv2() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADLSv2.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_ADLSv2.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateADLSv2() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.DataLakeStorage) { @@ -105,6 +105,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateADLSv2() AccessTokenSecretRef = "my-secret", }, "example.blob.core.windows.net"), }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -120,7 +121,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateADLSv2() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateADX() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_ADX.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_ADX.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +139,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateADX() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.DataExplorer) { @@ -151,6 +152,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateADX() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -166,7 +168,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateADX() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateAIO() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_AIO.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_AIO.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -184,7 +186,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateAIO() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Mqtt) { @@ -201,6 +203,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateAIO() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -216,7 +219,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateAIO() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateEventGrid() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventGrid.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_EventGrid.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -234,7 +237,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateEventGrid() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Mqtt) { @@ -247,6 +250,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateEventGrid() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -262,7 +266,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateEventGrid() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateEventHub() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_EventHub.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_EventHub.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -280,7 +284,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateEventHub() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Kafka) { @@ -293,6 +297,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateEventHub() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -308,7 +313,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateEventHub() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateFabric() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Fabric.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_Fabric.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -326,12 +331,13 @@ public async Task Update_DataflowEndpointCreateOrUpdateFabric() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.FabricOneLake) { FabricOneLakeSettings = new DataflowEndpointFabricOneLake(new DataflowEndpointFabricOneLakeAuthentication(FabricOneLakeAuthMethod.SystemAssignedManagedIdentity), new DataflowEndpointFabricOneLakeNames("example-lakehouse", "example-workspace"), DataflowEndpointFabricPathType.Tables, "onelake.dfs.fabric.microsoft.com"), }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -347,7 +353,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateFabric() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateKafka() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_Kafka.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_Kafka.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -365,7 +371,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateKafka() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Kafka) { @@ -394,6 +400,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateKafka() CloudEventAttributes = CloudEventAttributeType.Propagate, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -409,7 +416,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateKafka() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateLocalStorage() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_LocalStorage.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_LocalStorage.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -427,12 +434,13 @@ public async Task Update_DataflowEndpointCreateOrUpdateLocalStorage() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.LocalStorage) { LocalStoragePersistentVolumeClaimRef = "example-pvc", }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -448,7 +456,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateLocalStorage() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdateMQTT() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MQTT.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_MQTT.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -466,7 +474,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateMQTT() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.Mqtt) { @@ -489,6 +497,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateMQTT() }, }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; @@ -504,7 +513,7 @@ public async Task Update_DataflowEndpointCreateOrUpdateMQTT() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowEndpointCreateOrUpdate() { - // Generated from example definition: 2024-11-01/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowEndpoint_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "DataflowEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -522,7 +531,7 @@ public async Task Update_DataflowEndpointCreateOrUpdate() IotOperationsDataflowEndpointResource iotOperationsDataflowEndpoint = client.GetIotOperationsDataflowEndpointResource(iotOperationsDataflowEndpointResourceId); // invoke the operation - IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowEndpointData data = new IotOperationsDataflowEndpointData { Properties = new IotOperationsDataflowEndpointProperties(DataflowEndpointType.DataExplorer) { @@ -630,6 +639,7 @@ public async Task Update_DataflowEndpointCreateOrUpdate() CloudEventAttributes = new CloudEventAttributeType("PassThrough"), }, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowEndpoint.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowEndpointResource result = lro.Value; diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs index ab1001d1c18b..63d5e6da6c57 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsDataflowProfileCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowProfileCreateOrUpdate() { - // Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -41,7 +41,7 @@ public async Task CreateOrUpdate_DataflowProfileCreateOrUpdate() // invoke the operation string dataflowProfileName = "resource-name123"; - IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData { Properties = new IotOperationsDataflowProfileProperties { @@ -52,6 +52,7 @@ public async Task CreateOrUpdate_DataflowProfileCreateOrUpdate() }, InstanceCount = 14, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowProfileName, data); IotOperationsDataflowProfileResource result = lro.Value; @@ -67,7 +68,7 @@ public async Task CreateOrUpdate_DataflowProfileCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowProfileCreateOrUpdateMinimal() { - // Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_CreateOrUpdate_Minimal.json // this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,12 +89,13 @@ public async Task CreateOrUpdate_DataflowProfileCreateOrUpdateMinimal() // invoke the operation string dataflowProfileName = "aio-dataflowprofile"; - IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData { Properties = new IotOperationsDataflowProfileProperties { InstanceCount = 1, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowProfileName, data); IotOperationsDataflowProfileResource result = lro.Value; @@ -109,7 +111,7 @@ public async Task CreateOrUpdate_DataflowProfileCreateOrUpdateMinimal() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_DataflowProfileCreateOrUpdateMulti() { - // Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_CreateOrUpdate_Multi.json // this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -130,12 +132,13 @@ public async Task CreateOrUpdate_DataflowProfileCreateOrUpdateMulti() // invoke the operation string dataflowProfileName = "aio-dataflowprofile"; - IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData { Properties = new IotOperationsDataflowProfileProperties { InstanceCount = 3, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, dataflowProfileName, data); IotOperationsDataflowProfileResource result = lro.Value; @@ -151,7 +154,7 @@ public async Task CreateOrUpdate_DataflowProfileCreateOrUpdateMulti() [Ignore("Only validating compilation of examples")] public async Task Get_DataflowProfileGet() { - // Generated from example definition: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -185,7 +188,7 @@ public async Task Get_DataflowProfileGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_DataflowProfileListByResourceGroup() { - // Generated from example definition: 2024-11-01/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -221,7 +224,7 @@ public async Task GetAll_DataflowProfileListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_DataflowProfileGet() { - // Generated from example definition: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -251,7 +254,7 @@ public async Task Exists_DataflowProfileGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_DataflowProfileGet() { - // Generated from example definition: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs index 7f685cfb02cd..dc0bb543efcf 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowProfileResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsDataflowProfileResource [Ignore("Only validating compilation of examples")] public async Task Get_DataflowProfileGet() { - // Generated from example definition: 2024-11-01/DataflowProfile_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_DataflowProfileGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DataflowProfileDelete() { - // Generated from example definition: 2024-11-01/DataflowProfile_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_Delete_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -78,7 +78,7 @@ public async Task Delete_DataflowProfileDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowProfileCreateOrUpdate() { - // Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -96,7 +96,7 @@ public async Task Update_DataflowProfileCreateOrUpdate() IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); // invoke the operation - IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData { Properties = new IotOperationsDataflowProfileProperties { @@ -107,6 +107,7 @@ public async Task Update_DataflowProfileCreateOrUpdate() }, InstanceCount = 14, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowProfile.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowProfileResource result = lro.Value; @@ -122,7 +123,7 @@ public async Task Update_DataflowProfileCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowProfileCreateOrUpdateMinimal() { - // Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Minimal.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_CreateOrUpdate_Minimal.json // this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -140,12 +141,13 @@ public async Task Update_DataflowProfileCreateOrUpdateMinimal() IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); // invoke the operation - IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData { Properties = new IotOperationsDataflowProfileProperties { InstanceCount = 1, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowProfile.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowProfileResource result = lro.Value; @@ -161,7 +163,7 @@ public async Task Update_DataflowProfileCreateOrUpdateMinimal() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowProfileCreateOrUpdateMulti() { - // Generated from example definition: 2024-11-01/DataflowProfile_CreateOrUpdate_Multi.json + // Generated from example definition: 2025-07-01-preview/DataflowProfile_CreateOrUpdate_Multi.json // this example is just showing the usage of "DataflowProfileResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -179,12 +181,13 @@ public async Task Update_DataflowProfileCreateOrUpdateMulti() IotOperationsDataflowProfileResource iotOperationsDataflowProfile = client.GetIotOperationsDataflowProfileResource(iotOperationsDataflowProfileResourceId); // invoke the operation - IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowProfileData data = new IotOperationsDataflowProfileData { Properties = new IotOperationsDataflowProfileProperties { InstanceCount = 3, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflowProfile.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowProfileResource result = lro.Value; diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowResource.cs index 399b936a023e..53a8d58a0d68 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsDataflowResource.cs @@ -20,7 +20,7 @@ public partial class Sample_IotOperationsDataflowResource [Ignore("Only validating compilation of examples")] public async Task Get_DataflowGet() { - // Generated from example definition: 2024-11-01/Dataflow_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_Get_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_DataflowGet() [Ignore("Only validating compilation of examples")] public async Task Delete_DataflowDelete() { - // Generated from example definition: 2024-11-01/Dataflow_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_Delete_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -80,7 +80,7 @@ public async Task Delete_DataflowDelete() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowCreateOrUpdateComplexContextualization() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_ComplexContextualization.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_ComplexContextualization.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Update_DataflowCreateOrUpdateComplexContextualization() IotOperationsDataflowResource iotOperationsDataflow = client.GetIotOperationsDataflowResource(iotOperationsDataflowResourceId); // invoke the operation - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -129,6 +129,7 @@ public async Task Update_DataflowCreateOrUpdateComplexContextualization() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflow.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowResource result = lro.Value; @@ -144,7 +145,7 @@ public async Task Update_DataflowCreateOrUpdateComplexContextualization() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowCreateOrUpdateComplexEventHub() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_ComplexEventHub.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_ComplexEventHub.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -163,7 +164,7 @@ public async Task Update_DataflowCreateOrUpdateComplexEventHub() IotOperationsDataflowResource iotOperationsDataflow = client.GetIotOperationsDataflowResource(iotOperationsDataflowResourceId); // invoke the operation - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -207,6 +208,7 @@ public async Task Update_DataflowCreateOrUpdateComplexEventHub() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflow.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowResource result = lro.Value; @@ -222,7 +224,7 @@ public async Task Update_DataflowCreateOrUpdateComplexEventHub() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowCreateOrUpdateFilterToTopic() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_FilterToTopic.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_FilterToTopic.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -241,7 +243,7 @@ public async Task Update_DataflowCreateOrUpdateFilterToTopic() IotOperationsDataflowResource iotOperationsDataflow = client.GetIotOperationsDataflowResource(iotOperationsDataflowResourceId); // invoke the operation - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -275,6 +277,7 @@ public async Task Update_DataflowCreateOrUpdateFilterToTopic() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflow.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowResource result = lro.Value; @@ -290,7 +293,7 @@ public async Task Update_DataflowCreateOrUpdateFilterToTopic() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowCreateOrUpdate() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -309,7 +312,7 @@ public async Task Update_DataflowCreateOrUpdate() IotOperationsDataflowResource iotOperationsDataflow = client.GetIotOperationsDataflowResource(iotOperationsDataflowResourceId); // invoke the operation - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -350,6 +353,7 @@ public async Task Update_DataflowCreateOrUpdate() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflow.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowResource result = lro.Value; @@ -365,7 +369,7 @@ public async Task Update_DataflowCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowCreateOrUpdateSimpleEventGrid() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_SimpleEventGrid.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_SimpleEventGrid.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -384,7 +388,7 @@ public async Task Update_DataflowCreateOrUpdateSimpleEventGrid() IotOperationsDataflowResource iotOperationsDataflow = client.GetIotOperationsDataflowResource(iotOperationsDataflowResourceId); // invoke the operation - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -402,6 +406,7 @@ public async Task Update_DataflowCreateOrUpdateSimpleEventGrid() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflow.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowResource result = lro.Value; @@ -417,7 +422,7 @@ public async Task Update_DataflowCreateOrUpdateSimpleEventGrid() [Ignore("Only validating compilation of examples")] public async Task Update_DataflowCreateOrUpdateSimpleFabric() { - // Generated from example definition: 2024-11-01/Dataflow_CreateOrUpdate_SimpleFabric.json + // Generated from example definition: 2025-07-01-preview/Dataflow_CreateOrUpdate_SimpleFabric.json // this example is just showing the usage of "DataflowResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -436,7 +441,7 @@ public async Task Update_DataflowCreateOrUpdateSimpleFabric() IotOperationsDataflowResource iotOperationsDataflow = client.GetIotOperationsDataflowResource(iotOperationsDataflowResourceId); // invoke the operation - IotOperationsDataflowData data = new IotOperationsDataflowData(new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation)) + IotOperationsDataflowData data = new IotOperationsDataflowData { Properties = new IotOperationsDataflowProperties(new DataflowOperationProperties[] { @@ -462,6 +467,7 @@ public async Task Update_DataflowCreateOrUpdateSimpleFabric() { Mode = IotOperationsOperationalMode.Enabled, }, + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), }; ArmOperation lro = await iotOperationsDataflow.UpdateAsync(WaitUntil.Completed, data); IotOperationsDataflowResource result = lro.Value; diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceCollection.cs index 8ccae2220ee2..f8f3d0f45381 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_IotOperationsInstanceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_InstanceCreateOrUpdate() { - // Generated from example definition: 2024-11-01/Instance_CreateOrUpdate_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_CreateOrUpdate_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -68,7 +68,7 @@ public async Task CreateOrUpdate_InstanceCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task Get_InstanceGet() { - // Generated from example definition: 2024-11-01/Instance_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_Get_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Get_InstanceGet() [Ignore("Only validating compilation of examples")] public async Task GetAll_InstanceListByResourceGroup() { - // Generated from example definition: 2024-11-01/Instance_ListByResourceGroup_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_ListByResourceGroup_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -136,7 +136,7 @@ public async Task GetAll_InstanceListByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_InstanceGet() { - // Generated from example definition: 2024-11-01/Instance_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_Get_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -165,7 +165,7 @@ public async Task Exists_InstanceGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_InstanceGet() { - // Generated from example definition: 2024-11-01/Instance_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_Get_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceResource.cs index 00889943d261..122ebd34866a 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_IotOperationsInstanceResource.cs @@ -21,7 +21,7 @@ public partial class Sample_IotOperationsInstanceResource [Ignore("Only validating compilation of examples")] public async Task Get_InstanceGet() { - // Generated from example definition: 2024-11-01/Instance_Get_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_Get_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task Get_InstanceGet() [Ignore("Only validating compilation of examples")] public async Task Delete_InstanceDelete() { - // Generated from example definition: 2024-11-01/Instance_Delete_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_Delete_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Delete_InstanceDelete() [Ignore("Only validating compilation of examples")] public async Task Update_InstanceUpdate() { - // Generated from example definition: 2024-11-01/Instance_Update_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_Update_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResource.cs new file mode 100644 index 000000000000..86041bf07fd5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResource.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_RegistryEndpointResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RegistryEndpointGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_Get_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RegistryEndpointResource created on azure + // for more information of creating RegistryEndpointResource, please refer to the document of RegistryEndpointResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string registryEndpointName = "resource-123"; + ResourceIdentifier registryEndpointResourceId = RegistryEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, registryEndpointName); + RegistryEndpointResource registryEndpointResource = client.GetRegistryEndpointResource(registryEndpointResourceId); + + // invoke the operation + RegistryEndpointResource result = await registryEndpointResource.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RegistryEndpointResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Delete_RegistryEndpointDeleteMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_Delete" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RegistryEndpointResource created on azure + // for more information of creating RegistryEndpointResource, please refer to the document of RegistryEndpointResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string registryEndpointName = "resource-123"; + ResourceIdentifier registryEndpointResourceId = RegistryEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, registryEndpointName); + RegistryEndpointResource registryEndpointResource = client.GetRegistryEndpointResource(registryEndpointResourceId); + + // invoke the operation + await registryEndpointResource.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_RegistryEndpointCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this RegistryEndpointResource created on azure + // for more information of creating RegistryEndpointResource, please refer to the document of RegistryEndpointResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + string registryEndpointName = "resource-123"; + ResourceIdentifier registryEndpointResourceId = RegistryEndpointResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName, registryEndpointName); + RegistryEndpointResource registryEndpointResource = client.GetRegistryEndpointResource(registryEndpointResourceId); + + // invoke the operation + RegistryEndpointResourceData data = new RegistryEndpointResourceData + { + Properties = new RegistryEndpointProperties("contoso.azurecr.io", null), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await registryEndpointResource.UpdateAsync(WaitUntil.Completed, data); + RegistryEndpointResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RegistryEndpointResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResourceCollection.cs new file mode 100644 index 000000000000..6b480c597daa --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_RegistryEndpointResourceCollection.cs @@ -0,0 +1,201 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.IotOperations.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.IotOperations.Samples +{ + public partial class Sample_RegistryEndpointResourceCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_RegistryEndpointCreateOrUpdateMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this RegistryEndpointResource + RegistryEndpointResourceCollection collection = iotOperationsInstance.GetRegistryEndpointResources(); + + // invoke the operation + string registryEndpointName = "resource-123"; + RegistryEndpointResourceData data = new RegistryEndpointResourceData + { + Properties = new RegistryEndpointProperties("contoso.azurecr.io", null), + ExtendedLocation = new IotOperationsExtendedLocation("qmbrfwcpwwhggszhrdjv", IotOperationsExtendedLocationType.CustomLocation), + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, registryEndpointName, data); + RegistryEndpointResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RegistryEndpointResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_RegistryEndpointGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_Get_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this RegistryEndpointResource + RegistryEndpointResourceCollection collection = iotOperationsInstance.GetRegistryEndpointResources(); + + // invoke the operation + string registryEndpointName = "resource-123"; + RegistryEndpointResource result = await collection.GetAsync(registryEndpointName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RegistryEndpointResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetAll_RegistryEndpointListByInstanceResourceMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_ListByInstanceResource_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_ListByInstanceResource" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this RegistryEndpointResource + RegistryEndpointResourceCollection collection = iotOperationsInstance.GetRegistryEndpointResources(); + + // invoke the operation and iterate over the result + await foreach (RegistryEndpointResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RegistryEndpointResourceData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_RegistryEndpointGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_Get_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this RegistryEndpointResource + RegistryEndpointResourceCollection collection = iotOperationsInstance.GetRegistryEndpointResources(); + + // invoke the operation + string registryEndpointName = "resource-123"; + bool result = await collection.ExistsAsync(registryEndpointName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_RegistryEndpointGetMaximumSet() + { + // Generated from example definition: 2025-07-01-preview/RegistryEndpoint_Get_MaximumSet_Gen.json + // this example is just showing the usage of "RegistryEndpointResource_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this IotOperationsInstanceResource created on azure + // for more information of creating IotOperationsInstanceResource, please refer to the document of IotOperationsInstanceResource + string subscriptionId = "F8C729F9-DF9C-4743-848F-96EE433D8E53"; + string resourceGroupName = "rgiotoperations"; + string instanceName = "resource-123"; + ResourceIdentifier iotOperationsInstanceResourceId = IotOperationsInstanceResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, instanceName); + IotOperationsInstanceResource iotOperationsInstance = client.GetIotOperationsInstanceResource(iotOperationsInstanceResourceId); + + // get the collection of this RegistryEndpointResource + RegistryEndpointResourceCollection collection = iotOperationsInstance.GetRegistryEndpointResources(); + + // invoke the operation + string registryEndpointName = "resource-123"; + NullableResponse response = await collection.GetIfExistsAsync(registryEndpointName); + RegistryEndpointResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine("Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + RegistryEndpointResourceData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 07082aafb691..2310693f7da5 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetIotOperationsInstances_InstanceListBySubscription() { - // Generated from example definition: 2024-11-01/Instance_ListBySubscription_MaximumSet_Gen.json + // Generated from example definition: 2025-07-01-preview/Instance_ListBySubscription_MaximumSet_Gen.json // this example is just showing the usage of "InstanceResource_ListBySubscription" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.Serialization.cs new file mode 100644 index 000000000000..0fd600bcf883 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class AkriConnectorResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AkriConnectorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); + + AkriConnectorResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.cs new file mode 100644 index 000000000000..702c237cee7d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResource.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A Class representing an AkriConnectorResource along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAkriConnectorResource method. + /// Otherwise you can get one from its parent resource using the GetAkriConnectorResource method. + /// + public partial class AkriConnectorResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The instanceName. + /// The akriConnectorTemplateName. + /// The akriConnectorName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _akriConnectorResourceAkriConnectorClientDiagnostics; + private readonly AkriConnectorRestOperations _akriConnectorResourceAkriConnectorRestClient; + private readonly AkriConnectorResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.IoTOperations/instances/akriConnectorTemplates/akriConnectors"; + + /// Initializes a new instance of the class for mocking. + protected AkriConnectorResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AkriConnectorResource(ArmClient client, AkriConnectorResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AkriConnectorResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _akriConnectorResourceAkriConnectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string akriConnectorResourceAkriConnectorApiVersion); + _akriConnectorResourceAkriConnectorRestClient = new AkriConnectorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, akriConnectorResourceAkriConnectorApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AkriConnectorResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResource.Get"); + scope.Start(); + try + { + var response = await _akriConnectorResourceAkriConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResource.Get"); + scope.Start(); + try + { + var response = _akriConnectorResourceAkriConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResource.Delete"); + scope.Start(); + try + { + var response = await _akriConnectorResourceAkriConnectorRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(_akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, _akriConnectorResourceAkriConnectorRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResource.Delete"); + scope.Start(); + try + { + var response = _akriConnectorResourceAkriConnectorRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new IotOperationsArmOperation(_akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, _akriConnectorResourceAkriConnectorRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AkriConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResource.Update"); + scope.Start(); + try + { + var response = await _akriConnectorResourceAkriConnectorRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new AkriConnectorResourceOperationSource(Client), _akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, _akriConnectorResourceAkriConnectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AkriConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResource.Update"); + scope.Start(); + try + { + var response = _akriConnectorResourceAkriConnectorRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new IotOperationsArmOperation(new AkriConnectorResourceOperationSource(Client), _akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, _akriConnectorResourceAkriConnectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceCollection.cs new file mode 100644 index 000000000000..30d0bcf57fce --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAkriConnectorResources method from an instance of . + /// + public partial class AkriConnectorResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _akriConnectorResourceAkriConnectorClientDiagnostics; + private readonly AkriConnectorRestOperations _akriConnectorResourceAkriConnectorRestClient; + + /// Initializes a new instance of the class for mocking. + protected AkriConnectorResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AkriConnectorResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _akriConnectorResourceAkriConnectorClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", AkriConnectorResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AkriConnectorResource.ResourceType, out string akriConnectorResourceAkriConnectorApiVersion); + _akriConnectorResourceAkriConnectorRestClient = new AkriConnectorRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, akriConnectorResourceAkriConnectorApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AkriConnectorTemplateResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AkriConnectorTemplateResource.ResourceType), nameof(id)); + } + + /// + /// Create a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of AkriConnector resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string akriConnectorName, AkriConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _akriConnectorResourceAkriConnectorRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new AkriConnectorResourceOperationSource(Client), _akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, _akriConnectorResourceAkriConnectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of AkriConnector resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string akriConnectorName, AkriConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _akriConnectorResourceAkriConnectorRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, data, cancellationToken); + var operation = new IotOperationsArmOperation(new AkriConnectorResourceOperationSource(Client), _akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, _akriConnectorResourceAkriConnectorRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.Get"); + scope.Start(); + try + { + var response = await _akriConnectorResourceAkriConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.Get"); + scope.Start(); + try + { + var response = _akriConnectorResourceAkriConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AkriConnectorResource resources by AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors + /// + /// + /// Operation Id + /// AkriConnectorResource_ListByTemplate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _akriConnectorResourceAkriConnectorRestClient.CreateListByTemplateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _akriConnectorResourceAkriConnectorRestClient.CreateListByTemplateNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AkriConnectorResource(Client, AkriConnectorResourceData.DeserializeAkriConnectorResourceData(e)), _akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, "AkriConnectorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AkriConnectorResource resources by AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors + /// + /// + /// Operation Id + /// AkriConnectorResource_ListByTemplate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _akriConnectorResourceAkriConnectorRestClient.CreateListByTemplateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _akriConnectorResourceAkriConnectorRestClient.CreateListByTemplateNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AkriConnectorResource(Client, AkriConnectorResourceData.DeserializeAkriConnectorResourceData(e)), _akriConnectorResourceAkriConnectorClientDiagnostics, Pipeline, "AkriConnectorResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _akriConnectorResourceAkriConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.Exists"); + scope.Start(); + try + { + var response = _akriConnectorResourceAkriConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _akriConnectorResourceAkriConnectorRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var scope = _akriConnectorResourceAkriConnectorClientDiagnostics.CreateScope("AkriConnectorResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _akriConnectorResourceAkriConnectorRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, akriConnectorName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.Serialization.cs new file mode 100644 index 000000000000..0c5b6cfdfc61 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.Serialization.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class AkriConnectorResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } + } + + AkriConnectorResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorResourceData(document.RootElement, options); + } + + internal static AkriConnectorResourceData DeserializeAkriConnectorResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorProperties properties = default; + IotOperationsExtendedLocation extendedLocation = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AkriConnectorProperties.DeserializeAkriConnectorProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorResourceData( + id, + name, + type, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorResourceData)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.cs new file mode 100644 index 000000000000..b8c8c2db59ab --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorResourceData.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing the AkriConnectorResource data model. + /// AkriConnector resource. + /// + public partial class AkriConnectorResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AkriConnectorProperties properties, IotOperationsExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + internal AkriConnectorProperties Properties { get; set; } + /// The status of the last operation. + public IotOperationsProvisioningState? AkriConnectorProvisioningState + { + get => Properties is null ? default : Properties.ProvisioningState; + } + + /// Edge location of the resource. + public IotOperationsExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.Serialization.cs new file mode 100644 index 000000000000..aa55344e9194 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class AkriConnectorTemplateResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AkriConnectorTemplateResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); + + AkriConnectorTemplateResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.cs new file mode 100644 index 000000000000..2bfd5bbf4abe --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResource.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A Class representing an AkriConnectorTemplateResource along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAkriConnectorTemplateResource method. + /// Otherwise you can get one from its parent resource using the GetAkriConnectorTemplateResource method. + /// + public partial class AkriConnectorTemplateResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The instanceName. + /// The akriConnectorTemplateName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics; + private readonly AkriConnectorTemplateRestOperations _akriConnectorTemplateResourceAkriConnectorTemplateRestClient; + private readonly AkriConnectorTemplateResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.IoTOperations/instances/akriConnectorTemplates"; + + /// Initializes a new instance of the class for mocking. + protected AkriConnectorTemplateResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AkriConnectorTemplateResource(ArmClient client, AkriConnectorTemplateResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AkriConnectorTemplateResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string akriConnectorTemplateResourceAkriConnectorTemplateApiVersion); + _akriConnectorTemplateResourceAkriConnectorTemplateRestClient = new AkriConnectorTemplateRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, akriConnectorTemplateResourceAkriConnectorTemplateApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AkriConnectorTemplateResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// Gets a collection of AkriConnectorResources in the AkriConnectorTemplateResource. + /// An object representing collection of AkriConnectorResources and their operations over a AkriConnectorResource. + public virtual AkriConnectorResourceCollection GetAkriConnectorResources() + { + return GetCachedClient(client => new AkriConnectorResourceCollection(client, Id)); + } + + /// + /// Get a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAkriConnectorResourceAsync(string akriConnectorName, CancellationToken cancellationToken = default) + { + return await GetAkriConnectorResources().GetAsync(akriConnectorName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AkriConnectorResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName}/akriConnectors/{akriConnectorName} + /// + /// + /// Operation Id + /// AkriConnectorResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAkriConnectorResource(string akriConnectorName, CancellationToken cancellationToken = default) + { + return GetAkriConnectorResources().Get(akriConnectorName, cancellationToken); + } + + /// + /// Get a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResource.Get"); + scope.Start(); + try + { + var response = await _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResource.Get"); + scope.Start(); + try + { + var response = _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResource.Delete"); + scope.Start(); + try + { + var response = await _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(_akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResource.Delete"); + scope.Start(); + try + { + var response = _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new IotOperationsArmOperation(_akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AkriConnectorTemplateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResource.Update"); + scope.Start(); + try + { + var response = await _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new AkriConnectorTemplateResourceOperationSource(Client), _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AkriConnectorTemplateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResource.Update"); + scope.Start(); + try + { + var response = _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new IotOperationsArmOperation(new AkriConnectorTemplateResourceOperationSource(Client), _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceCollection.cs new file mode 100644 index 000000000000..ebf9ad20e400 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAkriConnectorTemplateResources method from an instance of . + /// + public partial class AkriConnectorTemplateResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics; + private readonly AkriConnectorTemplateRestOperations _akriConnectorTemplateResourceAkriConnectorTemplateRestClient; + + /// Initializes a new instance of the class for mocking. + protected AkriConnectorTemplateResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AkriConnectorTemplateResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", AkriConnectorTemplateResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AkriConnectorTemplateResource.ResourceType, out string akriConnectorTemplateResourceAkriConnectorTemplateApiVersion); + _akriConnectorTemplateResourceAkriConnectorTemplateRestClient = new AkriConnectorTemplateRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, akriConnectorTemplateResourceAkriConnectorTemplateApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != IotOperationsInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, IotOperationsInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Create a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of AkriConnectorTemplate resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string akriConnectorTemplateName, AkriConnectorTemplateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new AkriConnectorTemplateResourceOperationSource(Client), _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of AkriConnectorTemplate resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string akriConnectorTemplateName, AkriConnectorTemplateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, data, cancellationToken); + var operation = new IotOperationsArmOperation(new AkriConnectorTemplateResourceOperationSource(Client), _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.Get"); + scope.Start(); + try + { + var response = await _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.Get"); + scope.Start(); + try + { + var response = _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AkriConnectorTemplateResource resources by InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_ListByInstanceResource + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateListByInstanceResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateListByInstanceResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AkriConnectorTemplateResource(Client, AkriConnectorTemplateResourceData.DeserializeAkriConnectorTemplateResourceData(e)), _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, "AkriConnectorTemplateResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AkriConnectorTemplateResource resources by InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_ListByInstanceResource + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateListByInstanceResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.CreateListByInstanceResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AkriConnectorTemplateResource(Client, AkriConnectorTemplateResourceData.DeserializeAkriConnectorTemplateResourceData(e)), _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics, Pipeline, "AkriConnectorTemplateResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.Exists"); + scope.Start(); + try + { + var response = _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var scope = _akriConnectorTemplateResourceAkriConnectorTemplateClientDiagnostics.CreateScope("AkriConnectorTemplateResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _akriConnectorTemplateResourceAkriConnectorTemplateRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriConnectorTemplateName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AkriConnectorTemplateResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.Serialization.cs new file mode 100644 index 000000000000..76438cc094e3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.Serialization.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class AkriConnectorTemplateResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } + } + + AkriConnectorTemplateResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateResourceData(document.RootElement, options); + } + + internal static AkriConnectorTemplateResourceData DeserializeAkriConnectorTemplateResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateProperties properties = default; + IotOperationsExtendedLocation extendedLocation = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AkriConnectorTemplateProperties.DeserializeAkriConnectorTemplateProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateResourceData( + id, + name, + type, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceData)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.cs new file mode 100644 index 000000000000..3bfecc0a5419 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriConnectorTemplateResourceData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing the AkriConnectorTemplateResource data model. + /// AkriConnectorTemplate resource. + /// + public partial class AkriConnectorTemplateResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AkriConnectorTemplateProperties properties, IotOperationsExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public AkriConnectorTemplateProperties Properties { get; set; } + /// Edge location of the resource. + public IotOperationsExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.Serialization.cs new file mode 100644 index 000000000000..d21718b12d81 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class AkriDiscoveryHandlerResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + AkriDiscoveryHandlerResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); + + AkriDiscoveryHandlerResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.cs new file mode 100644 index 000000000000..82bded1f556f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A Class representing an AkriDiscoveryHandlerResource along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAkriDiscoveryHandlerResource method. + /// Otherwise you can get one from its parent resource using the GetAkriDiscoveryHandlerResource method. + /// + public partial class AkriDiscoveryHandlerResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The instanceName. + /// The akriDiscoveryHandlerName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics; + private readonly AkriDiscoveryHandlerRestOperations _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient; + private readonly AkriDiscoveryHandlerResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.IoTOperations/instances/akriDiscoveryHandlers"; + + /// Initializes a new instance of the class for mocking. + protected AkriDiscoveryHandlerResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AkriDiscoveryHandlerResource(ArmClient client, AkriDiscoveryHandlerResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AkriDiscoveryHandlerResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string akriDiscoveryHandlerResourceAkriDiscoveryHandlerApiVersion); + _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient = new AkriDiscoveryHandlerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, akriDiscoveryHandlerResourceAkriDiscoveryHandlerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual AkriDiscoveryHandlerResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResource.Get"); + scope.Start(); + try + { + var response = await _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriDiscoveryHandlerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResource.Get"); + scope.Start(); + try + { + var response = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriDiscoveryHandlerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResource.Delete"); + scope.Start(); + try + { + var response = await _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(_akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResource.Delete"); + scope.Start(); + try + { + var response = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new IotOperationsArmOperation(_akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, AkriDiscoveryHandlerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResource.Update"); + scope.Start(); + try + { + var response = await _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new AkriDiscoveryHandlerResourceOperationSource(Client), _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, AkriDiscoveryHandlerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResource.Update"); + scope.Start(); + try + { + var response = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new IotOperationsArmOperation(new AkriDiscoveryHandlerResourceOperationSource(Client), _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceCollection.cs new file mode 100644 index 000000000000..8bb48024bc37 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAkriDiscoveryHandlerResources method from an instance of . + /// + public partial class AkriDiscoveryHandlerResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics; + private readonly AkriDiscoveryHandlerRestOperations _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient; + + /// Initializes a new instance of the class for mocking. + protected AkriDiscoveryHandlerResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AkriDiscoveryHandlerResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", AkriDiscoveryHandlerResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AkriDiscoveryHandlerResource.ResourceType, out string akriDiscoveryHandlerResourceAkriDiscoveryHandlerApiVersion); + _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient = new AkriDiscoveryHandlerRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, akriDiscoveryHandlerResourceAkriDiscoveryHandlerApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != IotOperationsInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, IotOperationsInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Create a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of AkriDiscoveryHandler resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string akriDiscoveryHandlerName, AkriDiscoveryHandlerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new AkriDiscoveryHandlerResourceOperationSource(Client), _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of AkriDiscoveryHandler resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string akriDiscoveryHandlerName, AkriDiscoveryHandlerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, data, cancellationToken); + var operation = new IotOperationsArmOperation(new AkriDiscoveryHandlerResourceOperationSource(Client), _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.Get"); + scope.Start(); + try + { + var response = await _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriDiscoveryHandlerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.Get"); + scope.Start(); + try + { + var response = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AkriDiscoveryHandlerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List AkriDiscoveryHandlerResource resources by InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_ListByInstanceResource + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateListByInstanceResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateListByInstanceResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AkriDiscoveryHandlerResource(Client, AkriDiscoveryHandlerResourceData.DeserializeAkriDiscoveryHandlerResourceData(e)), _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, "AkriDiscoveryHandlerResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List AkriDiscoveryHandlerResource resources by InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_ListByInstanceResource + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateListByInstanceResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.CreateListByInstanceResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AkriDiscoveryHandlerResource(Client, AkriDiscoveryHandlerResourceData.DeserializeAkriDiscoveryHandlerResourceData(e)), _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics, Pipeline, "AkriDiscoveryHandlerResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.Exists"); + scope.Start(); + try + { + var response = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AkriDiscoveryHandlerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var scope = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerClientDiagnostics.CreateScope("AkriDiscoveryHandlerResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _akriDiscoveryHandlerResourceAkriDiscoveryHandlerRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, akriDiscoveryHandlerName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new AkriDiscoveryHandlerResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.Serialization.cs new file mode 100644 index 000000000000..2d6c9fdc727e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.Serialization.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class AkriDiscoveryHandlerResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } + } + + AkriDiscoveryHandlerResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerResourceData(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerResourceData DeserializeAkriDiscoveryHandlerResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriDiscoveryHandlerProperties properties = default; + IotOperationsExtendedLocation extendedLocation = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = AkriDiscoveryHandlerProperties.DeserializeAkriDiscoveryHandlerProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerResourceData( + id, + name, + type, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceData)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.cs new file mode 100644 index 000000000000..baddc5714903 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/AkriDiscoveryHandlerResourceData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing the AkriDiscoveryHandlerResource data model. + /// AkriDiscoveryHandler resource. + /// + public partial class AkriDiscoveryHandlerResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriDiscoveryHandlerResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AkriDiscoveryHandlerProperties properties, IotOperationsExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public AkriDiscoveryHandlerProperties Properties { get; set; } + /// Edge location of the resource. + public IotOperationsExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/ArmIotOperationsModelFactory.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/ArmIotOperationsModelFactory.cs index 81a2f6961d81..506a88e81125 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/ArmIotOperationsModelFactory.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/ArmIotOperationsModelFactory.cs @@ -49,10 +49,23 @@ public static IotOperationsInstanceData IotOperationsInstanceData(ResourceIdenti /// The status of the last operation. /// The Azure IoT Operations version. /// The reference to the Schema Registry for this AIO Instance. + /// The reference to the AIO Secret provider class. + /// The features of the AIO Instance. + /// The Azure Device Registry Namespace used by Assets, Discovered Assets and devices. /// A new instance for mocking. - public static IotOperationsInstanceProperties IotOperationsInstanceProperties(string description = null, IotOperationsProvisioningState? provisioningState = null, string version = null, ResourceIdentifier schemaRegistryRefResourceId = null) + public static IotOperationsInstanceProperties IotOperationsInstanceProperties(string description = null, IotOperationsProvisioningState? provisioningState = null, string version = null, ResourceIdentifier schemaRegistryRefResourceId = null, ResourceIdentifier defaultSecretProviderClassRefResourceId = null, IDictionary features = null, ResourceIdentifier adrNamespaceRefResourceId = null) { - return new IotOperationsInstanceProperties(description, provisioningState, version, schemaRegistryRefResourceId != null ? new SchemaRegistryRef(schemaRegistryRefResourceId, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); + features ??= new Dictionary(); + + return new IotOperationsInstanceProperties( + description, + provisioningState, + version, + schemaRegistryRefResourceId != null ? new SchemaRegistryRef(schemaRegistryRefResourceId, serializedAdditionalRawData: null) : null, + defaultSecretProviderClassRefResourceId != null ? new SecretProviderClassRef(defaultSecretProviderClassRefResourceId, serializedAdditionalRawData: null) : null, + features, + adrNamespaceRefResourceId != null ? new AzureDeviceRegistryNamespaceRef(adrNamespaceRefResourceId, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); } /// Initializes a new instance of . @@ -82,9 +95,10 @@ public static IotOperationsBrokerData IotOperationsBrokerData(ResourceIdentifier /// Settings of Disk Backed Message Buffer. /// This setting controls whether Kubernetes CPU resource limits are requested. Increasing the number of replicas or workers proportionally increases the amount of CPU resources requested. If this setting is enabled and there are insufficient CPU resources, an error will be emitted. /// Memory profile of Broker. + /// The persistence settings of the Broker. /// The status of the last operation. /// A new instance for mocking. - public static IotOperationsBrokerProperties IotOperationsBrokerProperties(BrokerAdvancedSettings advanced = null, BrokerCardinality cardinality = null, BrokerDiagnostics diagnostics = null, DiskBackedMessageBuffer diskBackedMessageBuffer = null, IotOperationsOperationalMode? generateResourceLimitsCpu = null, BrokerMemoryProfile? memoryProfile = null, IotOperationsProvisioningState? provisioningState = null) + public static IotOperationsBrokerProperties IotOperationsBrokerProperties(BrokerAdvancedSettings advanced = null, BrokerCardinality cardinality = null, BrokerDiagnostics diagnostics = null, DiskBackedMessageBuffer diskBackedMessageBuffer = null, IotOperationsOperationalMode? generateResourceLimitsCpu = null, BrokerMemoryProfile? memoryProfile = null, BrokerPersistence persistence = null, IotOperationsProvisioningState? provisioningState = null) { return new IotOperationsBrokerProperties( advanced, @@ -93,6 +107,7 @@ public static IotOperationsBrokerProperties IotOperationsBrokerProperties(Broker diskBackedMessageBuffer, generateResourceLimitsCpu != null ? new GenerateResourceLimits(generateResourceLimitsCpu, serializedAdditionalRawData: null) : null, memoryProfile, + persistence, provisioningState, serializedAdditionalRawData: null); } @@ -274,25 +289,231 @@ public static IotOperationsDataflowEndpointData IotOperationsDataflowEndpointDat /// Initializes a new instance of . /// Endpoint Type. + /// The type of the Kafka host. E.g FabricRT, EventGrid. /// Azure Data Explorer endpoint. /// Azure Data Lake endpoint. /// Microsoft Fabric endpoint. /// Kafka endpoint. /// Local persistent volume endpoint. /// Broker endpoint. + /// OpenTelemetry endpoint. /// The status of the last operation. /// A new instance for mocking. - public static IotOperationsDataflowEndpointProperties IotOperationsDataflowEndpointProperties(DataflowEndpointType endpointType = default, DataflowEndpointDataExplorer dataExplorerSettings = null, DataflowEndpointDataLakeStorage dataLakeStorageSettings = null, DataflowEndpointFabricOneLake fabricOneLakeSettings = null, DataflowEndpointKafka kafkaSettings = null, string localStoragePersistentVolumeClaimRef = null, DataflowEndpointMqtt mqttSettings = null, IotOperationsProvisioningState? provisioningState = null) + public static IotOperationsDataflowEndpointProperties IotOperationsDataflowEndpointProperties(DataflowEndpointType endpointType = default, DataflowEnpointHostType? hostType = null, DataflowEndpointDataExplorer dataExplorerSettings = null, DataflowEndpointDataLakeStorage dataLakeStorageSettings = null, DataflowEndpointFabricOneLake fabricOneLakeSettings = null, DataflowEndpointKafka kafkaSettings = null, string localStoragePersistentVolumeClaimRef = null, DataflowEndpointMqtt mqttSettings = null, DataflowEndpointOpenTelemetry openTelemetrySettings = null, IotOperationsProvisioningState? provisioningState = null) { return new IotOperationsDataflowEndpointProperties( endpointType, + hostType, dataExplorerSettings, dataLakeStorageSettings, fabricOneLakeSettings, kafkaSettings, localStoragePersistentVolumeClaimRef != null ? new DataflowEndpointLocalStorage(localStoragePersistentVolumeClaimRef, serializedAdditionalRawData: null) : null, mqttSettings, + openTelemetrySettings, + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// A new instance for mocking. + public static DataflowGraphResourceData DataflowGraphResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DataflowGraphProperties properties = null, IotOperationsExtendedLocation extendedLocation = null) + { + return new DataflowGraphResourceData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The mode of the dataflow graph. + /// Disk persistence mode. + /// + /// List of nodes in the dataflow graph. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// List of connections between nodes in the dataflow graph. + /// The provisioning state of the dataflow graph. + /// A new instance for mocking. + public static DataflowGraphProperties DataflowGraphProperties(IotOperationsOperationalMode? mode = null, IotOperationsOperationalMode? requestDiskPersistence = null, IEnumerable nodes = null, IEnumerable nodeConnections = null, IotOperationsProvisioningState? provisioningState = null) + { + nodes ??= new List(); + nodeConnections ??= new List(); + + return new DataflowGraphProperties( + mode, + requestDiskPersistence, + nodes?.ToList(), + nodeConnections?.ToList(), + provisioningState, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// A new instance for mocking. + public static RegistryEndpointResourceData RegistryEndpointResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, RegistryEndpointProperties properties = null, IotOperationsExtendedLocation extendedLocation = null) + { + return new RegistryEndpointResourceData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The Container Registry endpoint hostname. + /// + /// The authentication settings for the Azure Container Registry. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// The status of the last operation. + /// Trust settings for the registry endpoint. + /// A new instance for mocking. + public static RegistryEndpointProperties RegistryEndpointProperties(string host = null, RegistryEndpointAuthentication authentication = null, IotOperationsProvisioningState? provisioningState = null, RegistryEndpointTrustedSigningKey trustTrustedSigningKeys = null) + { + return new RegistryEndpointProperties(host, authentication, provisioningState, trustTrustedSigningKeys != null ? new RegistryEndpointTrustedSettings(trustTrustedSigningKeys, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// A new instance for mocking. + public static AkriConnectorTemplateResourceData AkriConnectorTemplateResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AkriConnectorTemplateProperties properties = null, IotOperationsExtendedLocation extendedLocation = null) + { + return new AkriConnectorTemplateResourceData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// Metadata about AIO. + /// + /// The runtime configuration for the Connector template. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Diagnostics settings for the Connector template. + /// Device inbound endpoint types. + /// Mqtt connection configuration settings. + /// A new instance for mocking. + public static AkriConnectorTemplateProperties AkriConnectorTemplateProperties(IotOperationsProvisioningState? provisioningState = null, AkriConnectorTemplateAioMetadata aioMetadata = null, AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration = null, string diagnosticsLevel = null, IEnumerable deviceInboundEndpointTypes = null, AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = null) + { + deviceInboundEndpointTypes ??= new List(); + + return new AkriConnectorTemplateProperties( + provisioningState, + aioMetadata, + runtimeConfiguration, + diagnosticsLevel != null ? new AkriConnectorTemplateDiagnostics(diagnosticsLevel, serializedAdditionalRawData: null) : null, + deviceInboundEndpointTypes?.ToList(), + mqttConnectionConfiguration, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// A new instance for mocking. + public static AkriConnectorResourceData AkriConnectorResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IotOperationsProvisioningState? akriConnectorProvisioningState = null, IotOperationsExtendedLocation extendedLocation = null) + { + return new AkriConnectorResourceData( + id, + name, + resourceType, + systemData, + akriConnectorProvisioningState != null ? new AkriConnectorProperties(akriConnectorProvisioningState, serializedAdditionalRawData: null) : null, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// A new instance for mocking. + public static AkriDiscoveryHandlerResourceData AkriDiscoveryHandlerResourceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AkriDiscoveryHandlerProperties properties = null, IotOperationsExtendedLocation extendedLocation = null) + { + return new AkriDiscoveryHandlerResourceData( + id, + name, + resourceType, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// Metadata about AIO. + /// Additional configuration for the AkriDiscoveryHandler. + /// Diagnostics settings for the AkriDiscoveryHandler. + /// Mode of the AkriDiscoveryHandler. + /// Device inbound endpoint types. + /// Mqtt connection configuration settings. + /// The image configuration for the AkriDiscoveryHandler. + /// + /// Schedule for the AkriDiscoveryHandler. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Secrets that will be mounted onto discovery handler. + /// A new instance for mocking. + public static AkriDiscoveryHandlerProperties AkriDiscoveryHandlerProperties(IotOperationsProvisioningState? provisioningState = null, AkriDiscoveryHandlerAioMetadata aioMetadata = null, IDictionary additionalConfiguration = null, string diagnosticsLevel = null, IotOperationsOperationalMode? mode = null, IEnumerable discoverableDeviceEndpointTypes = null, AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = null, AkriDiscoveryHandlerImageConfiguration imageConfiguration = null, AkriDiscoveryHandlerSchedule schedule = null, IEnumerable secrets = null) + { + additionalConfiguration ??= new Dictionary(); + discoverableDeviceEndpointTypes ??= new List(); + secrets ??= new List(); + + return new AkriDiscoveryHandlerProperties( provisioningState, + aioMetadata, + additionalConfiguration, + diagnosticsLevel != null ? new AkriDiscoveryHandlerDiagnostics(diagnosticsLevel, serializedAdditionalRawData: null) : null, + mode, + discoverableDeviceEndpointTypes?.ToList(), + mqttConnectionConfiguration, + imageConfiguration, + schedule, + secrets?.ToList(), serializedAdditionalRawData: null); } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.Serialization.cs new file mode 100644 index 000000000000..4ce11d91c434 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class DataflowGraphResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + DataflowGraphResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); + + DataflowGraphResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.cs new file mode 100644 index 000000000000..0c732308b0c6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResource.cs @@ -0,0 +1,348 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A Class representing a DataflowGraphResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetDataflowGraphResource method. + /// Otherwise you can get one from its parent resource using the GetDataflowGraphResource method. + /// + public partial class DataflowGraphResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The instanceName. + /// The dataflowProfileName. + /// The dataflowGraphName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _dataflowGraphResourceDataflowGraphClientDiagnostics; + private readonly DataflowGraphRestOperations _dataflowGraphResourceDataflowGraphRestClient; + private readonly DataflowGraphResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.IoTOperations/instances/dataflowProfiles/dataflowGraphs"; + + /// Initializes a new instance of the class for mocking. + protected DataflowGraphResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal DataflowGraphResource(ArmClient client, DataflowGraphResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal DataflowGraphResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataflowGraphResourceDataflowGraphClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string dataflowGraphResourceDataflowGraphApiVersion); + _dataflowGraphResourceDataflowGraphRestClient = new DataflowGraphRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataflowGraphResourceDataflowGraphApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual DataflowGraphResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResource.Get"); + scope.Start(); + try + { + var response = await _dataflowGraphResourceDataflowGraphRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataflowGraphResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResource.Get"); + scope.Start(); + try + { + var response = _dataflowGraphResourceDataflowGraphRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataflowGraphResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResource.Delete"); + scope.Start(); + try + { + var response = await _dataflowGraphResourceDataflowGraphRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(_dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, _dataflowGraphResourceDataflowGraphRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResource.Delete"); + scope.Start(); + try + { + var response = _dataflowGraphResourceDataflowGraphRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new IotOperationsArmOperation(_dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, _dataflowGraphResourceDataflowGraphRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, DataflowGraphResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResource.Update"); + scope.Start(); + try + { + var response = await _dataflowGraphResourceDataflowGraphRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new DataflowGraphResourceOperationSource(Client), _dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, _dataflowGraphResourceDataflowGraphRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, DataflowGraphResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResource.Update"); + scope.Start(); + try + { + var response = _dataflowGraphResourceDataflowGraphRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new IotOperationsArmOperation(new DataflowGraphResourceOperationSource(Client), _dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, _dataflowGraphResourceDataflowGraphRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceCollection.cs new file mode 100644 index 000000000000..1e56fd5b8736 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetDataflowGraphResources method from an instance of . + /// + public partial class DataflowGraphResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _dataflowGraphResourceDataflowGraphClientDiagnostics; + private readonly DataflowGraphRestOperations _dataflowGraphResourceDataflowGraphRestClient; + + /// Initializes a new instance of the class for mocking. + protected DataflowGraphResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal DataflowGraphResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _dataflowGraphResourceDataflowGraphClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", DataflowGraphResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(DataflowGraphResource.ResourceType, out string dataflowGraphResourceDataflowGraphApiVersion); + _dataflowGraphResourceDataflowGraphRestClient = new DataflowGraphRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, dataflowGraphResourceDataflowGraphApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != IotOperationsDataflowProfileResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, IotOperationsDataflowProfileResource.ResourceType), nameof(id)); + } + + /// + /// Create a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of Instance dataflowEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string dataflowGraphName, DataflowGraphResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _dataflowGraphResourceDataflowGraphRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new DataflowGraphResourceOperationSource(Client), _dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, _dataflowGraphResourceDataflowGraphRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of Instance dataflowEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string dataflowGraphName, DataflowGraphResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _dataflowGraphResourceDataflowGraphRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, data, cancellationToken); + var operation = new IotOperationsArmOperation(new DataflowGraphResourceOperationSource(Client), _dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, _dataflowGraphResourceDataflowGraphRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.Get"); + scope.Start(); + try + { + var response = await _dataflowGraphResourceDataflowGraphRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataflowGraphResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.Get"); + scope.Start(); + try + { + var response = _dataflowGraphResourceDataflowGraphRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new DataflowGraphResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List DataflowGraphResource resources by DataflowProfileResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs + /// + /// + /// Operation Id + /// DataflowGraphResource_ListByDataflowProfile + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataflowGraphResourceDataflowGraphRestClient.CreateListByDataflowProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataflowGraphResourceDataflowGraphRestClient.CreateListByDataflowProfileNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new DataflowGraphResource(Client, DataflowGraphResourceData.DeserializeDataflowGraphResourceData(e)), _dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, "DataflowGraphResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List DataflowGraphResource resources by DataflowProfileResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs + /// + /// + /// Operation Id + /// DataflowGraphResource_ListByDataflowProfile + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _dataflowGraphResourceDataflowGraphRestClient.CreateListByDataflowProfileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _dataflowGraphResourceDataflowGraphRestClient.CreateListByDataflowProfileNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new DataflowGraphResource(Client, DataflowGraphResourceData.DeserializeDataflowGraphResourceData(e)), _dataflowGraphResourceDataflowGraphClientDiagnostics, Pipeline, "DataflowGraphResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _dataflowGraphResourceDataflowGraphRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.Exists"); + scope.Start(); + try + { + var response = _dataflowGraphResourceDataflowGraphRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _dataflowGraphResourceDataflowGraphRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataflowGraphResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var scope = _dataflowGraphResourceDataflowGraphClientDiagnostics.CreateScope("DataflowGraphResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _dataflowGraphResourceDataflowGraphRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, dataflowGraphName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new DataflowGraphResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.Serialization.cs new file mode 100644 index 000000000000..d0adf4f33511 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.Serialization.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class DataflowGraphResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } + } + + DataflowGraphResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphResourceData(document.RootElement, options); + } + + internal static DataflowGraphResourceData DeserializeDataflowGraphResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowGraphProperties properties = default; + IotOperationsExtendedLocation extendedLocation = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = DataflowGraphProperties.DeserializeDataflowGraphProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphResourceData( + id, + name, + type, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphResourceData)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.cs new file mode 100644 index 000000000000..831b805134dd --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/DataflowGraphResourceData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing the DataflowGraphResource data model. + /// Instance dataflowEndpoint resource. + /// + public partial class DataflowGraphResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataflowGraphResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DataflowGraphProperties properties, IotOperationsExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public DataflowGraphProperties Properties { get; set; } + /// Edge location of the resource. + public IotOperationsExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/IotOperationsExtensions.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/IotOperationsExtensions.cs index 76652d258092..5848b5a196c1 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/IotOperationsExtensions.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/IotOperationsExtensions.cs @@ -184,6 +184,101 @@ public static IotOperationsDataflowEndpointResource GetIotOperationsDataflowEndp return GetMockableIotOperationsArmClient(client).GetIotOperationsDataflowEndpointResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static DataflowGraphResource GetDataflowGraphResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableIotOperationsArmClient(client).GetDataflowGraphResource(id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static RegistryEndpointResource GetRegistryEndpointResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableIotOperationsArmClient(client).GetRegistryEndpointResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AkriConnectorTemplateResource GetAkriConnectorTemplateResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableIotOperationsArmClient(client).GetAkriConnectorTemplateResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AkriConnectorResource GetAkriConnectorResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableIotOperationsArmClient(client).GetAkriConnectorResource(id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static AkriDiscoveryHandlerResource GetAkriDiscoveryHandlerResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableIotOperationsArmClient(client).GetAkriDiscoveryHandlerResource(id); + } + /// /// Gets a collection of IotOperationsInstanceResources in the ResourceGroupResource. /// @@ -214,7 +309,7 @@ public static IotOperationsInstanceCollection GetIotOperationsInstances(this Res /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +347,7 @@ public static async Task> GetIotOperatio /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -290,7 +385,7 @@ public static Response GetIotOperationsInstance(t /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -326,7 +421,7 @@ public static AsyncPageable GetIotOperationsInsta /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsArmClient.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsArmClient.cs index 2c16a64d1b88..8d2ed870895e 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsArmClient.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsArmClient.cs @@ -129,5 +129,65 @@ public virtual IotOperationsDataflowEndpointResource GetIotOperationsDataflowEnd IotOperationsDataflowEndpointResource.ValidateResourceId(id); return new IotOperationsDataflowEndpointResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual DataflowGraphResource GetDataflowGraphResource(ResourceIdentifier id) + { + DataflowGraphResource.ValidateResourceId(id); + return new DataflowGraphResource(Client, id); + } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual RegistryEndpointResource GetRegistryEndpointResource(ResourceIdentifier id) + { + RegistryEndpointResource.ValidateResourceId(id); + return new RegistryEndpointResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AkriConnectorTemplateResource GetAkriConnectorTemplateResource(ResourceIdentifier id) + { + AkriConnectorTemplateResource.ValidateResourceId(id); + return new AkriConnectorTemplateResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AkriConnectorResource GetAkriConnectorResource(ResourceIdentifier id) + { + AkriConnectorResource.ValidateResourceId(id); + return new AkriConnectorResource(Client, id); + } + + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual AkriDiscoveryHandlerResource GetAkriDiscoveryHandlerResource(ResourceIdentifier id) + { + AkriDiscoveryHandlerResource.ValidateResourceId(id); + return new AkriDiscoveryHandlerResource(Client, id); + } } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsResourceGroupResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsResourceGroupResource.cs index c61784d10f4a..2674c9b4e8fe 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsResourceGroupResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual IotOperationsInstanceCollection GetIotOperationsInstances() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetIotOperati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsSubscriptionResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsSubscriptionResource.cs index af819a8e6e37..bec625fd868f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsSubscriptionResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Extensions/MockableIotOperationsSubscriptionResource.cs @@ -52,7 +52,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -82,7 +82,7 @@ public virtual AsyncPageable GetIotOperationsInst /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationCollection.cs index 2a905732e2dd..ab422297134f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrU /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string au /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAs /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string authenticationName, /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string authenticationName, CancellationToke /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.Serialization.cs index 0e08ddc81e78..df200f775e70 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.Serialization.cs @@ -42,8 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("extendedLocation"u8); - writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } } IotOperationsBrokerAuthenticationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,6 +90,10 @@ internal static IotOperationsBrokerAuthenticationData DeserializeIotOperationsBr } if (property.NameEquals("extendedLocation"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); continue; } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.cs index 5a03c6da9162..b5ffd43dd3cd 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationData.cs @@ -52,13 +52,8 @@ public partial class IotOperationsBrokerAuthenticationData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Edge location of the resource. - /// is null. - public IotOperationsBrokerAuthenticationData(IotOperationsExtendedLocation extendedLocation) + public IotOperationsBrokerAuthenticationData() { - Argument.AssertNotNull(extendedLocation, nameof(extendedLocation)); - - ExtendedLocation = extendedLocation; } /// Initializes a new instance of . @@ -76,11 +71,6 @@ internal IotOperationsBrokerAuthenticationData(ResourceIdentifier id, string nam _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal IotOperationsBrokerAuthenticationData() - { - } - /// The resource-specific properties for this resource. public IotOperationsBrokerAuthenticationProperties Properties { get; set; } /// Edge location of the resource. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.cs index 2cb2a50a0086..6cdff146992f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthenticationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellat /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationCollection.cs index 93e0d25c6b5f..bf9bb34b355a 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUp /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string aut /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string authorizationName, /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string authorizationName, CancellationToken /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.Serialization.cs index fb835342b03c..cf8c33ee67bd 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.Serialization.cs @@ -42,8 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("extendedLocation"u8); - writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } } IotOperationsBrokerAuthorizationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,6 +90,10 @@ internal static IotOperationsBrokerAuthorizationData DeserializeIotOperationsBro } if (property.NameEquals("extendedLocation"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); continue; } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.cs index fdd9187c31d9..c1160f15147a 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationData.cs @@ -52,13 +52,8 @@ public partial class IotOperationsBrokerAuthorizationData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Edge location of the resource. - /// is null. - public IotOperationsBrokerAuthorizationData(IotOperationsExtendedLocation extendedLocation) + public IotOperationsBrokerAuthorizationData() { - Argument.AssertNotNull(extendedLocation, nameof(extendedLocation)); - - ExtendedLocation = extendedLocation; } /// Initializes a new instance of . @@ -76,11 +71,6 @@ internal IotOperationsBrokerAuthorizationData(ResourceIdentifier id, string name _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal IotOperationsBrokerAuthorizationData() - { - } - /// The resource-specific properties for this resource. public IotOperationsBrokerAuthorizationProperties Properties { get; set; } /// Edge location of the resource. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.cs index 54adbeb12365..415e03a5cd40 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerAuthorizationResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(Cancellati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerCollection.cs index 5331bfff92f5..e38e78e8a62f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string brokerName, Canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string brokerName, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string brokerName, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.Serialization.cs index 5a00216b22c0..2a078f4d73d5 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.Serialization.cs @@ -42,8 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("extendedLocation"u8); - writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } } IotOperationsBrokerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,6 +90,10 @@ internal static IotOperationsBrokerData DeserializeIotOperationsBrokerData(JsonE } if (property.NameEquals("extendedLocation"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); continue; } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.cs index 8aecda74c08b..c2ccddd826b2 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerData.cs @@ -52,13 +52,8 @@ public partial class IotOperationsBrokerData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Edge location of the resource. - /// is null. - public IotOperationsBrokerData(IotOperationsExtendedLocation extendedLocation) + public IotOperationsBrokerData() { - Argument.AssertNotNull(extendedLocation, nameof(extendedLocation)); - - ExtendedLocation = extendedLocation; } /// Initializes a new instance of . @@ -76,11 +71,6 @@ internal IotOperationsBrokerData(ResourceIdentifier id, string name, ResourceTyp _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal IotOperationsBrokerData() - { - } - /// The resource-specific properties for this resource. public IotOperationsBrokerProperties Properties { get; set; } /// Edge location of the resource. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerCollection.cs index c68e6df73e83..53daef8f27b5 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cre /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string listener /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string listenerName, Cance /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string listenerName, CancellationToken canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.Serialization.cs index c621cb7f9f69..bcc318ad8626 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.Serialization.cs @@ -42,8 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("extendedLocation"u8); - writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } } IotOperationsBrokerListenerData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,6 +90,10 @@ internal static IotOperationsBrokerListenerData DeserializeIotOperationsBrokerLi } if (property.NameEquals("extendedLocation"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); continue; } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.cs index a04649ae93bb..d12d0bd65141 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerData.cs @@ -52,13 +52,8 @@ public partial class IotOperationsBrokerListenerData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Edge location of the resource. - /// is null. - public IotOperationsBrokerListenerData(IotOperationsExtendedLocation extendedLocation) + public IotOperationsBrokerListenerData() { - Argument.AssertNotNull(extendedLocation, nameof(extendedLocation)); - - ExtendedLocation = extendedLocation; } /// Initializes a new instance of . @@ -76,11 +71,6 @@ internal IotOperationsBrokerListenerData(ResourceIdentifier id, string name, Res _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal IotOperationsBrokerListenerData() - { - } - /// The resource-specific properties for this resource. public IotOperationsBrokerListenerProperties Properties { get; set; } /// Edge location of the resource. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.cs index 4f9676032a2c..c02a9d8facf2 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerListenerResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationTok /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> Upd /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.cs index 21c066d6a4fd..8b0611ad632c 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsBrokerResource.cs @@ -108,7 +108,7 @@ public virtual IotOperationsBrokerListenerCollection GetIotOperationsBrokerListe /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetIotO /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -177,7 +177,7 @@ public virtual IotOperationsBrokerAuthenticationCollection GetIotOperationsBroke /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -246,7 +246,7 @@ public virtual IotOperationsBrokerAuthorizationCollection GetIotOperationsBroker /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -277,7 +277,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -308,7 +308,7 @@ public virtual Response GetIotOperatio /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -348,7 +348,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -388,7 +388,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -430,7 +430,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -472,7 +472,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -518,7 +518,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowCollection.cs index ea521ae9658e..29a56df8ab5e 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string dataflowName, /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string dataflowName, Cance /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string dataflowName, CancellationToken canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.Serialization.cs index 8c1d9e6d68e5..8049390e4f45 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.Serialization.cs @@ -42,8 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("extendedLocation"u8); - writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } } IotOperationsDataflowData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,6 +90,10 @@ internal static IotOperationsDataflowData DeserializeIotOperationsDataflowData(J } if (property.NameEquals("extendedLocation"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); continue; } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.cs index abd28844e817..e472cd1321af 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowData.cs @@ -52,13 +52,8 @@ public partial class IotOperationsDataflowData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Edge location of the resource. - /// is null. - public IotOperationsDataflowData(IotOperationsExtendedLocation extendedLocation) + public IotOperationsDataflowData() { - Argument.AssertNotNull(extendedLocation, nameof(extendedLocation)); - - ExtendedLocation = extendedLocation; } /// Initializes a new instance of . @@ -76,11 +71,6 @@ internal IotOperationsDataflowData(ResourceIdentifier id, string name, ResourceT _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal IotOperationsDataflowData() - { - } - /// The resource-specific properties for this resource. public IotOperationsDataflowProperties Properties { get; set; } /// Edge location of the resource. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointCollection.cs index 79d1d438bc3f..a39cf2da1e64 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> C /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdat /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string datafl /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string dataflowEndpointNam /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string dataflowEndpointName, CancellationTo /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.Serialization.cs index 4aa891c9cbf5..b0aa6eaa15fb 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.Serialization.cs @@ -42,8 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("extendedLocation"u8); - writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } } IotOperationsDataflowEndpointData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,6 +90,10 @@ internal static IotOperationsDataflowEndpointData DeserializeIotOperationsDatafl } if (property.NameEquals("extendedLocation"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); continue; } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.cs index 172ce3cefd8a..9fe645e0f3b8 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointData.cs @@ -52,13 +52,8 @@ public partial class IotOperationsDataflowEndpointData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Edge location of the resource. - /// is null. - public IotOperationsDataflowEndpointData(IotOperationsExtendedLocation extendedLocation) + public IotOperationsDataflowEndpointData() { - Argument.AssertNotNull(extendedLocation, nameof(extendedLocation)); - - ExtendedLocation = extendedLocation; } /// Initializes a new instance of . @@ -76,11 +71,6 @@ internal IotOperationsDataflowEndpointData(ResourceIdentifier id, string name, R _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal IotOperationsDataflowEndpointData() - { - } - /// The resource-specific properties for this resource. public IotOperationsDataflowEndpointProperties Properties { get; set; } /// Edge location of the resource. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.cs index ec4dc201e2ef..f1ee936c1408 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowEndpointResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAs /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationT /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task> U /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileCollection.cs index 1fe882d17472..94fad0569fcd 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Cr /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string dataflo /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -282,7 +282,7 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string dataflowProfileName /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string dataflowProfileName, CancellationTok /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.Serialization.cs index 481098516aae..276ab4796943 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.Serialization.cs @@ -42,8 +42,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, options); } - writer.WritePropertyName("extendedLocation"u8); - writer.WriteObjectValue(ExtendedLocation, options); + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } } IotOperationsDataflowProfileData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -87,6 +90,10 @@ internal static IotOperationsDataflowProfileData DeserializeIotOperationsDataflo } if (property.NameEquals("extendedLocation"u8)) { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); continue; } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.cs index 48f5678689d8..46d06bf962ef 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileData.cs @@ -52,13 +52,8 @@ public partial class IotOperationsDataflowProfileData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Edge location of the resource. - /// is null. - public IotOperationsDataflowProfileData(IotOperationsExtendedLocation extendedLocation) + public IotOperationsDataflowProfileData() { - Argument.AssertNotNull(extendedLocation, nameof(extendedLocation)); - - ExtendedLocation = extendedLocation; } /// Initializes a new instance of . @@ -76,11 +71,6 @@ internal IotOperationsDataflowProfileData(ResourceIdentifier id, string name, Re _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal IotOperationsDataflowProfileData() - { - } - /// The resource-specific properties for this resource. public IotOperationsDataflowProfileProperties Properties { get; set; } /// Edge location of the resource. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.cs index 291abc4283b7..97934582f87e 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowProfileResource.cs @@ -108,7 +108,7 @@ public virtual IotOperationsDataflowCollection GetIotOperationsDataflows() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetIotOperati /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -157,6 +157,75 @@ public virtual Response GetIotOperationsDataflow( return GetIotOperationsDataflows().Get(dataflowName, cancellationToken); } + /// Gets a collection of DataflowGraphResources in the IotOperationsDataflowProfile. + /// An object representing collection of DataflowGraphResources and their operations over a DataflowGraphResource. + public virtual DataflowGraphResourceCollection GetDataflowGraphResources() + { + return GetCachedClient(client => new DataflowGraphResourceCollection(client, Id)); + } + + /// + /// Get a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetDataflowGraphResourceAsync(string dataflowGraphName, CancellationToken cancellationToken = default) + { + return await GetDataflowGraphResources().GetAsync(dataflowGraphName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a DataflowGraphResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/dataflowProfiles/{dataflowProfileName}/dataflowGraphs/{dataflowGraphName} + /// + /// + /// Operation Id + /// DataflowGraphResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetDataflowGraphResource(string dataflowGraphName, CancellationToken cancellationToken = default) + { + return GetDataflowGraphResources().Get(dataflowGraphName, cancellationToken); + } + /// /// Get a DataflowProfileResource /// @@ -170,7 +239,7 @@ public virtual Response GetIotOperationsDataflow( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -210,7 +279,7 @@ public virtual async Task> GetAsy /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -250,7 +319,7 @@ public virtual Response Get(CancellationTo /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -292,7 +361,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -334,7 +403,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -380,7 +449,7 @@ public virtual async Task> Up /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.cs index 779f4114c9f1..8348c34f4759 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsDataflowResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceCollection.cs index 31af78f0ebba..397ba09b65ac 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceCollection.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrU /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string instanceName, /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string instanceName, Cance /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string instanceName, CancellationToken canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.cs index eb00248a5e78..5f055e7cdc31 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/IotOperationsInstanceResource.cs @@ -110,7 +110,7 @@ public virtual IotOperationsBrokerCollection GetIotOperationsBrokers() /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetIotOperation /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual IotOperationsDataflowProfileCollection GetIotOperationsDataflowPr /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -210,7 +210,7 @@ public virtual async Task> GetIot /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual IotOperationsDataflowEndpointCollection GetIotOperationsDataflowE /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -279,7 +279,7 @@ public virtual async Task> GetIo /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -297,6 +297,213 @@ public virtual Response GetIotOperationsD return GetIotOperationsDataflowEndpoints().Get(dataflowEndpointName, cancellationToken); } + /// Gets a collection of RegistryEndpointResources in the IotOperationsInstance. + /// An object representing collection of RegistryEndpointResources and their operations over a RegistryEndpointResource. + public virtual RegistryEndpointResourceCollection GetRegistryEndpointResources() + { + return GetCachedClient(client => new RegistryEndpointResourceCollection(client, Id)); + } + + /// + /// Get a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetRegistryEndpointResourceAsync(string registryEndpointName, CancellationToken cancellationToken = default) + { + return await GetRegistryEndpointResources().GetAsync(registryEndpointName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetRegistryEndpointResource(string registryEndpointName, CancellationToken cancellationToken = default) + { + return GetRegistryEndpointResources().Get(registryEndpointName, cancellationToken); + } + + /// Gets a collection of AkriConnectorTemplateResources in the IotOperationsInstance. + /// An object representing collection of AkriConnectorTemplateResources and their operations over a AkriConnectorTemplateResource. + public virtual AkriConnectorTemplateResourceCollection GetAkriConnectorTemplateResources() + { + return GetCachedClient(client => new AkriConnectorTemplateResourceCollection(client, Id)); + } + + /// + /// Get a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAkriConnectorTemplateResourceAsync(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + return await GetAkriConnectorTemplateResources().GetAsync(akriConnectorTemplateName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AkriConnectorTemplateResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriConnectorTemplates/{akriConnectorTemplateName} + /// + /// + /// Operation Id + /// AkriConnectorTemplateResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAkriConnectorTemplateResource(string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + return GetAkriConnectorTemplateResources().Get(akriConnectorTemplateName, cancellationToken); + } + + /// Gets a collection of AkriDiscoveryHandlerResources in the IotOperationsInstance. + /// An object representing collection of AkriDiscoveryHandlerResources and their operations over a AkriDiscoveryHandlerResource. + public virtual AkriDiscoveryHandlerResourceCollection GetAkriDiscoveryHandlerResources() + { + return GetCachedClient(client => new AkriDiscoveryHandlerResourceCollection(client, Id)); + } + + /// + /// Get a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetAkriDiscoveryHandlerResourceAsync(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + return await GetAkriDiscoveryHandlerResources().GetAsync(akriDiscoveryHandlerName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a AkriDiscoveryHandlerResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/akriDiscoveryHandlers/{akriDiscoveryHandlerName} + /// + /// + /// Operation Id + /// AkriDiscoveryHandlerResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetAkriDiscoveryHandlerResource(string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + return GetAkriDiscoveryHandlerResources().Get(akriDiscoveryHandlerName, cancellationToken); + } + /// /// Get a InstanceResource /// @@ -310,7 +517,7 @@ public virtual Response GetIotOperationsD /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -350,7 +557,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -390,7 +597,7 @@ public virtual Response Get(CancellationToken can /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -432,7 +639,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -474,7 +681,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -516,7 +723,7 @@ public virtual async Task> UpdateAsync(I /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -558,7 +765,7 @@ public virtual Response Update(IotOperationsInsta /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -620,7 +827,7 @@ public virtual async Task> AddTagAsync(s /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -682,7 +889,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -739,7 +946,7 @@ public virtual async Task> SetTagsAsync( /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -796,7 +1003,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource @@ -856,7 +1063,7 @@ public virtual async Task> RemoveTagAsyn /// /// /// Default Api Version - /// 2024-11-01 + /// 2025-07-01-preview /// /// /// Resource diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorResourceOperationSource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorResourceOperationSource.cs new file mode 100644 index 000000000000..3d229dd1561a --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations +{ + internal class AkriConnectorResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AkriConnectorResourceOperationSource(ArmClient client) + { + _client = client; + } + + AkriConnectorResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return new AkriConnectorResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return await Task.FromResult(new AkriConnectorResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorTemplateResourceOperationSource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorTemplateResourceOperationSource.cs new file mode 100644 index 000000000000..8fefe9a9eafe --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriConnectorTemplateResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations +{ + internal class AkriConnectorTemplateResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AkriConnectorTemplateResourceOperationSource(ArmClient client) + { + _client = client; + } + + AkriConnectorTemplateResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return new AkriConnectorTemplateResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return await Task.FromResult(new AkriConnectorTemplateResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriDiscoveryHandlerResourceOperationSource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriDiscoveryHandlerResourceOperationSource.cs new file mode 100644 index 000000000000..60d9f8ecaf40 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/AkriDiscoveryHandlerResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations +{ + internal class AkriDiscoveryHandlerResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal AkriDiscoveryHandlerResourceOperationSource(ArmClient client) + { + _client = client; + } + + AkriDiscoveryHandlerResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return new AkriDiscoveryHandlerResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return await Task.FromResult(new AkriDiscoveryHandlerResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/DataflowGraphResourceOperationSource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/DataflowGraphResourceOperationSource.cs new file mode 100644 index 000000000000..d79876a3c4bc --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/DataflowGraphResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations +{ + internal class DataflowGraphResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal DataflowGraphResourceOperationSource(ArmClient client) + { + _client = client; + } + + DataflowGraphResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return new DataflowGraphResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return await Task.FromResult(new DataflowGraphResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/RegistryEndpointResourceOperationSource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/RegistryEndpointResourceOperationSource.cs new file mode 100644 index 000000000000..e3a60a1c6e4c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/LongRunningOperation/RegistryEndpointResourceOperationSource.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations +{ + internal class RegistryEndpointResourceOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal RegistryEndpointResourceOperationSource(ArmClient client) + { + _client = client; + } + + RegistryEndpointResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return new RegistryEndpointResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerIotOperationsContext.Default); + return await Task.FromResult(new RegistryEndpointResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.Serialization.cs new file mode 100644 index 000000000000..8b3b53346535 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.Serialization.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AkriConnectorProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorProperties(document.RootElement, options); + } + + internal static AkriConnectorProperties DeserializeAkriConnectorProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new IotOperationsProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorProperties(provisioningState, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorProperties)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.cs new file mode 100644 index 000000000000..cab4a106e963 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnector properties. + internal partial class AkriConnectorProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorProperties() + { + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorProperties(IotOperationsProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The status of the last operation. + public IotOperationsProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.Serialization.cs new file mode 100644 index 000000000000..d8e4d26878b4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AkriConnectorResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorResourceListResult(document.RootElement, options); + } + + internal static AkriConnectorResourceListResult DeserializeAkriConnectorResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorResourceData.DeserializeAkriConnectorResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.cs new file mode 100644 index 000000000000..f6d9e33db1be --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The response of a AkriConnectorResource list operation. + internal partial class AkriConnectorResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AkriConnectorResource items on this page. + /// is null. + internal AkriConnectorResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AkriConnectorResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorResourceListResult() + { + } + + /// The AkriConnectorResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.Serialization.cs new file mode 100644 index 000000000000..d81b584fd62f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateAioMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateAioMetadata)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AioMinVersion)) + { + writer.WritePropertyName("aioMinVersion"u8); + writer.WriteStringValue(AioMinVersion); + } + if (Optional.IsDefined(AioMaxVersion)) + { + writer.WritePropertyName("aioMaxVersion"u8); + writer.WriteStringValue(AioMaxVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateAioMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateAioMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateAioMetadata(document.RootElement, options); + } + + internal static AkriConnectorTemplateAioMetadata DeserializeAkriConnectorTemplateAioMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string aioMinVersion = default; + string aioMaxVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("aioMinVersion"u8)) + { + aioMinVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("aioMaxVersion"u8)) + { + aioMaxVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateAioMetadata(aioMinVersion, aioMaxVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateAioMetadata)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateAioMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateAioMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateAioMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.cs new file mode 100644 index 000000000000..6acca7e7b593 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAioMetadata.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateAioMetadata properties. + public partial class AkriConnectorTemplateAioMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateAioMetadata() + { + } + + /// Initializes a new instance of . + /// The minimum version of AIO required for the connector. + /// The maximum version of AIO required for the connector. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateAioMetadata(string aioMinVersion, string aioMaxVersion, IDictionary serializedAdditionalRawData) + { + AioMinVersion = aioMinVersion; + AioMaxVersion = aioMaxVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The minimum version of AIO required for the connector. + public string AioMinVersion { get; set; } + /// The maximum version of AIO required for the connector. + public string AioMaxVersion { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.Serialization.cs new file mode 100644 index 000000000000..b3b5624b50e1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriConnectorTemplateAllocation))] + public partial class AkriConnectorTemplateAllocation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("policy"u8); + writer.WriteStringValue(Policy.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateAllocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateAllocation(document.RootElement, options); + } + + internal static AkriConnectorTemplateAllocation DeserializeAkriConnectorTemplateAllocation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("policy", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Bucketized": return AkriConnectorTemplateBucketizedAllocation.DeserializeAkriConnectorTemplateBucketizedAllocation(element, options); + } + } + return UnknownAkriConnectorTemplateAllocation.DeserializeUnknownAkriConnectorTemplateAllocation(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateAllocation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateAllocation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.cs new file mode 100644 index 000000000000..d288702ebcce --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocation.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriConnectorTemplateAllocation properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class AkriConnectorTemplateAllocation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriConnectorTemplateAllocation() + { + } + + /// Initializes a new instance of . + /// The allocation policy type. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateAllocation(AkriConnectorTemplateAllocationPolicy policy, IDictionary serializedAdditionalRawData) + { + Policy = policy; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The allocation policy type. + internal AkriConnectorTemplateAllocationPolicy Policy { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocationPolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocationPolicy.cs new file mode 100644 index 000000000000..550bb3f22ea7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateAllocationPolicy.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateAllocationPolicy properties. + internal readonly partial struct AkriConnectorTemplateAllocationPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorTemplateAllocationPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BucketizedValue = "Bucketized"; + + /// Bucketized allocation policy. + public static AkriConnectorTemplateAllocationPolicy Bucketized { get; } = new AkriConnectorTemplateAllocationPolicy(BucketizedValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorTemplateAllocationPolicy left, AkriConnectorTemplateAllocationPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorTemplateAllocationPolicy left, AkriConnectorTemplateAllocationPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorTemplateAllocationPolicy(string value) => new AkriConnectorTemplateAllocationPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorTemplateAllocationPolicy other && Equals(other); + /// + public bool Equals(AkriConnectorTemplateAllocationPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.Serialization.cs new file mode 100644 index 000000000000..c7f10ac1f74b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateBucketizedAllocation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateBucketizedAllocation)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("bucketSize"u8); + writer.WriteNumberValue(BucketSize); + } + + AkriConnectorTemplateBucketizedAllocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateBucketizedAllocation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateBucketizedAllocation(document.RootElement, options); + } + + internal static AkriConnectorTemplateBucketizedAllocation DeserializeAkriConnectorTemplateBucketizedAllocation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int bucketSize = default; + AkriConnectorTemplateAllocationPolicy policy = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("bucketSize"u8)) + { + bucketSize = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("policy"u8)) + { + policy = new AkriConnectorTemplateAllocationPolicy(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateBucketizedAllocation(policy, serializedAdditionalRawData, bucketSize); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateBucketizedAllocation)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateBucketizedAllocation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateBucketizedAllocation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateBucketizedAllocation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.cs new file mode 100644 index 000000000000..9b44bf2b09ea --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateBucketizedAllocation.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateBucketizedAllocation properties. + public partial class AkriConnectorTemplateBucketizedAllocation : AkriConnectorTemplateAllocation + { + /// Initializes a new instance of . + /// The bucketized allocation of AEPs for connectors. + public AkriConnectorTemplateBucketizedAllocation(int bucketSize) + { + BucketSize = bucketSize; + Policy = AkriConnectorTemplateAllocationPolicy.Bucketized; + } + + /// Initializes a new instance of . + /// The allocation policy type. + /// Keeps track of any properties unknown to the library. + /// The bucketized allocation of AEPs for connectors. + internal AkriConnectorTemplateBucketizedAllocation(AkriConnectorTemplateAllocationPolicy policy, IDictionary serializedAdditionalRawData, int bucketSize) : base(policy, serializedAdditionalRawData) + { + BucketSize = bucketSize; + Policy = policy; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateBucketizedAllocation() + { + } + + /// The bucketized allocation of AEPs for connectors. + public int BucketSize { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.Serialization.cs new file mode 100644 index 000000000000..d9f8a47a16f2 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.Serialization.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DefaultDatasetConfigSchemaRef)) + { + writer.WritePropertyName("defaultDatasetConfigSchemaRef"u8); + writer.WriteStringValue(DefaultDatasetConfigSchemaRef); + } + if (Optional.IsDefined(DefaultEventsConfigSchemaRef)) + { + writer.WritePropertyName("defaultEventsConfigSchemaRef"u8); + writer.WriteStringValue(DefaultEventsConfigSchemaRef); + } + if (Optional.IsDefined(DefaultProcessControlConfigSchemaRef)) + { + writer.WritePropertyName("defaultProcessControlConfigSchemaRef"u8); + writer.WriteStringValue(DefaultProcessControlConfigSchemaRef); + } + if (Optional.IsDefined(DefaultStreamsConfigSchemaRef)) + { + writer.WritePropertyName("defaultStreamsConfigSchemaRef"u8); + writer.WriteStringValue(DefaultStreamsConfigSchemaRef); + } + if (Optional.IsDefined(AdditionalConfigSchemaRef)) + { + writer.WritePropertyName("additionalConfigSchemaRef"u8); + writer.WriteStringValue(AdditionalConfigSchemaRef); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs(document.RootElement, options); + } + + internal static AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs DeserializeAkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string defaultDatasetConfigSchemaRef = default; + string defaultEventsConfigSchemaRef = default; + string defaultProcessControlConfigSchemaRef = default; + string defaultStreamsConfigSchemaRef = default; + string additionalConfigSchemaRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("defaultDatasetConfigSchemaRef"u8)) + { + defaultDatasetConfigSchemaRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultEventsConfigSchemaRef"u8)) + { + defaultEventsConfigSchemaRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultProcessControlConfigSchemaRef"u8)) + { + defaultProcessControlConfigSchemaRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("defaultStreamsConfigSchemaRef"u8)) + { + defaultStreamsConfigSchemaRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("additionalConfigSchemaRef"u8)) + { + additionalConfigSchemaRef = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs( + defaultDatasetConfigSchemaRef, + defaultEventsConfigSchemaRef, + defaultProcessControlConfigSchemaRef, + defaultStreamsConfigSchemaRef, + additionalConfigSchemaRef, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.cs new file mode 100644 index 000000000000..8684ec17460a --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs properties. + public partial class AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs() + { + } + + /// Initializes a new instance of . + /// The default configuration schema reference for datasets. + /// The default configuration schema reference for events. + /// The default configuration schema reference for process control. + /// The default configuration schema reference for streams. + /// The additional configuration schema reference. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs(string defaultDatasetConfigSchemaRef, string defaultEventsConfigSchemaRef, string defaultProcessControlConfigSchemaRef, string defaultStreamsConfigSchemaRef, string additionalConfigSchemaRef, IDictionary serializedAdditionalRawData) + { + DefaultDatasetConfigSchemaRef = defaultDatasetConfigSchemaRef; + DefaultEventsConfigSchemaRef = defaultEventsConfigSchemaRef; + DefaultProcessControlConfigSchemaRef = defaultProcessControlConfigSchemaRef; + DefaultStreamsConfigSchemaRef = defaultStreamsConfigSchemaRef; + AdditionalConfigSchemaRef = additionalConfigSchemaRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The default configuration schema reference for datasets. + public string DefaultDatasetConfigSchemaRef { get; set; } + /// The default configuration schema reference for events. + public string DefaultEventsConfigSchemaRef { get; set; } + /// The default configuration schema reference for process control. + public string DefaultProcessControlConfigSchemaRef { get; set; } + /// The default configuration schema reference for streams. + public string DefaultStreamsConfigSchemaRef { get; set; } + /// The additional configuration schema reference. + public string AdditionalConfigSchemaRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.Serialization.cs new file mode 100644 index 000000000000..0749a6601f01 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateDeviceInboundEndpointType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointType)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType); + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(ConfigurationSchemaRefs)) + { + writer.WritePropertyName("configurationSchemaRefs"u8); + writer.WriteObjectValue(ConfigurationSchemaRefs, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateDeviceInboundEndpointType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateDeviceInboundEndpointType(document.RootElement, options); + } + + internal static AkriConnectorTemplateDeviceInboundEndpointType DeserializeAkriConnectorTemplateDeviceInboundEndpointType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string endpointType = default; + string version = default; + AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs configurationSchemaRefs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointType"u8)) + { + endpointType = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("configurationSchemaRefs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + configurationSchemaRefs = AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs.DeserializeAkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateDeviceInboundEndpointType(endpointType, version, configurationSchemaRefs, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointType)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateDeviceInboundEndpointType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateDeviceInboundEndpointType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateDeviceInboundEndpointType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.cs new file mode 100644 index 000000000000..a7f074e446f3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDeviceInboundEndpointType.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateDeviceInboundEndpointType properties. + public partial class AkriConnectorTemplateDeviceInboundEndpointType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of the device inbound endpoint. + /// The version of the device inbound endpoint. + /// or is null. + public AkriConnectorTemplateDeviceInboundEndpointType(string endpointType, string version) + { + Argument.AssertNotNull(endpointType, nameof(endpointType)); + Argument.AssertNotNull(version, nameof(version)); + + EndpointType = endpointType; + Version = version; + } + + /// Initializes a new instance of . + /// The type of the device inbound endpoint. + /// The version of the device inbound endpoint. + /// The configuration schema references for the device inbound endpoint. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateDeviceInboundEndpointType(string endpointType, string version, AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs configurationSchemaRefs, IDictionary serializedAdditionalRawData) + { + EndpointType = endpointType; + Version = version; + ConfigurationSchemaRefs = configurationSchemaRefs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateDeviceInboundEndpointType() + { + } + + /// The type of the device inbound endpoint. + public string EndpointType { get; set; } + /// The version of the device inbound endpoint. + public string Version { get; set; } + /// The configuration schema references for the device inbound endpoint. + public AkriConnectorTemplateDeviceInboundEndpointConfigurationSchemaRefs ConfigurationSchemaRefs { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.Serialization.cs new file mode 100644 index 000000000000..f26d5e8a2612 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AkriConnectorTemplateDiagnostics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateDiagnostics)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("logs"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Level)) + { + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateDiagnostics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateDiagnostics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateDiagnostics(document.RootElement, options); + } + + internal static AkriConnectorTemplateDiagnostics DeserializeAkriConnectorTemplateDiagnostics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string level = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("logs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("level"u8)) + { + level = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateDiagnostics(level, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateDiagnostics)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateDiagnostics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateDiagnostics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateDiagnostics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.cs new file mode 100644 index 000000000000..6ca7192e55a0 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateDiagnostics.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateDiagnostics properties. + internal partial class AkriConnectorTemplateDiagnostics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateDiagnostics() + { + } + + /// Initializes a new instance of . + /// The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateDiagnostics(string level, IDictionary serializedAdditionalRawData) + { + Level = level; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'. + public string Level { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.Serialization.cs new file mode 100644 index 000000000000..db504e006aa2 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.Serialization.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmAdvancedConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAdvancedConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Delete)) + { + writer.WritePropertyName("delete"u8); + writer.WriteObjectValue(Delete, options); + } + if (Optional.IsDefined(Install)) + { + writer.WritePropertyName("install"u8); + writer.WriteObjectValue(Install, options); + } + if (Optional.IsDefined(Upgrade)) + { + writer.WritePropertyName("upgrade"u8); + writer.WriteObjectValue(Upgrade, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmAdvancedConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAdvancedConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmAdvancedConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmAdvancedConfiguration DeserializeAkriConnectorTemplateHelmAdvancedConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateHelmDeleteConfiguration delete = default; + AkriConnectorTemplateHelmInstallConfiguration install = default; + AkriConnectorTemplateHelmUpgradeConfiguration upgrade = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("delete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + delete = AkriConnectorTemplateHelmDeleteConfiguration.DeserializeAkriConnectorTemplateHelmDeleteConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("install"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + install = AkriConnectorTemplateHelmInstallConfiguration.DeserializeAkriConnectorTemplateHelmInstallConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("upgrade"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + upgrade = AkriConnectorTemplateHelmUpgradeConfiguration.DeserializeAkriConnectorTemplateHelmUpgradeConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmAdvancedConfiguration(delete, install, upgrade, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAdvancedConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmAdvancedConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmAdvancedConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAdvancedConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.cs new file mode 100644 index 000000000000..e7c51cccf966 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAdvancedConfiguration.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmAdvancedConfiguration properties. + public partial class AkriConnectorTemplateHelmAdvancedConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateHelmAdvancedConfiguration() + { + } + + /// Initializes a new instance of . + /// Delete operation configuration for the Helm chart. + /// Install operation configuration for the Helm chart. + /// Upgrade operation configuration for the Helm chart. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmAdvancedConfiguration(AkriConnectorTemplateHelmDeleteConfiguration delete, AkriConnectorTemplateHelmInstallConfiguration install, AkriConnectorTemplateHelmUpgradeConfiguration upgrade, IDictionary serializedAdditionalRawData) + { + Delete = delete; + Install = install; + Upgrade = upgrade; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Delete operation configuration for the Helm chart. + public AkriConnectorTemplateHelmDeleteConfiguration Delete { get; set; } + /// Install operation configuration for the Helm chart. + public AkriConnectorTemplateHelmInstallConfiguration Install { get; set; } + /// Upgrade operation configuration for the Helm chart. + public AkriConnectorTemplateHelmUpgradeConfiguration Upgrade { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.Serialization.cs new file mode 100644 index 000000000000..4f28c7b56250 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmAuthSecretRef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAuthSecretRef)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("secretRef"u8); + writer.WriteStringValue(SecretRef); + writer.WritePropertyName("passwordKey"u8); + writer.WriteStringValue(PasswordKey); + writer.WritePropertyName("usernameKey"u8); + writer.WriteStringValue(UsernameKey); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmAuthSecretRef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAuthSecretRef)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmAuthSecretRef(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmAuthSecretRef DeserializeAkriConnectorTemplateHelmAuthSecretRef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretRef = default; + string passwordKey = default; + string usernameKey = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretRef"u8)) + { + secretRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("passwordKey"u8)) + { + passwordKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("usernameKey"u8)) + { + usernameKey = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmAuthSecretRef(secretRef, passwordKey, usernameKey, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAuthSecretRef)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmAuthSecretRef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmAuthSecretRef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmAuthSecretRef)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.cs new file mode 100644 index 000000000000..7253aac582b6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmAuthSecretRef.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmAuthSecretRef properties. + public partial class AkriConnectorTemplateHelmAuthSecretRef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the secret. + /// The key of the password in the secret. + /// The key of the username in the secret. + /// , or is null. + public AkriConnectorTemplateHelmAuthSecretRef(string secretRef, string passwordKey, string usernameKey) + { + Argument.AssertNotNull(secretRef, nameof(secretRef)); + Argument.AssertNotNull(passwordKey, nameof(passwordKey)); + Argument.AssertNotNull(usernameKey, nameof(usernameKey)); + + SecretRef = secretRef; + PasswordKey = passwordKey; + UsernameKey = usernameKey; + } + + /// Initializes a new instance of . + /// The name of the secret. + /// The key of the password in the secret. + /// The key of the username in the secret. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmAuthSecretRef(string secretRef, string passwordKey, string usernameKey, IDictionary serializedAdditionalRawData) + { + SecretRef = secretRef; + PasswordKey = passwordKey; + UsernameKey = usernameKey; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateHelmAuthSecretRef() + { + } + + /// The name of the secret. + public string SecretRef { get; set; } + /// The key of the password in the secret. + public string PasswordKey { get; set; } + /// The key of the username in the secret. + public string UsernameKey { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.Serialization.cs new file mode 100644 index 000000000000..539f216b7efb --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("helmConfigurationSettings"u8); + writer.WriteObjectValue(HelmConfigurationSettings, options); + } + + AkriConnectorTemplateHelmConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmConfiguration DeserializeAkriConnectorTemplateHelmConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateHelmConfigurationSettings helmConfigurationSettings = default; + AkriConnectorTemplateRuntimeConfigurationType runtimeConfigurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("helmConfigurationSettings"u8)) + { + helmConfigurationSettings = AkriConnectorTemplateHelmConfigurationSettings.DeserializeAkriConnectorTemplateHelmConfigurationSettings(property.Value, options); + continue; + } + if (property.NameEquals("runtimeConfigurationType"u8)) + { + runtimeConfigurationType = new AkriConnectorTemplateRuntimeConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmConfiguration(runtimeConfigurationType, serializedAdditionalRawData, helmConfigurationSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.cs new file mode 100644 index 000000000000..49b67b9dccc8 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfiguration.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmConfiguration properties. + public partial class AkriConnectorTemplateHelmConfiguration : AkriConnectorTemplateRuntimeConfiguration + { + /// Initializes a new instance of . + /// The Helm configuration settings. + /// is null. + public AkriConnectorTemplateHelmConfiguration(AkriConnectorTemplateHelmConfigurationSettings helmConfigurationSettings) + { + Argument.AssertNotNull(helmConfigurationSettings, nameof(helmConfigurationSettings)); + + HelmConfigurationSettings = helmConfigurationSettings; + RuntimeConfigurationType = AkriConnectorTemplateRuntimeConfigurationType.HelmConfiguration; + } + + /// Initializes a new instance of . + /// Runtime configuration type for the Connector template. + /// Keeps track of any properties unknown to the library. + /// The Helm configuration settings. + internal AkriConnectorTemplateHelmConfiguration(AkriConnectorTemplateRuntimeConfigurationType runtimeConfigurationType, IDictionary serializedAdditionalRawData, AkriConnectorTemplateHelmConfigurationSettings helmConfigurationSettings) : base(runtimeConfigurationType, serializedAdditionalRawData) + { + HelmConfigurationSettings = helmConfigurationSettings; + RuntimeConfigurationType = runtimeConfigurationType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateHelmConfiguration() + { + } + + /// The Helm configuration settings. + public AkriConnectorTemplateHelmConfigurationSettings HelmConfigurationSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.Serialization.cs new file mode 100644 index 000000000000..024367e57f1c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.Serialization.cs @@ -0,0 +1,196 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmConfigurationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfigurationSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(RegistrySettings)) + { + writer.WritePropertyName("registrySettings"u8); + writer.WriteObjectValue(RegistrySettings, options); + } + writer.WritePropertyName("releaseName"u8); + writer.WriteStringValue(ReleaseName); + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(AdvancedConfiguration)) + { + writer.WritePropertyName("advancedConfiguration"u8); + writer.WriteObjectValue(AdvancedConfiguration, options); + } + if (Optional.IsCollectionDefined(Values)) + { + writer.WritePropertyName("values"u8); + writer.WriteStartObject(); + foreach (var item in Values) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfigurationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmConfigurationSettings(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmConfigurationSettings DeserializeAkriConnectorTemplateHelmConfigurationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateHelmRegistrySettings registrySettings = default; + string releaseName = default; + string version = default; + AkriConnectorTemplateHelmAdvancedConfiguration advancedConfiguration = default; + IDictionary values = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registrySettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + registrySettings = AkriConnectorTemplateHelmRegistrySettings.DeserializeAkriConnectorTemplateHelmRegistrySettings(property.Value, options); + continue; + } + if (property.NameEquals("releaseName"u8)) + { + releaseName = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("advancedConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + advancedConfiguration = AkriConnectorTemplateHelmAdvancedConfiguration.DeserializeAkriConnectorTemplateHelmAdvancedConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("values"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + values = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmConfigurationSettings( + registrySettings, + releaseName, + version, + advancedConfiguration, + values ?? new ChangeTrackingDictionary(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfigurationSettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmConfigurationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmConfigurationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.cs new file mode 100644 index 000000000000..3f83acd0d6a0 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmConfigurationSettings.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmConfiguration properties. + public partial class AkriConnectorTemplateHelmConfigurationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The release name of the Helm chart. + /// The version of the Helm chart. + /// or is null. + public AkriConnectorTemplateHelmConfigurationSettings(string releaseName, string version) + { + Argument.AssertNotNull(releaseName, nameof(releaseName)); + Argument.AssertNotNull(version, nameof(version)); + + ReleaseName = releaseName; + Version = version; + Values = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// + /// The registry settings for the helm chart to be used. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// The release name of the Helm chart. + /// The version of the Helm chart. + /// + /// Advanced configuration for the Helm chart. + /// Install, upgrade, and uninstall options for the helm chart such as atomic, wait, timeout, `wait_for_jobs`, and `disable_hooks`. + /// + /// A map of values to pass to the helm chart. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmConfigurationSettings(AkriConnectorTemplateHelmRegistrySettings registrySettings, string releaseName, string version, AkriConnectorTemplateHelmAdvancedConfiguration advancedConfiguration, IDictionary values, IDictionary serializedAdditionalRawData) + { + RegistrySettings = registrySettings; + ReleaseName = releaseName; + Version = version; + AdvancedConfiguration = advancedConfiguration; + Values = values; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateHelmConfigurationSettings() + { + } + + /// + /// The registry settings for the helm chart to be used. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public AkriConnectorTemplateHelmRegistrySettings RegistrySettings { get; set; } + /// The release name of the Helm chart. + public string ReleaseName { get; set; } + /// The version of the Helm chart. + public string Version { get; set; } + /// + /// Advanced configuration for the Helm chart. + /// Install, upgrade, and uninstall options for the helm chart such as atomic, wait, timeout, `wait_for_jobs`, and `disable_hooks`. + /// + public AkriConnectorTemplateHelmAdvancedConfiguration AdvancedConfiguration { get; set; } + /// A map of values to pass to the helm chart. + public IDictionary Values { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.Serialization.cs new file mode 100644 index 000000000000..b9ca828dabe0 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmContainerRegistry : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistry)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("containerRegistrySettings"u8); + writer.WriteObjectValue(ContainerRegistrySettings, options); + } + + AkriConnectorTemplateHelmContainerRegistry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistry)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmContainerRegistry(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmContainerRegistry DeserializeAkriConnectorTemplateHelmContainerRegistry(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateHelmContainerRegistrySettings containerRegistrySettings = default; + AkriConnectorTemplateHelmRegistrySettingsType registrySettingsType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerRegistrySettings"u8)) + { + containerRegistrySettings = AkriConnectorTemplateHelmContainerRegistrySettings.DeserializeAkriConnectorTemplateHelmContainerRegistrySettings(property.Value, options); + continue; + } + if (property.NameEquals("registrySettingsType"u8)) + { + registrySettingsType = new AkriConnectorTemplateHelmRegistrySettingsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmContainerRegistry(registrySettingsType, serializedAdditionalRawData, containerRegistrySettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistry)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmContainerRegistry IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmContainerRegistry(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistry)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.cs new file mode 100644 index 000000000000..4b532efa51d4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistry.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmContainerRegistry properties. + public partial class AkriConnectorTemplateHelmContainerRegistry : AkriConnectorTemplateHelmRegistrySettings + { + /// Initializes a new instance of . + /// The registry settings for the container registry. + /// is null. + public AkriConnectorTemplateHelmContainerRegistry(AkriConnectorTemplateHelmContainerRegistrySettings containerRegistrySettings) + { + Argument.AssertNotNull(containerRegistrySettings, nameof(containerRegistrySettings)); + + ContainerRegistrySettings = containerRegistrySettings; + RegistrySettingsType = AkriConnectorTemplateHelmRegistrySettingsType.ContainerRegistry; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The registry settings for the container registry. + internal AkriConnectorTemplateHelmContainerRegistry(AkriConnectorTemplateHelmRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData, AkriConnectorTemplateHelmContainerRegistrySettings containerRegistrySettings) : base(registrySettingsType, serializedAdditionalRawData) + { + ContainerRegistrySettings = containerRegistrySettings; + RegistrySettingsType = registrySettingsType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateHelmContainerRegistry() + { + } + + /// The registry settings for the container registry. + public AkriConnectorTemplateHelmContainerRegistrySettings ContainerRegistrySettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.Serialization.cs new file mode 100644 index 000000000000..a29bca66c93b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmContainerRegistrySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistrySettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("registry"u8); + writer.WriteStringValue(Registry); + writer.WritePropertyName("repository"u8); + writer.WriteStringValue(Repository); + if (Optional.IsDefined(AuthSecretRef)) + { + writer.WritePropertyName("authSecretRef"u8); + writer.WriteObjectValue(AuthSecretRef, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmContainerRegistrySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistrySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmContainerRegistrySettings(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmContainerRegistrySettings DeserializeAkriConnectorTemplateHelmContainerRegistrySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string registry = default; + string repository = default; + AkriConnectorTemplateHelmAuthSecretRef authSecretRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registry"u8)) + { + registry = property.Value.GetString(); + continue; + } + if (property.NameEquals("repository"u8)) + { + repository = property.Value.GetString(); + continue; + } + if (property.NameEquals("authSecretRef"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authSecretRef = AkriConnectorTemplateHelmAuthSecretRef.DeserializeAkriConnectorTemplateHelmAuthSecretRef(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmContainerRegistrySettings(registry, repository, authSecretRef, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistrySettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmContainerRegistrySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmContainerRegistrySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmContainerRegistrySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.cs new file mode 100644 index 000000000000..847e507d65ef --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmContainerRegistrySettings.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmContainerRegistrySettings properties. + public partial class AkriConnectorTemplateHelmContainerRegistrySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The registry to use for the Helm chart. + /// The repository to use for the Helm chart. + /// or is null. + public AkriConnectorTemplateHelmContainerRegistrySettings(string registry, string repository) + { + Argument.AssertNotNull(registry, nameof(registry)); + Argument.AssertNotNull(repository, nameof(repository)); + + Registry = registry; + Repository = repository; + } + + /// Initializes a new instance of . + /// The registry to use for the Helm chart. + /// The repository to use for the Helm chart. + /// Optional reference to a secret in the same namespace to use for pulling the Helm chart. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmContainerRegistrySettings(string registry, string repository, AkriConnectorTemplateHelmAuthSecretRef authSecretRef, IDictionary serializedAdditionalRawData) + { + Registry = registry; + Repository = repository; + AuthSecretRef = authSecretRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateHelmContainerRegistrySettings() + { + } + + /// The registry to use for the Helm chart. + public string Registry { get; set; } + /// The repository to use for the Helm chart. + public string Repository { get; set; } + /// Optional reference to a secret in the same namespace to use for pulling the Helm chart. + public AkriConnectorTemplateHelmAuthSecretRef AuthSecretRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.Serialization.cs new file mode 100644 index 000000000000..223e22c199e8 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmDeleteConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmDeleteConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteNumberValue(Timeout.Value); + } + if (Optional.IsDefined(WaitForJobs)) + { + writer.WritePropertyName("waitForJobs"u8); + writer.WriteBooleanValue(WaitForJobs.Value); + } + if (Optional.IsDefined(Atomic)) + { + writer.WritePropertyName("atomic"u8); + writer.WriteBooleanValue(Atomic.Value); + } + if (Optional.IsDefined(DisableHooks)) + { + writer.WritePropertyName("disableHooks"u8); + writer.WriteBooleanValue(DisableHooks.Value); + } + if (Optional.IsDefined(Wait)) + { + writer.WritePropertyName("wait"u8); + writer.WriteBooleanValue(Wait.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmDeleteConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmDeleteConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmDeleteConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmDeleteConfiguration DeserializeAkriConnectorTemplateHelmDeleteConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? timeout = default; + bool? waitForJobs = default; + bool? atomic = default; + bool? disableHooks = default; + bool? wait = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("waitForJobs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitForJobs = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("atomic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + atomic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableHooks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableHooks = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("wait"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + wait = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmDeleteConfiguration( + timeout, + waitForJobs, + atomic, + disableHooks, + wait, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmDeleteConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmDeleteConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmDeleteConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmDeleteConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.cs new file mode 100644 index 000000000000..29dbc5e48e2e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmDeleteConfiguration.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmDeleteConfiguration properties. + public partial class AkriConnectorTemplateHelmDeleteConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateHelmDeleteConfiguration() + { + } + + /// Initializes a new instance of . + /// The timeout for the operation in seconds. + /// The wait for jobs flag. + /// Atomic flag for the operation. + /// Disable hooks flag for the operation. + /// The wait flag for the operation. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmDeleteConfiguration(int? timeout, bool? waitForJobs, bool? atomic, bool? disableHooks, bool? wait, IDictionary serializedAdditionalRawData) + { + Timeout = timeout; + WaitForJobs = waitForJobs; + Atomic = atomic; + DisableHooks = disableHooks; + Wait = wait; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The timeout for the operation in seconds. + public int? Timeout { get; set; } + /// The wait for jobs flag. + public bool? WaitForJobs { get; set; } + /// Atomic flag for the operation. + public bool? Atomic { get; set; } + /// Disable hooks flag for the operation. + public bool? DisableHooks { get; set; } + /// The wait flag for the operation. + public bool? Wait { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.Serialization.cs new file mode 100644 index 000000000000..b6ba319b8547 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmInstallConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmInstallConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteNumberValue(Timeout.Value); + } + if (Optional.IsDefined(WaitForJobs)) + { + writer.WritePropertyName("waitForJobs"u8); + writer.WriteBooleanValue(WaitForJobs.Value); + } + if (Optional.IsDefined(Atomic)) + { + writer.WritePropertyName("atomic"u8); + writer.WriteBooleanValue(Atomic.Value); + } + if (Optional.IsDefined(DisableHooks)) + { + writer.WritePropertyName("disableHooks"u8); + writer.WriteBooleanValue(DisableHooks.Value); + } + if (Optional.IsDefined(Wait)) + { + writer.WritePropertyName("wait"u8); + writer.WriteBooleanValue(Wait.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmInstallConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmInstallConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmInstallConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmInstallConfiguration DeserializeAkriConnectorTemplateHelmInstallConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? timeout = default; + bool? waitForJobs = default; + bool? atomic = default; + bool? disableHooks = default; + bool? wait = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("waitForJobs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitForJobs = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("atomic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + atomic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableHooks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableHooks = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("wait"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + wait = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmInstallConfiguration( + timeout, + waitForJobs, + atomic, + disableHooks, + wait, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmInstallConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmInstallConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmInstallConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmInstallConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.cs new file mode 100644 index 000000000000..cb4f891e82ef --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmInstallConfiguration.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmInstallConfiguration properties. + public partial class AkriConnectorTemplateHelmInstallConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateHelmInstallConfiguration() + { + } + + /// Initializes a new instance of . + /// The timeout for the operation in seconds. + /// The wait for jobs flag. + /// Atomic flag for the operation. + /// Disable hooks flag for the operation. + /// The wait flag for the operation. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmInstallConfiguration(int? timeout, bool? waitForJobs, bool? atomic, bool? disableHooks, bool? wait, IDictionary serializedAdditionalRawData) + { + Timeout = timeout; + WaitForJobs = waitForJobs; + Atomic = atomic; + DisableHooks = disableHooks; + Wait = wait; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The timeout for the operation in seconds. + public int? Timeout { get; set; } + /// The wait for jobs flag. + public bool? WaitForJobs { get; set; } + /// Atomic flag for the operation. + public bool? Atomic { get; set; } + /// Disable hooks flag for the operation. + public bool? DisableHooks { get; set; } + /// The wait flag for the operation. + public bool? Wait { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.Serialization.cs new file mode 100644 index 000000000000..057654e70550 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmRegistryEndpointRef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistryEndpointRef)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("registryEndpointRef"u8); + writer.WriteStringValue(RegistryEndpointRef); + } + + AkriConnectorTemplateHelmRegistryEndpointRef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistryEndpointRef)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmRegistryEndpointRef(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmRegistryEndpointRef DeserializeAkriConnectorTemplateHelmRegistryEndpointRef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string registryEndpointRef = default; + AkriConnectorTemplateHelmRegistrySettingsType registrySettingsType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registryEndpointRef"u8)) + { + registryEndpointRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("registrySettingsType"u8)) + { + registrySettingsType = new AkriConnectorTemplateHelmRegistrySettingsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmRegistryEndpointRef(registrySettingsType, serializedAdditionalRawData, registryEndpointRef); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistryEndpointRef)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmRegistryEndpointRef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmRegistryEndpointRef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistryEndpointRef)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.cs new file mode 100644 index 000000000000..d2f396e3798c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistryEndpointRef.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmRegistryEndpointRef properties. + public partial class AkriConnectorTemplateHelmRegistryEndpointRef : AkriConnectorTemplateHelmRegistrySettings + { + /// Initializes a new instance of . + /// The name of the registry endpoint. + /// is null. + public AkriConnectorTemplateHelmRegistryEndpointRef(string registryEndpointRef) + { + Argument.AssertNotNull(registryEndpointRef, nameof(registryEndpointRef)); + + RegistryEndpointRef = registryEndpointRef; + RegistrySettingsType = AkriConnectorTemplateHelmRegistrySettingsType.RegistryEndpointRef; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The name of the registry endpoint. + internal AkriConnectorTemplateHelmRegistryEndpointRef(AkriConnectorTemplateHelmRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData, string registryEndpointRef) : base(registrySettingsType, serializedAdditionalRawData) + { + RegistryEndpointRef = registryEndpointRef; + RegistrySettingsType = registrySettingsType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateHelmRegistryEndpointRef() + { + } + + /// The name of the registry endpoint. + public string RegistryEndpointRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.Serialization.cs new file mode 100644 index 000000000000..cdb1360f1d6a --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriConnectorTemplateHelmRegistrySettings))] + public partial class AkriConnectorTemplateHelmRegistrySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("registrySettingsType"u8); + writer.WriteStringValue(RegistrySettingsType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmRegistrySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmRegistrySettings(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmRegistrySettings DeserializeAkriConnectorTemplateHelmRegistrySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("registrySettingsType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ContainerRegistry": return AkriConnectorTemplateHelmContainerRegistry.DeserializeAkriConnectorTemplateHelmContainerRegistry(element, options); + case "RegistryEndpointRef": return AkriConnectorTemplateHelmRegistryEndpointRef.DeserializeAkriConnectorTemplateHelmRegistryEndpointRef(element, options); + } + } + return UnknownAkriConnectorTemplateHelmRegistrySettings.DeserializeUnknownAkriConnectorTemplateHelmRegistrySettings(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmRegistrySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmRegistrySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.cs new file mode 100644 index 000000000000..dd56deb3cebf --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriConnectorTemplateHelmRegistrySettings properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class AkriConnectorTemplateHelmRegistrySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriConnectorTemplateHelmRegistrySettings() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmRegistrySettings(AkriConnectorTemplateHelmRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData) + { + RegistrySettingsType = registrySettingsType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the registry settings type. + internal AkriConnectorTemplateHelmRegistrySettingsType RegistrySettingsType { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettingsType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettingsType.cs new file mode 100644 index 000000000000..2cd973b9019d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmRegistrySettingsType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmRegistrySettingsType values. + internal readonly partial struct AkriConnectorTemplateHelmRegistrySettingsType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorTemplateHelmRegistrySettingsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegistryEndpointRefValue = "RegistryEndpointRef"; + private const string ContainerRegistryValue = "ContainerRegistry"; + + /// A Registry Endpoint reference. + public static AkriConnectorTemplateHelmRegistrySettingsType RegistryEndpointRef { get; } = new AkriConnectorTemplateHelmRegistrySettingsType(RegistryEndpointRefValue); + /// A Container Registry reference. + public static AkriConnectorTemplateHelmRegistrySettingsType ContainerRegistry { get; } = new AkriConnectorTemplateHelmRegistrySettingsType(ContainerRegistryValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorTemplateHelmRegistrySettingsType left, AkriConnectorTemplateHelmRegistrySettingsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorTemplateHelmRegistrySettingsType left, AkriConnectorTemplateHelmRegistrySettingsType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorTemplateHelmRegistrySettingsType(string value) => new AkriConnectorTemplateHelmRegistrySettingsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorTemplateHelmRegistrySettingsType other && Equals(other); + /// + public bool Equals(AkriConnectorTemplateHelmRegistrySettingsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.Serialization.cs new file mode 100644 index 000000000000..9cd8c76a4679 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.Serialization.cs @@ -0,0 +1,199 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateHelmUpgradeConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmUpgradeConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Timeout)) + { + writer.WritePropertyName("timeout"u8); + writer.WriteNumberValue(Timeout.Value); + } + if (Optional.IsDefined(WaitForJobs)) + { + writer.WritePropertyName("waitForJobs"u8); + writer.WriteBooleanValue(WaitForJobs.Value); + } + if (Optional.IsDefined(Atomic)) + { + writer.WritePropertyName("atomic"u8); + writer.WriteBooleanValue(Atomic.Value); + } + if (Optional.IsDefined(DisableHooks)) + { + writer.WritePropertyName("disableHooks"u8); + writer.WriteBooleanValue(DisableHooks.Value); + } + if (Optional.IsDefined(Wait)) + { + writer.WritePropertyName("wait"u8); + writer.WriteBooleanValue(Wait.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateHelmUpgradeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmUpgradeConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmUpgradeConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateHelmUpgradeConfiguration DeserializeAkriConnectorTemplateHelmUpgradeConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? timeout = default; + bool? waitForJobs = default; + bool? atomic = default; + bool? disableHooks = default; + bool? wait = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("timeout"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeout = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("waitForJobs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + waitForJobs = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("atomic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + atomic = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("disableHooks"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disableHooks = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("wait"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + wait = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateHelmUpgradeConfiguration( + timeout, + waitForJobs, + atomic, + disableHooks, + wait, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmUpgradeConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmUpgradeConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmUpgradeConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmUpgradeConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.cs new file mode 100644 index 000000000000..42ee74083ffb --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateHelmUpgradeConfiguration.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateHelmUpgradeConfiguration properties. + public partial class AkriConnectorTemplateHelmUpgradeConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorTemplateHelmUpgradeConfiguration() + { + } + + /// Initializes a new instance of . + /// The timeout for the operation in seconds. + /// The wait for jobs flag. + /// Atomic flag for the operation. + /// Disable hooks flag for the operation. + /// The wait flag for the operation. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateHelmUpgradeConfiguration(int? timeout, bool? waitForJobs, bool? atomic, bool? disableHooks, bool? wait, IDictionary serializedAdditionalRawData) + { + Timeout = timeout; + WaitForJobs = waitForJobs; + Atomic = atomic; + DisableHooks = disableHooks; + Wait = wait; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The timeout for the operation in seconds. + public int? Timeout { get; set; } + /// The wait for jobs flag. + public bool? WaitForJobs { get; set; } + /// Atomic flag for the operation. + public bool? Atomic { get; set; } + /// Disable hooks flag for the operation. + public bool? DisableHooks { get; set; } + /// The wait flag for the operation. + public bool? Wait { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.Serialization.cs new file mode 100644 index 000000000000..ce6cc9241147 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateManagedConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("managedConfigurationSettings"u8); + writer.WriteObjectValue(ManagedConfigurationSettings, options); + } + + AkriConnectorTemplateManagedConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateManagedConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateManagedConfiguration DeserializeAkriConnectorTemplateManagedConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateManagedConfigurationSettings managedConfigurationSettings = default; + AkriConnectorTemplateRuntimeConfigurationType runtimeConfigurationType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("managedConfigurationSettings"u8)) + { + managedConfigurationSettings = AkriConnectorTemplateManagedConfigurationSettings.DeserializeAkriConnectorTemplateManagedConfigurationSettings(property.Value, options); + continue; + } + if (property.NameEquals("runtimeConfigurationType"u8)) + { + runtimeConfigurationType = new AkriConnectorTemplateRuntimeConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateManagedConfiguration(runtimeConfigurationType, serializedAdditionalRawData, managedConfigurationSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateManagedConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateManagedConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.cs new file mode 100644 index 000000000000..b3692a79d00d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfiguration.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateManagedConfiguration properties. + public partial class AkriConnectorTemplateManagedConfiguration : AkriConnectorTemplateRuntimeConfiguration + { + /// Initializes a new instance of . + /// + /// The managed configuration settings. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public AkriConnectorTemplateManagedConfiguration(AkriConnectorTemplateManagedConfigurationSettings managedConfigurationSettings) + { + Argument.AssertNotNull(managedConfigurationSettings, nameof(managedConfigurationSettings)); + + ManagedConfigurationSettings = managedConfigurationSettings; + RuntimeConfigurationType = AkriConnectorTemplateRuntimeConfigurationType.ManagedConfiguration; + } + + /// Initializes a new instance of . + /// Runtime configuration type for the Connector template. + /// Keeps track of any properties unknown to the library. + /// + /// The managed configuration settings. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + internal AkriConnectorTemplateManagedConfiguration(AkriConnectorTemplateRuntimeConfigurationType runtimeConfigurationType, IDictionary serializedAdditionalRawData, AkriConnectorTemplateManagedConfigurationSettings managedConfigurationSettings) : base(runtimeConfigurationType, serializedAdditionalRawData) + { + ManagedConfigurationSettings = managedConfigurationSettings; + RuntimeConfigurationType = runtimeConfigurationType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateManagedConfiguration() + { + } + + /// + /// The managed configuration settings. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public AkriConnectorTemplateManagedConfigurationSettings ManagedConfigurationSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.Serialization.cs new file mode 100644 index 000000000000..d08866eee600 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriConnectorTemplateManagedConfigurationSettings))] + public partial class AkriConnectorTemplateManagedConfigurationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("managedConfigurationType"u8); + writer.WriteStringValue(ManagedConfigurationType.ToString()); + if (Optional.IsDefined(Allocation)) + { + writer.WritePropertyName("allocation"u8); + writer.WriteObjectValue(Allocation, options); + } + if (Optional.IsCollectionDefined(PersistentVolumeClaims)) + { + writer.WritePropertyName("persistentVolumeClaims"u8); + writer.WriteStartArray(); + foreach (var item in PersistentVolumeClaims) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(AdditionalConfiguration)) + { + writer.WritePropertyName("additionalConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in AdditionalConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsCollectionDefined(PersistentVolumeClaimTemplates)) + { + writer.WritePropertyName("persistentVolumeClaimTemplates"u8); + writer.WriteStartArray(); + foreach (var item in PersistentVolumeClaimTemplates) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStartObject(); + foreach (var item0 in item) + { + writer.WritePropertyName(item0.Key); + if (item0.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item0.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item0.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartArray(); + foreach (var item in Secrets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(TrustSettings)) + { + writer.WritePropertyName("trustSettings"u8); + writer.WriteObjectValue(TrustSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateManagedConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateManagedConfigurationSettings(document.RootElement, options); + } + + internal static AkriConnectorTemplateManagedConfigurationSettings DeserializeAkriConnectorTemplateManagedConfigurationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("managedConfigurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ImageConfiguration": return AkriConnectorTemplateRuntimeImageConfiguration.DeserializeAkriConnectorTemplateRuntimeImageConfiguration(element, options); + case "StatefulSetConfiguration": return AkriConnectorTemplateRuntimeStatefulSetConfiguration.DeserializeAkriConnectorTemplateRuntimeStatefulSetConfiguration(element, options); + } + } + return UnknownAkriConnectorTemplateManagedConfigurationSettings.DeserializeUnknownAkriConnectorTemplateManagedConfigurationSettings(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateManagedConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateManagedConfigurationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.cs new file mode 100644 index 000000000000..6f85e8b32fbb --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationSettings.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriConnectorTemplateManagedConfiguration properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class AkriConnectorTemplateManagedConfigurationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriConnectorTemplateManagedConfigurationSettings() + { + PersistentVolumeClaims = new ChangeTrackingList(); + AdditionalConfiguration = new ChangeTrackingDictionary(); + PersistentVolumeClaimTemplates = new ChangeTrackingList>(); + Secrets = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The type of the managed configuration. + /// + /// Allocation settings for the managed configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// The persistent volume claims for the managed configuration. + /// Additional configuration for the image of the managed configuration. + /// + /// The persistent volume claim templates for the managed configuration. + /// See https://raw.githubusercontent.com/kubernetes/kubernetes/refs/heads/master/api/openapi-spec/v3/apis__apps__v1_openapi.json. + /// + /// Connector secrets that will be mounted onto all connector instances. + /// Trust list for the connector. This is used to specify the certificates that all connector instances should trust. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateManagedConfigurationSettings(AkriConnectorTemplateManagedConfigurationType managedConfigurationType, AkriConnectorTemplateAllocation allocation, IList persistentVolumeClaims, IDictionary additionalConfiguration, IList> persistentVolumeClaimTemplates, IList secrets, AkriConnectorTemplateTrustList trustSettings, IDictionary serializedAdditionalRawData) + { + ManagedConfigurationType = managedConfigurationType; + Allocation = allocation; + PersistentVolumeClaims = persistentVolumeClaims; + AdditionalConfiguration = additionalConfiguration; + PersistentVolumeClaimTemplates = persistentVolumeClaimTemplates; + Secrets = secrets; + TrustSettings = trustSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The type of the managed configuration. + internal AkriConnectorTemplateManagedConfigurationType ManagedConfigurationType { get; set; } + /// + /// Allocation settings for the managed configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public AkriConnectorTemplateAllocation Allocation { get; set; } + /// The persistent volume claims for the managed configuration. + public IList PersistentVolumeClaims { get; } + /// Additional configuration for the image of the managed configuration. + public IDictionary AdditionalConfiguration { get; } + /// + /// The persistent volume claim templates for the managed configuration. + /// See https://raw.githubusercontent.com/kubernetes/kubernetes/refs/heads/master/api/openapi-spec/v3/apis__apps__v1_openapi.json. + /// + /// To assign an object to the element of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IList> PersistentVolumeClaimTemplates { get; } + /// Connector secrets that will be mounted onto all connector instances. + public IList Secrets { get; } + /// Trust list for the connector. This is used to specify the certificates that all connector instances should trust. + internal AkriConnectorTemplateTrustList TrustSettings { get; set; } + /// The secret reference for certificates to trust. + public string TrustListSecretRef + { + get => TrustSettings is null ? default : TrustSettings.TrustListSecretRef; + set => TrustSettings = new AkriConnectorTemplateTrustList(value); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationType.cs new file mode 100644 index 000000000000..f873e5b0416f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateManagedConfigurationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Managed configuration types. + internal readonly partial struct AkriConnectorTemplateManagedConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorTemplateManagedConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ImageConfigurationValue = "ImageConfiguration"; + private const string StatefulSetConfigurationValue = "StatefulSetConfiguration"; + + /// Image Configuration Type. + public static AkriConnectorTemplateManagedConfigurationType ImageConfiguration { get; } = new AkriConnectorTemplateManagedConfigurationType(ImageConfigurationValue); + /// StatefulSet Configuration Type. + public static AkriConnectorTemplateManagedConfigurationType StatefulSetConfiguration { get; } = new AkriConnectorTemplateManagedConfigurationType(StatefulSetConfigurationValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorTemplateManagedConfigurationType left, AkriConnectorTemplateManagedConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorTemplateManagedConfigurationType left, AkriConnectorTemplateManagedConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorTemplateManagedConfigurationType(string value) => new AkriConnectorTemplateManagedConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorTemplateManagedConfigurationType other && Equals(other); + /// + public bool Equals(AkriConnectorTemplateManagedConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.Serialization.cs new file mode 100644 index 000000000000..fc2dd7fcf2b7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplatePersistentVolumeClaim : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplatePersistentVolumeClaim)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("claimName"u8); + writer.WriteStringValue(ClaimName); + writer.WritePropertyName("mountPath"u8); + writer.WriteStringValue(MountPath); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplatePersistentVolumeClaim IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplatePersistentVolumeClaim)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplatePersistentVolumeClaim(document.RootElement, options); + } + + internal static AkriConnectorTemplatePersistentVolumeClaim DeserializeAkriConnectorTemplatePersistentVolumeClaim(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string claimName = default; + string mountPath = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("claimName"u8)) + { + claimName = property.Value.GetString(); + continue; + } + if (property.NameEquals("mountPath"u8)) + { + mountPath = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplatePersistentVolumeClaim(claimName, mountPath, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplatePersistentVolumeClaim)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplatePersistentVolumeClaim IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplatePersistentVolumeClaim(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplatePersistentVolumeClaim)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.cs new file mode 100644 index 000000000000..610a46a73d36 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplatePersistentVolumeClaim.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplatePersistentVolumeClaim properties. + public partial class AkriConnectorTemplatePersistentVolumeClaim + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the persistent volume claim. + /// The mount path for the persistent volume claim. + /// or is null. + public AkriConnectorTemplatePersistentVolumeClaim(string claimName, string mountPath) + { + Argument.AssertNotNull(claimName, nameof(claimName)); + Argument.AssertNotNull(mountPath, nameof(mountPath)); + + ClaimName = claimName; + MountPath = mountPath; + } + + /// Initializes a new instance of . + /// The name of the persistent volume claim. + /// The mount path for the persistent volume claim. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplatePersistentVolumeClaim(string claimName, string mountPath, IDictionary serializedAdditionalRawData) + { + ClaimName = claimName; + MountPath = mountPath; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplatePersistentVolumeClaim() + { + } + + /// The name of the persistent volume claim. + public string ClaimName { get; set; } + /// The mount path for the persistent volume claim. + public string MountPath { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.Serialization.cs new file mode 100644 index 000000000000..7d3a41d9126e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.Serialization.cs @@ -0,0 +1,211 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(AioMetadata)) + { + writer.WritePropertyName("aioMetadata"u8); + writer.WriteObjectValue(AioMetadata, options); + } + writer.WritePropertyName("runtimeConfiguration"u8); + writer.WriteObjectValue(RuntimeConfiguration, options); + if (Optional.IsDefined(Diagnostics)) + { + writer.WritePropertyName("diagnostics"u8); + writer.WriteObjectValue(Diagnostics, options); + } + writer.WritePropertyName("deviceInboundEndpointTypes"u8); + writer.WriteStartArray(); + foreach (var item in DeviceInboundEndpointTypes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(MqttConnectionConfiguration)) + { + writer.WritePropertyName("mqttConnectionConfiguration"u8); + writer.WriteObjectValue(MqttConnectionConfiguration, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateProperties(document.RootElement, options); + } + + internal static AkriConnectorTemplateProperties DeserializeAkriConnectorTemplateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsProvisioningState? provisioningState = default; + AkriConnectorTemplateAioMetadata aioMetadata = default; + AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration = default; + AkriConnectorTemplateDiagnostics diagnostics = default; + IList deviceInboundEndpointTypes = default; + AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new IotOperationsProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("aioMetadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aioMetadata = AkriConnectorTemplateAioMetadata.DeserializeAkriConnectorTemplateAioMetadata(property.Value, options); + continue; + } + if (property.NameEquals("runtimeConfiguration"u8)) + { + runtimeConfiguration = AkriConnectorTemplateRuntimeConfiguration.DeserializeAkriConnectorTemplateRuntimeConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("diagnostics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diagnostics = AkriConnectorTemplateDiagnostics.DeserializeAkriConnectorTemplateDiagnostics(property.Value, options); + continue; + } + if (property.NameEquals("deviceInboundEndpointTypes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorTemplateDeviceInboundEndpointType.DeserializeAkriConnectorTemplateDeviceInboundEndpointType(item, options)); + } + deviceInboundEndpointTypes = array; + continue; + } + if (property.NameEquals("mqttConnectionConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mqttConnectionConfiguration = AkriConnectorsMqttConnectionConfiguration.DeserializeAkriConnectorsMqttConnectionConfiguration(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateProperties( + provisioningState, + aioMetadata, + runtimeConfiguration, + diagnostics, + deviceInboundEndpointTypes, + mqttConnectionConfiguration, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateProperties)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.cs new file mode 100644 index 000000000000..2c4e2fd2274c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateProperties.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplate properties. + public partial class AkriConnectorTemplateProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// The runtime configuration for the Connector template. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Device inbound endpoint types. + /// or is null. + public AkriConnectorTemplateProperties(AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration, IEnumerable deviceInboundEndpointTypes) + { + Argument.AssertNotNull(runtimeConfiguration, nameof(runtimeConfiguration)); + Argument.AssertNotNull(deviceInboundEndpointTypes, nameof(deviceInboundEndpointTypes)); + + RuntimeConfiguration = runtimeConfiguration; + DeviceInboundEndpointTypes = deviceInboundEndpointTypes.ToList(); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// Metadata about AIO. + /// + /// The runtime configuration for the Connector template. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Diagnostics settings for the Connector template. + /// Device inbound endpoint types. + /// Mqtt connection configuration settings. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateProperties(IotOperationsProvisioningState? provisioningState, AkriConnectorTemplateAioMetadata aioMetadata, AkriConnectorTemplateRuntimeConfiguration runtimeConfiguration, AkriConnectorTemplateDiagnostics diagnostics, IList deviceInboundEndpointTypes, AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + AioMetadata = aioMetadata; + RuntimeConfiguration = runtimeConfiguration; + Diagnostics = diagnostics; + DeviceInboundEndpointTypes = deviceInboundEndpointTypes; + MqttConnectionConfiguration = mqttConnectionConfiguration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateProperties() + { + } + + /// The status of the last operation. + public IotOperationsProvisioningState? ProvisioningState { get; } + /// Metadata about AIO. + public AkriConnectorTemplateAioMetadata AioMetadata { get; set; } + /// + /// The runtime configuration for the Connector template. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public AkriConnectorTemplateRuntimeConfiguration RuntimeConfiguration { get; set; } + /// Diagnostics settings for the Connector template. + internal AkriConnectorTemplateDiagnostics Diagnostics { get; set; } + /// The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'. + public string DiagnosticsLevel + { + get => Diagnostics is null ? default : Diagnostics.Level; + set + { + if (Diagnostics is null) + Diagnostics = new AkriConnectorTemplateDiagnostics(); + Diagnostics.Level = value; + } + } + + /// Device inbound endpoint types. + public IList DeviceInboundEndpointTypes { get; } + /// Mqtt connection configuration settings. + public AkriConnectorsMqttConnectionConfiguration MqttConnectionConfiguration { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.Serialization.cs new file mode 100644 index 000000000000..4eec63ab1ada --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AkriConnectorTemplateResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateResourceListResult(document.RootElement, options); + } + + internal static AkriConnectorTemplateResourceListResult DeserializeAkriConnectorTemplateResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorTemplateResourceData.DeserializeAkriConnectorTemplateResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.cs new file mode 100644 index 000000000000..77d148726942 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The response of a AkriConnectorTemplateResource list operation. + internal partial class AkriConnectorTemplateResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AkriConnectorTemplateResource items on this page. + /// is null. + internal AkriConnectorTemplateResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AkriConnectorTemplateResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateResourceListResult() + { + } + + /// The AkriConnectorTemplateResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.Serialization.cs new file mode 100644 index 000000000000..ddaf519183c1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriConnectorTemplateRuntimeConfiguration))] + public partial class AkriConnectorTemplateRuntimeConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("runtimeConfigurationType"u8); + writer.WriteStringValue(RuntimeConfigurationType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateRuntimeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateRuntimeConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateRuntimeConfiguration DeserializeAkriConnectorTemplateRuntimeConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("runtimeConfigurationType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "HelmConfiguration": return AkriConnectorTemplateHelmConfiguration.DeserializeAkriConnectorTemplateHelmConfiguration(element, options); + case "ManagedConfiguration": return AkriConnectorTemplateManagedConfiguration.DeserializeAkriConnectorTemplateManagedConfiguration(element, options); + } + } + return UnknownAkriConnectorTemplateRuntimeConfiguration.DeserializeUnknownAkriConnectorTemplateRuntimeConfiguration(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateRuntimeConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateRuntimeConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.cs new file mode 100644 index 000000000000..22f8839310e8 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfiguration.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriConnectorTemplateRuntimeConfiguration properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class AkriConnectorTemplateRuntimeConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriConnectorTemplateRuntimeConfiguration() + { + } + + /// Initializes a new instance of . + /// Runtime configuration type for the Connector template. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateRuntimeConfiguration(AkriConnectorTemplateRuntimeConfigurationType runtimeConfigurationType, IDictionary serializedAdditionalRawData) + { + RuntimeConfigurationType = runtimeConfigurationType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Runtime configuration type for the Connector template. + internal AkriConnectorTemplateRuntimeConfigurationType RuntimeConfigurationType { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfigurationType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfigurationType.cs new file mode 100644 index 000000000000..a5d411b80bed --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeConfigurationType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Runtime configuration types. + internal readonly partial struct AkriConnectorTemplateRuntimeConfigurationType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorTemplateRuntimeConfigurationType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string HelmConfigurationValue = "HelmConfiguration"; + private const string ManagedConfigurationValue = "ManagedConfiguration"; + + /// Helm Configuration Type. + public static AkriConnectorTemplateRuntimeConfigurationType HelmConfiguration { get; } = new AkriConnectorTemplateRuntimeConfigurationType(HelmConfigurationValue); + /// Managed Configuration Type. + public static AkriConnectorTemplateRuntimeConfigurationType ManagedConfiguration { get; } = new AkriConnectorTemplateRuntimeConfigurationType(ManagedConfigurationValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorTemplateRuntimeConfigurationType left, AkriConnectorTemplateRuntimeConfigurationType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorTemplateRuntimeConfigurationType left, AkriConnectorTemplateRuntimeConfigurationType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorTemplateRuntimeConfigurationType(string value) => new AkriConnectorTemplateRuntimeConfigurationType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorTemplateRuntimeConfigurationType other && Equals(other); + /// + public bool Equals(AkriConnectorTemplateRuntimeConfigurationType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.Serialization.cs new file mode 100644 index 000000000000..69db9ed22f6f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.Serialization.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateRuntimeImageConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("imageConfigurationSettings"u8); + writer.WriteObjectValue(ImageConfigurationSettings, options); + } + + AkriConnectorTemplateRuntimeImageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateRuntimeImageConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateRuntimeImageConfiguration DeserializeAkriConnectorTemplateRuntimeImageConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateRuntimeImageConfigurationSettings imageConfigurationSettings = default; + AkriConnectorTemplateManagedConfigurationType managedConfigurationType = default; + AkriConnectorTemplateAllocation allocation = default; + IList persistentVolumeClaims = default; + IDictionary additionalConfiguration = default; + IList> persistentVolumeClaimTemplates = default; + IList secrets = default; + AkriConnectorTemplateTrustList trustSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageConfigurationSettings"u8)) + { + imageConfigurationSettings = AkriConnectorTemplateRuntimeImageConfigurationSettings.DeserializeAkriConnectorTemplateRuntimeImageConfigurationSettings(property.Value, options); + continue; + } + if (property.NameEquals("managedConfigurationType"u8)) + { + managedConfigurationType = new AkriConnectorTemplateManagedConfigurationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("allocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocation = AkriConnectorTemplateAllocation.DeserializeAkriConnectorTemplateAllocation(property.Value, options); + continue; + } + if (property.NameEquals("persistentVolumeClaims"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorTemplatePersistentVolumeClaim.DeserializeAkriConnectorTemplatePersistentVolumeClaim(item, options)); + } + persistentVolumeClaims = array; + continue; + } + if (property.NameEquals("additionalConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + additionalConfiguration = dictionary; + continue; + } + if (property.NameEquals("persistentVolumeClaimTemplates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in item.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + array.Add(dictionary); + } + } + persistentVolumeClaimTemplates = array; + continue; + } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorsSecret.DeserializeAkriConnectorsSecret(item, options)); + } + secrets = array; + continue; + } + if (property.NameEquals("trustSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustSettings = AkriConnectorTemplateTrustList.DeserializeAkriConnectorTemplateTrustList(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateRuntimeImageConfiguration( + managedConfigurationType, + allocation, + persistentVolumeClaims ?? new ChangeTrackingList(), + additionalConfiguration ?? new ChangeTrackingDictionary(), + persistentVolumeClaimTemplates ?? new ChangeTrackingList>(), + secrets ?? new ChangeTrackingList(), + trustSettings, + serializedAdditionalRawData, + imageConfigurationSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateRuntimeImageConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateRuntimeImageConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.cs new file mode 100644 index 000000000000..ba16c36bb343 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfiguration.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateRuntimeImageConfiguration properties. + public partial class AkriConnectorTemplateRuntimeImageConfiguration : AkriConnectorTemplateManagedConfigurationSettings + { + /// Initializes a new instance of . + /// The image configuration settings. + /// is null. + public AkriConnectorTemplateRuntimeImageConfiguration(AkriConnectorTemplateRuntimeImageConfigurationSettings imageConfigurationSettings) + { + Argument.AssertNotNull(imageConfigurationSettings, nameof(imageConfigurationSettings)); + + ImageConfigurationSettings = imageConfigurationSettings; + ManagedConfigurationType = AkriConnectorTemplateManagedConfigurationType.ImageConfiguration; + } + + /// Initializes a new instance of . + /// The type of the managed configuration. + /// + /// Allocation settings for the managed configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// The persistent volume claims for the managed configuration. + /// Additional configuration for the image of the managed configuration. + /// + /// The persistent volume claim templates for the managed configuration. + /// See https://raw.githubusercontent.com/kubernetes/kubernetes/refs/heads/master/api/openapi-spec/v3/apis__apps__v1_openapi.json. + /// + /// Connector secrets that will be mounted onto all connector instances. + /// Trust list for the connector. This is used to specify the certificates that all connector instances should trust. + /// Keeps track of any properties unknown to the library. + /// The image configuration settings. + internal AkriConnectorTemplateRuntimeImageConfiguration(AkriConnectorTemplateManagedConfigurationType managedConfigurationType, AkriConnectorTemplateAllocation allocation, IList persistentVolumeClaims, IDictionary additionalConfiguration, IList> persistentVolumeClaimTemplates, IList secrets, AkriConnectorTemplateTrustList trustSettings, IDictionary serializedAdditionalRawData, AkriConnectorTemplateRuntimeImageConfigurationSettings imageConfigurationSettings) : base(managedConfigurationType, allocation, persistentVolumeClaims, additionalConfiguration, persistentVolumeClaimTemplates, secrets, trustSettings, serializedAdditionalRawData) + { + ImageConfigurationSettings = imageConfigurationSettings; + ManagedConfigurationType = managedConfigurationType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateRuntimeImageConfiguration() + { + } + + /// The image configuration settings. + public AkriConnectorTemplateRuntimeImageConfigurationSettings ImageConfigurationSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.Serialization.cs new file mode 100644 index 000000000000..ab5c4aac5bf3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateRuntimeImageConfigurationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfigurationSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("imageName"u8); + writer.WriteStringValue(ImageName); + if (Optional.IsDefined(ImagePullPolicy)) + { + writer.WritePropertyName("imagePullPolicy"u8); + writer.WriteStringValue(ImagePullPolicy.Value.ToString()); + } + if (Optional.IsDefined(Replicas)) + { + writer.WritePropertyName("replicas"u8); + writer.WriteNumberValue(Replicas.Value); + } + if (Optional.IsDefined(RegistrySettings)) + { + writer.WritePropertyName("registrySettings"u8); + writer.WriteObjectValue(RegistrySettings, options); + } + if (Optional.IsDefined(TagDigestSettings)) + { + writer.WritePropertyName("tagDigestSettings"u8); + writer.WriteObjectValue(TagDigestSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateRuntimeImageConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfigurationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateRuntimeImageConfigurationSettings(document.RootElement, options); + } + + internal static AkriConnectorTemplateRuntimeImageConfigurationSettings DeserializeAkriConnectorTemplateRuntimeImageConfigurationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string imageName = default; + AkriConnectorsImagePullPolicy? imagePullPolicy = default; + int? replicas = default; + AkriConnectorsRegistrySettings registrySettings = default; + AkriConnectorsTagDigestSettings tagDigestSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageName"u8)) + { + imageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("imagePullPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imagePullPolicy = new AkriConnectorsImagePullPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("replicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("registrySettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + registrySettings = AkriConnectorsRegistrySettings.DeserializeAkriConnectorsRegistrySettings(property.Value, options); + continue; + } + if (property.NameEquals("tagDigestSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tagDigestSettings = AkriConnectorsTagDigestSettings.DeserializeAkriConnectorsTagDigestSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateRuntimeImageConfigurationSettings( + imageName, + imagePullPolicy, + replicas, + registrySettings, + tagDigestSettings, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfigurationSettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateRuntimeImageConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateRuntimeImageConfigurationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeImageConfigurationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.cs new file mode 100644 index 000000000000..70fbce9a5ff5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeImageConfigurationSettings.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateRuntimeImageConfiguration properties. + public partial class AkriConnectorTemplateRuntimeImageConfigurationSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The image name without any registry reference, tag or digest. + /// is null. + public AkriConnectorTemplateRuntimeImageConfigurationSettings(string imageName) + { + Argument.AssertNotNull(imageName, nameof(imageName)); + + ImageName = imageName; + } + + /// Initializes a new instance of . + /// The image name without any registry reference, tag or digest. + /// The pull policy of the image. + /// The number of replicas to be set up. + /// + /// The registry settings for the image. You can omit this field if using the default docker hub repository or using a local image. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// Optional image tag or digest. If not specified, the default tag is `latest`. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateRuntimeImageConfigurationSettings(string imageName, AkriConnectorsImagePullPolicy? imagePullPolicy, int? replicas, AkriConnectorsRegistrySettings registrySettings, AkriConnectorsTagDigestSettings tagDigestSettings, IDictionary serializedAdditionalRawData) + { + ImageName = imageName; + ImagePullPolicy = imagePullPolicy; + Replicas = replicas; + RegistrySettings = registrySettings; + TagDigestSettings = tagDigestSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateRuntimeImageConfigurationSettings() + { + } + + /// The image name without any registry reference, tag or digest. + public string ImageName { get; set; } + /// The pull policy of the image. + public AkriConnectorsImagePullPolicy? ImagePullPolicy { get; set; } + /// The number of replicas to be set up. + public int? Replicas { get; set; } + /// + /// The registry settings for the image. You can omit this field if using the default docker hub repository or using a local image. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public AkriConnectorsRegistrySettings RegistrySettings { get; set; } + /// + /// Optional image tag or digest. If not specified, the default tag is `latest`. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public AkriConnectorsTagDigestSettings TagDigestSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.Serialization.cs new file mode 100644 index 000000000000..da62316a4f76 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.Serialization.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorTemplateRuntimeStatefulSetConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeStatefulSetConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("statefulSetConfigurationSettings"u8); + writer.WriteStartObject(); + foreach (var item in StatefulSetConfigurationSettings) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + writer.WriteEndObject(); + } + + AkriConnectorTemplateRuntimeStatefulSetConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeStatefulSetConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateRuntimeStatefulSetConfiguration(document.RootElement, options); + } + + internal static AkriConnectorTemplateRuntimeStatefulSetConfiguration DeserializeAkriConnectorTemplateRuntimeStatefulSetConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary statefulSetConfigurationSettings = default; + AkriConnectorTemplateManagedConfigurationType managedConfigurationType = default; + AkriConnectorTemplateAllocation allocation = default; + IList persistentVolumeClaims = default; + IDictionary additionalConfiguration = default; + IList> persistentVolumeClaimTemplates = default; + IList secrets = default; + AkriConnectorTemplateTrustList trustSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("statefulSetConfigurationSettings"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + statefulSetConfigurationSettings = dictionary; + continue; + } + if (property.NameEquals("managedConfigurationType"u8)) + { + managedConfigurationType = new AkriConnectorTemplateManagedConfigurationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("allocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocation = AkriConnectorTemplateAllocation.DeserializeAkriConnectorTemplateAllocation(property.Value, options); + continue; + } + if (property.NameEquals("persistentVolumeClaims"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorTemplatePersistentVolumeClaim.DeserializeAkriConnectorTemplatePersistentVolumeClaim(item, options)); + } + persistentVolumeClaims = array; + continue; + } + if (property.NameEquals("additionalConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + additionalConfiguration = dictionary; + continue; + } + if (property.NameEquals("persistentVolumeClaimTemplates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in item.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + array.Add(dictionary); + } + } + persistentVolumeClaimTemplates = array; + continue; + } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorsSecret.DeserializeAkriConnectorsSecret(item, options)); + } + secrets = array; + continue; + } + if (property.NameEquals("trustSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustSettings = AkriConnectorTemplateTrustList.DeserializeAkriConnectorTemplateTrustList(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateRuntimeStatefulSetConfiguration( + managedConfigurationType, + allocation, + persistentVolumeClaims ?? new ChangeTrackingList(), + additionalConfiguration ?? new ChangeTrackingDictionary(), + persistentVolumeClaimTemplates ?? new ChangeTrackingList>(), + secrets ?? new ChangeTrackingList(), + trustSettings, + serializedAdditionalRawData, + statefulSetConfigurationSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeStatefulSetConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateRuntimeStatefulSetConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateRuntimeStatefulSetConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeStatefulSetConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.cs new file mode 100644 index 000000000000..20f3f5cb6165 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateRuntimeStatefulSetConfiguration.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateRuntimeStatefulSetConfiguration properties. + public partial class AkriConnectorTemplateRuntimeStatefulSetConfiguration : AkriConnectorTemplateManagedConfigurationSettings + { + /// Initializes a new instance of . + /// The stateful set configuration settings. + /// is null. + public AkriConnectorTemplateRuntimeStatefulSetConfiguration(IDictionary statefulSetConfigurationSettings) + { + Argument.AssertNotNull(statefulSetConfigurationSettings, nameof(statefulSetConfigurationSettings)); + + StatefulSetConfigurationSettings = statefulSetConfigurationSettings; + ManagedConfigurationType = AkriConnectorTemplateManagedConfigurationType.StatefulSetConfiguration; + } + + /// Initializes a new instance of . + /// The type of the managed configuration. + /// + /// Allocation settings for the managed configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// The persistent volume claims for the managed configuration. + /// Additional configuration for the image of the managed configuration. + /// + /// The persistent volume claim templates for the managed configuration. + /// See https://raw.githubusercontent.com/kubernetes/kubernetes/refs/heads/master/api/openapi-spec/v3/apis__apps__v1_openapi.json. + /// + /// Connector secrets that will be mounted onto all connector instances. + /// Trust list for the connector. This is used to specify the certificates that all connector instances should trust. + /// Keeps track of any properties unknown to the library. + /// The stateful set configuration settings. + internal AkriConnectorTemplateRuntimeStatefulSetConfiguration(AkriConnectorTemplateManagedConfigurationType managedConfigurationType, AkriConnectorTemplateAllocation allocation, IList persistentVolumeClaims, IDictionary additionalConfiguration, IList> persistentVolumeClaimTemplates, IList secrets, AkriConnectorTemplateTrustList trustSettings, IDictionary serializedAdditionalRawData, IDictionary statefulSetConfigurationSettings) : base(managedConfigurationType, allocation, persistentVolumeClaims, additionalConfiguration, persistentVolumeClaimTemplates, secrets, trustSettings, serializedAdditionalRawData) + { + StatefulSetConfigurationSettings = statefulSetConfigurationSettings; + ManagedConfigurationType = managedConfigurationType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateRuntimeStatefulSetConfiguration() + { + } + + /// + /// The stateful set configuration settings. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public IDictionary StatefulSetConfigurationSettings { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.Serialization.cs new file mode 100644 index 000000000000..bc5c4d6c6f82 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AkriConnectorTemplateTrustList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateTrustList)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trustListSecretRef"u8); + writer.WriteStringValue(TrustListSecretRef); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorTemplateTrustList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateTrustList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateTrustList(document.RootElement, options); + } + + internal static AkriConnectorTemplateTrustList DeserializeAkriConnectorTemplateTrustList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string trustListSecretRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trustListSecretRef"u8)) + { + trustListSecretRef = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorTemplateTrustList(trustListSecretRef, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateTrustList)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateTrustList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateTrustList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateTrustList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.cs new file mode 100644 index 000000000000..691bbf8f1841 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorTemplateTrustList.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorTemplateTrustList properties. + internal partial class AkriConnectorTemplateTrustList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The secret reference for certificates to trust. + /// is null. + public AkriConnectorTemplateTrustList(string trustListSecretRef) + { + Argument.AssertNotNull(trustListSecretRef, nameof(trustListSecretRef)); + + TrustListSecretRef = trustListSecretRef; + } + + /// Initializes a new instance of . + /// The secret reference for certificates to trust. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorTemplateTrustList(string trustListSecretRef, IDictionary serializedAdditionalRawData) + { + TrustListSecretRef = trustListSecretRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorTemplateTrustList() + { + } + + /// The secret reference for certificates to trust. + public string TrustListSecretRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.Serialization.cs new file mode 100644 index 000000000000..217ec40b3583 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsContainerRegistry : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistry)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("containerRegistrySettings"u8); + writer.WriteObjectValue(ContainerRegistrySettings, options); + } + + AkriConnectorsContainerRegistry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistry)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsContainerRegistry(document.RootElement, options); + } + + internal static AkriConnectorsContainerRegistry DeserializeAkriConnectorsContainerRegistry(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorsContainerRegistrySettings containerRegistrySettings = default; + AkriConnectorsRegistrySettingsType registrySettingsType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("containerRegistrySettings"u8)) + { + containerRegistrySettings = AkriConnectorsContainerRegistrySettings.DeserializeAkriConnectorsContainerRegistrySettings(property.Value, options); + continue; + } + if (property.NameEquals("registrySettingsType"u8)) + { + registrySettingsType = new AkriConnectorsRegistrySettingsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsContainerRegistry(registrySettingsType, serializedAdditionalRawData, containerRegistrySettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistry)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsContainerRegistry IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsContainerRegistry(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistry)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.cs new file mode 100644 index 000000000000..4befa742e906 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistry.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsContainerRegistry properties. + public partial class AkriConnectorsContainerRegistry : AkriConnectorsRegistrySettings + { + /// Initializes a new instance of . + /// The registry settings for the container registry. + /// is null. + public AkriConnectorsContainerRegistry(AkriConnectorsContainerRegistrySettings containerRegistrySettings) + { + Argument.AssertNotNull(containerRegistrySettings, nameof(containerRegistrySettings)); + + ContainerRegistrySettings = containerRegistrySettings; + RegistrySettingsType = AkriConnectorsRegistrySettingsType.ContainerRegistry; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The registry settings for the container registry. + internal AkriConnectorsContainerRegistry(AkriConnectorsRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData, AkriConnectorsContainerRegistrySettings containerRegistrySettings) : base(registrySettingsType, serializedAdditionalRawData) + { + ContainerRegistrySettings = containerRegistrySettings; + RegistrySettingsType = registrySettingsType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsContainerRegistry() + { + } + + /// The registry settings for the container registry. + public AkriConnectorsContainerRegistrySettings ContainerRegistrySettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.Serialization.cs new file mode 100644 index 000000000000..df8dc87be540 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsContainerRegistrySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistrySettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("registry"u8); + writer.WriteStringValue(Registry); + if (Optional.IsCollectionDefined(ImagePullSecrets)) + { + writer.WritePropertyName("imagePullSecrets"u8); + writer.WriteStartArray(); + foreach (var item in ImagePullSecrets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsContainerRegistrySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistrySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsContainerRegistrySettings(document.RootElement, options); + } + + internal static AkriConnectorsContainerRegistrySettings DeserializeAkriConnectorsContainerRegistrySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string registry = default; + IList imagePullSecrets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registry"u8)) + { + registry = property.Value.GetString(); + continue; + } + if (property.NameEquals("imagePullSecrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorsImagePullSecret.DeserializeAkriConnectorsImagePullSecret(item, options)); + } + imagePullSecrets = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsContainerRegistrySettings(registry, imagePullSecrets ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistrySettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsContainerRegistrySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsContainerRegistrySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsContainerRegistrySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.cs new file mode 100644 index 000000000000..ec8750125ff1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsContainerRegistrySettings.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsContainerRegistry properties. + public partial class AkriConnectorsContainerRegistrySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The container registry to use for the artifact. + /// is null. + public AkriConnectorsContainerRegistrySettings(string registry) + { + Argument.AssertNotNull(registry, nameof(registry)); + + Registry = registry; + ImagePullSecrets = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The container registry to use for the artifact. + /// Optional list of references to secrets in the same namespace to use for pulling the connector image. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsContainerRegistrySettings(string registry, IList imagePullSecrets, IDictionary serializedAdditionalRawData) + { + Registry = registry; + ImagePullSecrets = imagePullSecrets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsContainerRegistrySettings() + { + } + + /// The container registry to use for the artifact. + public string Registry { get; set; } + /// Optional list of references to secrets in the same namespace to use for pulling the connector image. + public IList ImagePullSecrets { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.Serialization.cs new file mode 100644 index 000000000000..e851a839dc39 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsDigest : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsDigest)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("digest"u8); + writer.WriteStringValue(Digest); + } + + AkriConnectorsDigest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsDigest)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsDigest(document.RootElement, options); + } + + internal static AkriConnectorsDigest DeserializeAkriConnectorsDigest(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string digest = default; + AkriConnectorsTagDigestType tagDigestType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("digest"u8)) + { + digest = property.Value.GetString(); + continue; + } + if (property.NameEquals("tagDigestType"u8)) + { + tagDigestType = new AkriConnectorsTagDigestType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsDigest(tagDigestType, serializedAdditionalRawData, digest); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsDigest)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsDigest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsDigest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsDigest)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.cs new file mode 100644 index 000000000000..40a770c4730d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsDigest.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsDigest properties. + public partial class AkriConnectorsDigest : AkriConnectorsTagDigestSettings + { + /// Initializes a new instance of . + /// The digest of the image. + /// is null. + public AkriConnectorsDigest(string digest) + { + Argument.AssertNotNull(digest, nameof(digest)); + + Digest = digest; + TagDigestType = AkriConnectorsTagDigestType.Digest; + } + + /// Initializes a new instance of . + /// The tag or digest type. + /// Keeps track of any properties unknown to the library. + /// The digest of the image. + internal AkriConnectorsDigest(AkriConnectorsTagDigestType tagDigestType, IDictionary serializedAdditionalRawData, string digest) : base(tagDigestType, serializedAdditionalRawData) + { + Digest = digest; + TagDigestType = tagDigestType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsDigest() + { + } + + /// The digest of the image. + public string Digest { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullPolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullPolicy.cs new file mode 100644 index 000000000000..ab0596edc9c4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullPolicy.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Image pull policy. + public readonly partial struct AkriConnectorsImagePullPolicy : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorsImagePullPolicy(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AlwaysValue = "Always"; + private const string IfNotPresentValue = "IfNotPresent"; + private const string NeverValue = "Never"; + + /// Always pull the image. + public static AkriConnectorsImagePullPolicy Always { get; } = new AkriConnectorsImagePullPolicy(AlwaysValue); + /// IfNotPresent pull the image. + public static AkriConnectorsImagePullPolicy IfNotPresent { get; } = new AkriConnectorsImagePullPolicy(IfNotPresentValue); + /// Never pull the image. + public static AkriConnectorsImagePullPolicy Never { get; } = new AkriConnectorsImagePullPolicy(NeverValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorsImagePullPolicy left, AkriConnectorsImagePullPolicy right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorsImagePullPolicy left, AkriConnectorsImagePullPolicy right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorsImagePullPolicy(string value) => new AkriConnectorsImagePullPolicy(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorsImagePullPolicy other && Equals(other); + /// + public bool Equals(AkriConnectorsImagePullPolicy other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.Serialization.cs new file mode 100644 index 000000000000..184c03ff494f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsImagePullSecret : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsImagePullSecret)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("secretRef"u8); + writer.WriteStringValue(SecretRef); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsImagePullSecret IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsImagePullSecret)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsImagePullSecret(document.RootElement, options); + } + + internal static AkriConnectorsImagePullSecret DeserializeAkriConnectorsImagePullSecret(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretRef"u8)) + { + secretRef = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsImagePullSecret(secretRef, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsImagePullSecret)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsImagePullSecret IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsImagePullSecret(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsImagePullSecret)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.cs new file mode 100644 index 000000000000..99e1ffa74661 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsImagePullSecret.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsImagePullSecret properties. + public partial class AkriConnectorsImagePullSecret + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the image pull secret. + /// is null. + public AkriConnectorsImagePullSecret(string secretRef) + { + Argument.AssertNotNull(secretRef, nameof(secretRef)); + + SecretRef = secretRef; + } + + /// Initializes a new instance of . + /// The name of the image pull secret. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsImagePullSecret(string secretRef, IDictionary serializedAdditionalRawData) + { + SecretRef = secretRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsImagePullSecret() + { + } + + /// The name of the image pull secret. + public string SecretRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.Serialization.cs new file mode 100644 index 000000000000..e6b98f502e43 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriConnectorsMqttAuthentication))] + public partial class AkriConnectorsMqttAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("method"u8); + writer.WriteStringValue(Method.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsMqttAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsMqttAuthentication(document.RootElement, options); + } + + internal static AkriConnectorsMqttAuthentication DeserializeAkriConnectorsMqttAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("method", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ServiceAccountToken": return AkriConnectorsServiceAccountAuthentication.DeserializeAkriConnectorsServiceAccountAuthentication(element, options); + } + } + return UnknownAkriConnectorsMqttAuthentication.DeserializeUnknownAkriConnectorsMqttAuthentication(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsMqttAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsMqttAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.cs new file mode 100644 index 000000000000..0c65b5752061 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthentication.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriConnectorsMqttAuthentication properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class AkriConnectorsMqttAuthentication + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriConnectorsMqttAuthentication() + { + } + + /// Initializes a new instance of . + /// The authentication method for the MQTT connection. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsMqttAuthentication(AkriConnectorsMqttAuthenticationMethod method, IDictionary serializedAdditionalRawData) + { + Method = method; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The authentication method for the MQTT connection. + internal AkriConnectorsMqttAuthenticationMethod Method { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthenticationMethod.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthenticationMethod.cs new file mode 100644 index 000000000000..aab98d6a7240 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttAuthenticationMethod.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsMqttAuthenticationMethod properties. + internal readonly partial struct AkriConnectorsMqttAuthenticationMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorsMqttAuthenticationMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceAccountTokenValue = "ServiceAccountToken"; + + /// Service Account Token authentication. + public static AkriConnectorsMqttAuthenticationMethod ServiceAccountToken { get; } = new AkriConnectorsMqttAuthenticationMethod(ServiceAccountTokenValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorsMqttAuthenticationMethod left, AkriConnectorsMqttAuthenticationMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorsMqttAuthenticationMethod left, AkriConnectorsMqttAuthenticationMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorsMqttAuthenticationMethod(string value) => new AkriConnectorsMqttAuthenticationMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorsMqttAuthenticationMethod other && Equals(other); + /// + public bool Equals(AkriConnectorsMqttAuthenticationMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.Serialization.cs new file mode 100644 index 000000000000..24bd5551600c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.Serialization.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsMqttConnectionConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsMqttConnectionConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Authentication)) + { + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication, options); + } + if (Optional.IsDefined(Host)) + { + writer.WritePropertyName("host"u8); + writer.WriteStringValue(Host); + } + if (Optional.IsDefined(Protocol)) + { + writer.WritePropertyName("protocol"u8); + writer.WriteStringValue(Protocol.Value.ToString()); + } + if (Optional.IsDefined(KeepAliveSeconds)) + { + writer.WritePropertyName("keepAliveSeconds"u8); + writer.WriteNumberValue(KeepAliveSeconds.Value); + } + if (Optional.IsDefined(MaxInflightMessages)) + { + writer.WritePropertyName("maxInflightMessages"u8); + writer.WriteNumberValue(MaxInflightMessages.Value); + } + if (Optional.IsDefined(SessionExpirySeconds)) + { + writer.WritePropertyName("sessionExpirySeconds"u8); + writer.WriteNumberValue(SessionExpirySeconds.Value); + } + if (Optional.IsDefined(Tls)) + { + writer.WritePropertyName("tls"u8); + writer.WriteObjectValue(Tls, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsMqttConnectionConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsMqttConnectionConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsMqttConnectionConfiguration(document.RootElement, options); + } + + internal static AkriConnectorsMqttConnectionConfiguration DeserializeAkriConnectorsMqttConnectionConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorsMqttAuthentication authentication = default; + string host = default; + AkriConnectorsMqttProtocolType? protocol = default; + int? keepAliveSeconds = default; + int? maxInflightMessages = default; + int? sessionExpirySeconds = default; + IotOperationsTlsProperties tls = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("authentication"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + authentication = AkriConnectorsMqttAuthentication.DeserializeAkriConnectorsMqttAuthentication(property.Value, options); + continue; + } + if (property.NameEquals("host"u8)) + { + host = property.Value.GetString(); + continue; + } + if (property.NameEquals("protocol"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + protocol = new AkriConnectorsMqttProtocolType(property.Value.GetString()); + continue; + } + if (property.NameEquals("keepAliveSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + keepAliveSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("maxInflightMessages"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + maxInflightMessages = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("sessionExpirySeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sessionExpirySeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("tls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tls = IotOperationsTlsProperties.DeserializeIotOperationsTlsProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsMqttConnectionConfiguration( + authentication, + host, + protocol, + keepAliveSeconds, + maxInflightMessages, + sessionExpirySeconds, + tls, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsMqttConnectionConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsMqttConnectionConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsMqttConnectionConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsMqttConnectionConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.cs new file mode 100644 index 000000000000..da5a56eb02f9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttConnectionConfiguration.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsMqttConnectionConfiguration properties. + public partial class AkriConnectorsMqttConnectionConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriConnectorsMqttConnectionConfiguration() + { + } + + /// Initializes a new instance of . + /// + /// Authentication properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Host of the Broker in the form of <hostname>:<port>. + /// The protocol to use for the connection. Currently only `mqtt` is supported. + /// KeepAlive for connection in seconds. + /// The max number of messages to keep in flight. For subscribe, this is the receive maximum. For publish, this is the maximum number of messages to send before waiting for an ack. + /// Session expiry in seconds. + /// TLS configuration. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsMqttConnectionConfiguration(AkriConnectorsMqttAuthentication authentication, string host, AkriConnectorsMqttProtocolType? protocol, int? keepAliveSeconds, int? maxInflightMessages, int? sessionExpirySeconds, IotOperationsTlsProperties tls, IDictionary serializedAdditionalRawData) + { + Authentication = authentication; + Host = host; + Protocol = protocol; + KeepAliveSeconds = keepAliveSeconds; + MaxInflightMessages = maxInflightMessages; + SessionExpirySeconds = sessionExpirySeconds; + Tls = tls; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// + /// Authentication properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public AkriConnectorsMqttAuthentication Authentication { get; set; } + /// Host of the Broker in the form of <hostname>:<port>. + public string Host { get; set; } + /// The protocol to use for the connection. Currently only `mqtt` is supported. + public AkriConnectorsMqttProtocolType? Protocol { get; set; } + /// KeepAlive for connection in seconds. + public int? KeepAliveSeconds { get; set; } + /// The max number of messages to keep in flight. For subscribe, this is the receive maximum. For publish, this is the maximum number of messages to send before waiting for an ack. + public int? MaxInflightMessages { get; set; } + /// Session expiry in seconds. + public int? SessionExpirySeconds { get; set; } + /// TLS configuration. + public IotOperationsTlsProperties Tls { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttProtocolType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttProtocolType.cs new file mode 100644 index 000000000000..58fbeb800b97 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsMqttProtocolType.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Mqtt protocol types. + public readonly partial struct AkriConnectorsMqttProtocolType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorsMqttProtocolType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MqttValue = "Mqtt"; + + /// Mqtt protocol. + public static AkriConnectorsMqttProtocolType Mqtt { get; } = new AkriConnectorsMqttProtocolType(MqttValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorsMqttProtocolType left, AkriConnectorsMqttProtocolType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorsMqttProtocolType left, AkriConnectorsMqttProtocolType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorsMqttProtocolType(string value) => new AkriConnectorsMqttProtocolType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorsMqttProtocolType other && Equals(other); + /// + public bool Equals(AkriConnectorsMqttProtocolType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.Serialization.cs new file mode 100644 index 000000000000..f0a15ddf7ad1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsRegistryEndpointRef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsRegistryEndpointRef)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("registryEndpointRef"u8); + writer.WriteStringValue(RegistryEndpointRef); + } + + AkriConnectorsRegistryEndpointRef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsRegistryEndpointRef)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsRegistryEndpointRef(document.RootElement, options); + } + + internal static AkriConnectorsRegistryEndpointRef DeserializeAkriConnectorsRegistryEndpointRef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string registryEndpointRef = default; + AkriConnectorsRegistrySettingsType registrySettingsType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registryEndpointRef"u8)) + { + registryEndpointRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("registrySettingsType"u8)) + { + registrySettingsType = new AkriConnectorsRegistrySettingsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsRegistryEndpointRef(registrySettingsType, serializedAdditionalRawData, registryEndpointRef); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsRegistryEndpointRef)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsRegistryEndpointRef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsRegistryEndpointRef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsRegistryEndpointRef)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.cs new file mode 100644 index 000000000000..93cc97cef86c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistryEndpointRef.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsRegistryEndpointRef properties. + public partial class AkriConnectorsRegistryEndpointRef : AkriConnectorsRegistrySettings + { + /// Initializes a new instance of . + /// The name of the registry endpoint. + /// is null. + public AkriConnectorsRegistryEndpointRef(string registryEndpointRef) + { + Argument.AssertNotNull(registryEndpointRef, nameof(registryEndpointRef)); + + RegistryEndpointRef = registryEndpointRef; + RegistrySettingsType = AkriConnectorsRegistrySettingsType.RegistryEndpointRef; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + /// The name of the registry endpoint. + internal AkriConnectorsRegistryEndpointRef(AkriConnectorsRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData, string registryEndpointRef) : base(registrySettingsType, serializedAdditionalRawData) + { + RegistryEndpointRef = registryEndpointRef; + RegistrySettingsType = registrySettingsType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsRegistryEndpointRef() + { + } + + /// The name of the registry endpoint. + public string RegistryEndpointRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.Serialization.cs new file mode 100644 index 000000000000..e2d74b4869aa --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriConnectorsRegistrySettings))] + public partial class AkriConnectorsRegistrySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("registrySettingsType"u8); + writer.WriteStringValue(RegistrySettingsType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsRegistrySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsRegistrySettings(document.RootElement, options); + } + + internal static AkriConnectorsRegistrySettings DeserializeAkriConnectorsRegistrySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("registrySettingsType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ContainerRegistry": return AkriConnectorsContainerRegistry.DeserializeAkriConnectorsContainerRegistry(element, options); + case "RegistryEndpointRef": return AkriConnectorsRegistryEndpointRef.DeserializeAkriConnectorsRegistryEndpointRef(element, options); + } + } + return UnknownAkriConnectorsRegistrySettings.DeserializeUnknownAkriConnectorsRegistrySettings(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsRegistrySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsRegistrySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.cs new file mode 100644 index 000000000000..b61abff30ea0 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriConnectorsRegistrySettings properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class AkriConnectorsRegistrySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriConnectorsRegistrySettings() + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsRegistrySettings(AkriConnectorsRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData) + { + RegistrySettingsType = registrySettingsType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets or sets the registry settings type. + internal AkriConnectorsRegistrySettingsType RegistrySettingsType { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettingsType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettingsType.cs new file mode 100644 index 000000000000..9524395fbb5c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsRegistrySettingsType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsRegistrySettings properties. + internal readonly partial struct AkriConnectorsRegistrySettingsType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorsRegistrySettingsType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string RegistryEndpointRefValue = "RegistryEndpointRef"; + private const string ContainerRegistryValue = "ContainerRegistry"; + + /// A Registry Endpoint reference. + public static AkriConnectorsRegistrySettingsType RegistryEndpointRef { get; } = new AkriConnectorsRegistrySettingsType(RegistryEndpointRefValue); + /// A Container Registry reference. + public static AkriConnectorsRegistrySettingsType ContainerRegistry { get; } = new AkriConnectorsRegistrySettingsType(ContainerRegistryValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorsRegistrySettingsType left, AkriConnectorsRegistrySettingsType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorsRegistrySettingsType left, AkriConnectorsRegistrySettingsType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorsRegistrySettingsType(string value) => new AkriConnectorsRegistrySettingsType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorsRegistrySettingsType other && Equals(other); + /// + public bool Equals(AkriConnectorsRegistrySettingsType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.Serialization.cs new file mode 100644 index 000000000000..3cbc7586516d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.Serialization.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsSecret : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsSecret)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("secretKey"u8); + writer.WriteStringValue(SecretKey); + writer.WritePropertyName("secretAlias"u8); + writer.WriteStringValue(SecretAlias); + writer.WritePropertyName("secretRef"u8); + writer.WriteStringValue(SecretRef); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsSecret IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsSecret)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsSecret(document.RootElement, options); + } + + internal static AkriConnectorsSecret DeserializeAkriConnectorsSecret(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretKey = default; + string secretAlias = default; + string secretRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretKey"u8)) + { + secretKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretAlias"u8)) + { + secretAlias = property.Value.GetString(); + continue; + } + if (property.NameEquals("secretRef"u8)) + { + secretRef = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsSecret(secretKey, secretAlias, secretRef, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsSecret)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsSecret IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsSecret(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsSecret)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.cs new file mode 100644 index 000000000000..38b46448f851 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsSecret.cs @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsSecret properties. + public partial class AkriConnectorsSecret + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The key in the secret to be mounted. + /// The application-defined alias for the secret. + /// The name of the secret to be mounted. + /// , or is null. + public AkriConnectorsSecret(string secretKey, string secretAlias, string secretRef) + { + Argument.AssertNotNull(secretKey, nameof(secretKey)); + Argument.AssertNotNull(secretAlias, nameof(secretAlias)); + Argument.AssertNotNull(secretRef, nameof(secretRef)); + + SecretKey = secretKey; + SecretAlias = secretAlias; + SecretRef = secretRef; + } + + /// Initializes a new instance of . + /// The key in the secret to be mounted. + /// The application-defined alias for the secret. + /// The name of the secret to be mounted. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsSecret(string secretKey, string secretAlias, string secretRef, IDictionary serializedAdditionalRawData) + { + SecretKey = secretKey; + SecretAlias = secretAlias; + SecretRef = secretRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsSecret() + { + } + + /// The key in the secret to be mounted. + public string SecretKey { get; set; } + /// The application-defined alias for the secret. + public string SecretAlias { get; set; } + /// The name of the secret to be mounted. + public string SecretRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.Serialization.cs new file mode 100644 index 000000000000..d419078560db --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsServiceAccountAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("serviceAccountTokenSettings"u8); + writer.WriteObjectValue(ServiceAccountTokenSettings, options); + } + + AkriConnectorsServiceAccountAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsServiceAccountAuthentication(document.RootElement, options); + } + + internal static AkriConnectorsServiceAccountAuthentication DeserializeAkriConnectorsServiceAccountAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorsServiceAccountTokenSettings serviceAccountTokenSettings = default; + AkriConnectorsMqttAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceAccountTokenSettings"u8)) + { + serviceAccountTokenSettings = AkriConnectorsServiceAccountTokenSettings.DeserializeAkriConnectorsServiceAccountTokenSettings(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new AkriConnectorsMqttAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsServiceAccountAuthentication(method, serializedAdditionalRawData, serviceAccountTokenSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountAuthentication)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsServiceAccountAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsServiceAccountAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.cs new file mode 100644 index 000000000000..99a16d2577b6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountAuthentication.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsServiceAccountAuthentication properties. + public partial class AkriConnectorsServiceAccountAuthentication : AkriConnectorsMqttAuthentication + { + /// Initializes a new instance of . + /// The service account token for the MQTT connection. + /// is null. + public AkriConnectorsServiceAccountAuthentication(AkriConnectorsServiceAccountTokenSettings serviceAccountTokenSettings) + { + Argument.AssertNotNull(serviceAccountTokenSettings, nameof(serviceAccountTokenSettings)); + + ServiceAccountTokenSettings = serviceAccountTokenSettings; + Method = AkriConnectorsMqttAuthenticationMethod.ServiceAccountToken; + } + + /// Initializes a new instance of . + /// The authentication method for the MQTT connection. + /// Keeps track of any properties unknown to the library. + /// The service account token for the MQTT connection. + internal AkriConnectorsServiceAccountAuthentication(AkriConnectorsMqttAuthenticationMethod method, IDictionary serializedAdditionalRawData, AkriConnectorsServiceAccountTokenSettings serviceAccountTokenSettings) : base(method, serializedAdditionalRawData) + { + ServiceAccountTokenSettings = serviceAccountTokenSettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsServiceAccountAuthentication() + { + } + + /// The service account token for the MQTT connection. + internal AkriConnectorsServiceAccountTokenSettings ServiceAccountTokenSettings { get; set; } + /// The audience for the service account token. + public string ServiceAccountTokenAudience + { + get => ServiceAccountTokenSettings is null ? default : ServiceAccountTokenSettings.Audience; + set => ServiceAccountTokenSettings = new AkriConnectorsServiceAccountTokenSettings(value); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.Serialization.cs new file mode 100644 index 000000000000..4581f6e8d805 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsServiceAccountTokenSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountTokenSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("audience"u8); + writer.WriteStringValue(Audience); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsServiceAccountTokenSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountTokenSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsServiceAccountTokenSettings(document.RootElement, options); + } + + internal static AkriConnectorsServiceAccountTokenSettings DeserializeAkriConnectorsServiceAccountTokenSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string audience = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("audience"u8)) + { + audience = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsServiceAccountTokenSettings(audience, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountTokenSettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsServiceAccountTokenSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsServiceAccountTokenSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsServiceAccountTokenSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.cs new file mode 100644 index 000000000000..ee9cce0632d4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsServiceAccountTokenSettings.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsServiceAccountTokenSettings properties. + public partial class AkriConnectorsServiceAccountTokenSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The audience for the service account token. + /// is null. + public AkriConnectorsServiceAccountTokenSettings(string audience) + { + Argument.AssertNotNull(audience, nameof(audience)); + + Audience = audience; + } + + /// Initializes a new instance of . + /// The audience for the service account token. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsServiceAccountTokenSettings(string audience, IDictionary serializedAdditionalRawData) + { + Audience = audience; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsServiceAccountTokenSettings() + { + } + + /// The audience for the service account token. + public string Audience { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.Serialization.cs new file mode 100644 index 000000000000..bba19c5a7982 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriConnectorsTag : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsTag)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("tag"u8); + writer.WriteStringValue(Tag); + } + + AkriConnectorsTag IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsTag)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsTag(document.RootElement, options); + } + + internal static AkriConnectorsTag DeserializeAkriConnectorsTag(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string tag = default; + AkriConnectorsTagDigestType tagDigestType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tag"u8)) + { + tag = property.Value.GetString(); + continue; + } + if (property.NameEquals("tagDigestType"u8)) + { + tagDigestType = new AkriConnectorsTagDigestType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriConnectorsTag(tagDigestType, serializedAdditionalRawData, tag); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsTag)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsTag IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsTag(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsTag)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.cs new file mode 100644 index 000000000000..483a62029e64 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTag.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsTag properties. + public partial class AkriConnectorsTag : AkriConnectorsTagDigestSettings + { + /// Initializes a new instance of . + /// The tag of the image. + /// is null. + public AkriConnectorsTag(string tag) + { + Argument.AssertNotNull(tag, nameof(tag)); + + Tag = tag; + TagDigestType = AkriConnectorsTagDigestType.Tag; + } + + /// Initializes a new instance of . + /// The tag or digest type. + /// Keeps track of any properties unknown to the library. + /// The tag of the image. + internal AkriConnectorsTag(AkriConnectorsTagDigestType tagDigestType, IDictionary serializedAdditionalRawData, string tag) : base(tagDigestType, serializedAdditionalRawData) + { + Tag = tag; + TagDigestType = tagDigestType; + } + + /// Initializes a new instance of for deserialization. + internal AkriConnectorsTag() + { + } + + /// The tag of the image. + public string Tag { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.Serialization.cs new file mode 100644 index 000000000000..5896ea0c2f74 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriConnectorsTagDigestSettings))] + public partial class AkriConnectorsTagDigestSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("tagDigestType"u8); + writer.WriteStringValue(TagDigestType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriConnectorsTagDigestSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsTagDigestSettings(document.RootElement, options); + } + + internal static AkriConnectorsTagDigestSettings DeserializeAkriConnectorsTagDigestSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("tagDigestType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Digest": return AkriConnectorsDigest.DeserializeAkriConnectorsDigest(element, options); + case "Tag": return AkriConnectorsTag.DeserializeAkriConnectorsTag(element, options); + } + } + return UnknownAkriConnectorsTagDigestSettings.DeserializeUnknownAkriConnectorsTagDigestSettings(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsTagDigestSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsTagDigestSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.cs new file mode 100644 index 000000000000..5cbd393170e3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestSettings.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriConnectorsTagDigestSettings properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class AkriConnectorsTagDigestSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriConnectorsTagDigestSettings() + { + } + + /// Initializes a new instance of . + /// The tag or digest type. + /// Keeps track of any properties unknown to the library. + internal AkriConnectorsTagDigestSettings(AkriConnectorsTagDigestType tagDigestType, IDictionary serializedAdditionalRawData) + { + TagDigestType = tagDigestType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The tag or digest type. + internal AkriConnectorsTagDigestType TagDigestType { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestType.cs new file mode 100644 index 000000000000..7ddab1ddaffd --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriConnectorsTagDigestType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriConnectorsTagDigestType values. + internal readonly partial struct AkriConnectorsTagDigestType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriConnectorsTagDigestType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string TagValue = "Tag"; + private const string DigestValue = "Digest"; + + /// Indicates that a tag should be specified. + public static AkriConnectorsTagDigestType Tag { get; } = new AkriConnectorsTagDigestType(TagValue); + /// Indicates that a digest should be specified. + public static AkriConnectorsTagDigestType Digest { get; } = new AkriConnectorsTagDigestType(DigestValue); + /// Determines if two values are the same. + public static bool operator ==(AkriConnectorsTagDigestType left, AkriConnectorsTagDigestType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriConnectorsTagDigestType left, AkriConnectorsTagDigestType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriConnectorsTagDigestType(string value) => new AkriConnectorsTagDigestType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriConnectorsTagDigestType other && Equals(other); + /// + public bool Equals(AkriConnectorsTagDigestType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.Serialization.cs new file mode 100644 index 000000000000..a814e9c336f6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.Serialization.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriDiscoveryHandlerAioMetadata : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerAioMetadata)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AioMinVersion)) + { + writer.WritePropertyName("aioMinVersion"u8); + writer.WriteStringValue(AioMinVersion); + } + if (Optional.IsDefined(AioMaxVersion)) + { + writer.WritePropertyName("aioMaxVersion"u8); + writer.WriteStringValue(AioMaxVersion); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriDiscoveryHandlerAioMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerAioMetadata)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerAioMetadata(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerAioMetadata DeserializeAkriDiscoveryHandlerAioMetadata(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string aioMinVersion = default; + string aioMaxVersion = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("aioMinVersion"u8)) + { + aioMinVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("aioMaxVersion"u8)) + { + aioMaxVersion = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerAioMetadata(aioMinVersion, aioMaxVersion, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerAioMetadata)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerAioMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerAioMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerAioMetadata)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.cs new file mode 100644 index 000000000000..7e9456ff4112 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerAioMetadata.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Metadata about AIO. + public partial class AkriDiscoveryHandlerAioMetadata + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriDiscoveryHandlerAioMetadata() + { + } + + /// Initializes a new instance of . + /// The minimum version of AIO required for the connector. + /// The maximum version of AIO required for the connector. + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerAioMetadata(string aioMinVersion, string aioMaxVersion, IDictionary serializedAdditionalRawData) + { + AioMinVersion = aioMinVersion; + AioMaxVersion = aioMaxVersion; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The minimum version of AIO required for the connector. + public string AioMinVersion { get; set; } + /// The maximum version of AIO required for the connector. + public string AioMaxVersion { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.Serialization.cs new file mode 100644 index 000000000000..21aa70ef6ca7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AkriDiscoveryHandlerDiagnostics : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiagnostics)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("logs"u8); + writer.WriteStartObject(); + if (Optional.IsDefined(Level)) + { + writer.WritePropertyName("level"u8); + writer.WriteStringValue(Level); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriDiscoveryHandlerDiagnostics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiagnostics)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerDiagnostics(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerDiagnostics DeserializeAkriDiscoveryHandlerDiagnostics(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string level = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("logs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("level"u8)) + { + level = property0.Value.GetString(); + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerDiagnostics(level, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiagnostics)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerDiagnostics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerDiagnostics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiagnostics)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.cs new file mode 100644 index 000000000000..667096d47ca3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiagnostics.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandlerDiagnostics properties. + internal partial class AkriDiscoveryHandlerDiagnostics + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public AkriDiscoveryHandlerDiagnostics() + { + } + + /// Initializes a new instance of . + /// The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'. + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerDiagnostics(string level, IDictionary serializedAdditionalRawData) + { + Level = level; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'. + public string Level { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.Serialization.cs new file mode 100644 index 000000000000..bdbba828a5e1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriDiscoveryHandlerDiscoverableDeviceEndpointType : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiscoverableDeviceEndpointType)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("endpointType"u8); + writer.WriteStringValue(EndpointType); + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriDiscoveryHandlerDiscoverableDeviceEndpointType IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiscoverableDeviceEndpointType)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerDiscoverableDeviceEndpointType(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerDiscoverableDeviceEndpointType DeserializeAkriDiscoveryHandlerDiscoverableDeviceEndpointType(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string endpointType = default; + string version = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointType"u8)) + { + endpointType = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerDiscoverableDeviceEndpointType(endpointType, version, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiscoverableDeviceEndpointType)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerDiscoverableDeviceEndpointType IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerDiscoverableDeviceEndpointType(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerDiscoverableDeviceEndpointType)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.cs new file mode 100644 index 000000000000..83cfa0440f4a --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerDiscoverableDeviceEndpointType.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandlerDiscoverableDeviceEndpointType properties. + public partial class AkriDiscoveryHandlerDiscoverableDeviceEndpointType + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The type of the endpoint. + /// The version of the endpoint. + /// or is null. + public AkriDiscoveryHandlerDiscoverableDeviceEndpointType(string endpointType, string version) + { + Argument.AssertNotNull(endpointType, nameof(endpointType)); + Argument.AssertNotNull(version, nameof(version)); + + EndpointType = endpointType; + Version = version; + } + + /// Initializes a new instance of . + /// The type of the endpoint. + /// The version of the endpoint. + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerDiscoverableDeviceEndpointType(string endpointType, string version, IDictionary serializedAdditionalRawData) + { + EndpointType = endpointType; + Version = version; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriDiscoveryHandlerDiscoverableDeviceEndpointType() + { + } + + /// The type of the endpoint. + public string EndpointType { get; set; } + /// The version of the endpoint. + public string Version { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.Serialization.cs new file mode 100644 index 000000000000..fded6fb66974 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.Serialization.cs @@ -0,0 +1,192 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriDiscoveryHandlerImageConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerImageConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("imageName"u8); + writer.WriteStringValue(ImageName); + if (Optional.IsDefined(ImagePullPolicy)) + { + writer.WritePropertyName("imagePullPolicy"u8); + writer.WriteStringValue(ImagePullPolicy.Value.ToString()); + } + if (Optional.IsDefined(Replicas)) + { + writer.WritePropertyName("replicas"u8); + writer.WriteNumberValue(Replicas.Value); + } + if (Optional.IsDefined(RegistrySettings)) + { + writer.WritePropertyName("registrySettings"u8); + writer.WriteObjectValue(RegistrySettings, options); + } + if (Optional.IsDefined(TagDigestSettings)) + { + writer.WritePropertyName("tagDigestSettings"u8); + writer.WriteObjectValue(TagDigestSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriDiscoveryHandlerImageConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerImageConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerImageConfiguration(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerImageConfiguration DeserializeAkriDiscoveryHandlerImageConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string imageName = default; + AkriConnectorsImagePullPolicy? imagePullPolicy = default; + int? replicas = default; + AkriConnectorsRegistrySettings registrySettings = default; + AkriConnectorsTagDigestSettings tagDigestSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("imageName"u8)) + { + imageName = property.Value.GetString(); + continue; + } + if (property.NameEquals("imagePullPolicy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + imagePullPolicy = new AkriConnectorsImagePullPolicy(property.Value.GetString()); + continue; + } + if (property.NameEquals("replicas"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + replicas = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("registrySettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + registrySettings = AkriConnectorsRegistrySettings.DeserializeAkriConnectorsRegistrySettings(property.Value, options); + continue; + } + if (property.NameEquals("tagDigestSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tagDigestSettings = AkriConnectorsTagDigestSettings.DeserializeAkriConnectorsTagDigestSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerImageConfiguration( + imageName, + imagePullPolicy, + replicas, + registrySettings, + tagDigestSettings, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerImageConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerImageConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerImageConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerImageConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.cs new file mode 100644 index 000000000000..84e83253e90b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerImageConfiguration.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandler Image configuration properties. + public partial class AkriDiscoveryHandlerImageConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The image name without any registry reference, tag or digest. + /// is null. + public AkriDiscoveryHandlerImageConfiguration(string imageName) + { + Argument.AssertNotNull(imageName, nameof(imageName)); + + ImageName = imageName; + } + + /// Initializes a new instance of . + /// The image name without any registry reference, tag or digest. + /// The pull policy of the image. + /// The number of replicas to be set up. + /// + /// The registry settings for the image. You can omit this field if using the default docker hub repository or using a local image. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// + /// Optional image tag or digest. If not specified, the default tag is `latest`. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerImageConfiguration(string imageName, AkriConnectorsImagePullPolicy? imagePullPolicy, int? replicas, AkriConnectorsRegistrySettings registrySettings, AkriConnectorsTagDigestSettings tagDigestSettings, IDictionary serializedAdditionalRawData) + { + ImageName = imageName; + ImagePullPolicy = imagePullPolicy; + Replicas = replicas; + RegistrySettings = registrySettings; + TagDigestSettings = tagDigestSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriDiscoveryHandlerImageConfiguration() + { + } + + /// The image name without any registry reference, tag or digest. + public string ImageName { get; set; } + /// The pull policy of the image. + public AkriConnectorsImagePullPolicy? ImagePullPolicy { get; set; } + /// The number of replicas to be set up. + public int? Replicas { get; set; } + /// + /// The registry settings for the image. You can omit this field if using the default docker hub repository or using a local image. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public AkriConnectorsRegistrySettings RegistrySettings { get; set; } + /// + /// Optional image tag or digest. If not specified, the default tag is `latest`. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public AkriConnectorsTagDigestSettings TagDigestSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.Serialization.cs new file mode 100644 index 000000000000..8d133f0e9f89 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.Serialization.cs @@ -0,0 +1,289 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriDiscoveryHandlerProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(AioMetadata)) + { + writer.WritePropertyName("aioMetadata"u8); + writer.WriteObjectValue(AioMetadata, options); + } + if (Optional.IsCollectionDefined(AdditionalConfiguration)) + { + writer.WritePropertyName("additionalConfiguration"u8); + writer.WriteStartObject(); + foreach (var item in AdditionalConfiguration) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Diagnostics)) + { + writer.WritePropertyName("diagnostics"u8); + writer.WriteObjectValue(Diagnostics, options); + } + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + writer.WritePropertyName("discoverableDeviceEndpointTypes"u8); + writer.WriteStartArray(); + foreach (var item in DiscoverableDeviceEndpointTypes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(MqttConnectionConfiguration)) + { + writer.WritePropertyName("mqttConnectionConfiguration"u8); + writer.WriteObjectValue(MqttConnectionConfiguration, options); + } + writer.WritePropertyName("imageConfiguration"u8); + writer.WriteObjectValue(ImageConfiguration, options); + writer.WritePropertyName("schedule"u8); + writer.WriteObjectValue(Schedule, options); + if (Optional.IsCollectionDefined(Secrets)) + { + writer.WritePropertyName("secrets"u8); + writer.WriteStartArray(); + foreach (var item in Secrets) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriDiscoveryHandlerProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerProperties(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerProperties DeserializeAkriDiscoveryHandlerProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsProvisioningState? provisioningState = default; + AkriDiscoveryHandlerAioMetadata aioMetadata = default; + IDictionary additionalConfiguration = default; + AkriDiscoveryHandlerDiagnostics diagnostics = default; + IotOperationsOperationalMode? mode = default; + IList discoverableDeviceEndpointTypes = default; + AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration = default; + AkriDiscoveryHandlerImageConfiguration imageConfiguration = default; + AkriDiscoveryHandlerSchedule schedule = default; + IList secrets = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new IotOperationsProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("aioMetadata"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + aioMetadata = AkriDiscoveryHandlerAioMetadata.DeserializeAkriDiscoveryHandlerAioMetadata(property.Value, options); + continue; + } + if (property.NameEquals("additionalConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + additionalConfiguration = dictionary; + continue; + } + if (property.NameEquals("diagnostics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diagnostics = AkriDiscoveryHandlerDiagnostics.DeserializeAkriDiscoveryHandlerDiagnostics(property.Value, options); + continue; + } + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new IotOperationsOperationalMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("discoverableDeviceEndpointTypes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriDiscoveryHandlerDiscoverableDeviceEndpointType.DeserializeAkriDiscoveryHandlerDiscoverableDeviceEndpointType(item, options)); + } + discoverableDeviceEndpointTypes = array; + continue; + } + if (property.NameEquals("mqttConnectionConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mqttConnectionConfiguration = AkriConnectorsMqttConnectionConfiguration.DeserializeAkriConnectorsMqttConnectionConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("imageConfiguration"u8)) + { + imageConfiguration = AkriDiscoveryHandlerImageConfiguration.DeserializeAkriDiscoveryHandlerImageConfiguration(property.Value, options); + continue; + } + if (property.NameEquals("schedule"u8)) + { + schedule = AkriDiscoveryHandlerSchedule.DeserializeAkriDiscoveryHandlerSchedule(property.Value, options); + continue; + } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorsSecret.DeserializeAkriConnectorsSecret(item, options)); + } + secrets = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerProperties( + provisioningState, + aioMetadata, + additionalConfiguration ?? new ChangeTrackingDictionary(), + diagnostics, + mode, + discoverableDeviceEndpointTypes, + mqttConnectionConfiguration, + imageConfiguration, + schedule, + secrets ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerProperties)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.cs new file mode 100644 index 000000000000..a93f0135e4f3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerProperties.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandler properties. + public partial class AkriDiscoveryHandlerProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Device inbound endpoint types. + /// The image configuration for the AkriDiscoveryHandler. + /// + /// Schedule for the AkriDiscoveryHandler. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// , or is null. + public AkriDiscoveryHandlerProperties(IEnumerable discoverableDeviceEndpointTypes, AkriDiscoveryHandlerImageConfiguration imageConfiguration, AkriDiscoveryHandlerSchedule schedule) + { + Argument.AssertNotNull(discoverableDeviceEndpointTypes, nameof(discoverableDeviceEndpointTypes)); + Argument.AssertNotNull(imageConfiguration, nameof(imageConfiguration)); + Argument.AssertNotNull(schedule, nameof(schedule)); + + AdditionalConfiguration = new ChangeTrackingDictionary(); + DiscoverableDeviceEndpointTypes = discoverableDeviceEndpointTypes.ToList(); + ImageConfiguration = imageConfiguration; + Schedule = schedule; + Secrets = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The status of the last operation. + /// Metadata about AIO. + /// Additional configuration for the AkriDiscoveryHandler. + /// Diagnostics settings for the AkriDiscoveryHandler. + /// Mode of the AkriDiscoveryHandler. + /// Device inbound endpoint types. + /// Mqtt connection configuration settings. + /// The image configuration for the AkriDiscoveryHandler. + /// + /// Schedule for the AkriDiscoveryHandler. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Secrets that will be mounted onto discovery handler. + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerProperties(IotOperationsProvisioningState? provisioningState, AkriDiscoveryHandlerAioMetadata aioMetadata, IDictionary additionalConfiguration, AkriDiscoveryHandlerDiagnostics diagnostics, IotOperationsOperationalMode? mode, IList discoverableDeviceEndpointTypes, AkriConnectorsMqttConnectionConfiguration mqttConnectionConfiguration, AkriDiscoveryHandlerImageConfiguration imageConfiguration, AkriDiscoveryHandlerSchedule schedule, IList secrets, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + AioMetadata = aioMetadata; + AdditionalConfiguration = additionalConfiguration; + Diagnostics = diagnostics; + Mode = mode; + DiscoverableDeviceEndpointTypes = discoverableDeviceEndpointTypes; + MqttConnectionConfiguration = mqttConnectionConfiguration; + ImageConfiguration = imageConfiguration; + Schedule = schedule; + Secrets = secrets; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriDiscoveryHandlerProperties() + { + } + + /// The status of the last operation. + public IotOperationsProvisioningState? ProvisioningState { get; } + /// Metadata about AIO. + public AkriDiscoveryHandlerAioMetadata AioMetadata { get; set; } + /// Additional configuration for the AkriDiscoveryHandler. + public IDictionary AdditionalConfiguration { get; } + /// Diagnostics settings for the AkriDiscoveryHandler. + internal AkriDiscoveryHandlerDiagnostics Diagnostics { get; set; } + /// The log level. Examples - 'debug', 'info', 'warn', 'error', 'trace'. + public string DiagnosticsLevel + { + get => Diagnostics is null ? default : Diagnostics.Level; + set + { + if (Diagnostics is null) + Diagnostics = new AkriDiscoveryHandlerDiagnostics(); + Diagnostics.Level = value; + } + } + + /// Mode of the AkriDiscoveryHandler. + public IotOperationsOperationalMode? Mode { get; set; } + /// Device inbound endpoint types. + public IList DiscoverableDeviceEndpointTypes { get; } + /// Mqtt connection configuration settings. + public AkriConnectorsMqttConnectionConfiguration MqttConnectionConfiguration { get; set; } + /// The image configuration for the AkriDiscoveryHandler. + public AkriDiscoveryHandlerImageConfiguration ImageConfiguration { get; set; } + /// + /// Schedule for the AkriDiscoveryHandler. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public AkriDiscoveryHandlerSchedule Schedule { get; set; } + /// Secrets that will be mounted onto discovery handler. + public IList Secrets { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.Serialization.cs new file mode 100644 index 000000000000..069c640a6638 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AkriDiscoveryHandlerResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriDiscoveryHandlerResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerResourceListResult(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerResourceListResult DeserializeAkriDiscoveryHandlerResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriDiscoveryHandlerResourceData.DeserializeAkriDiscoveryHandlerResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.cs new file mode 100644 index 000000000000..44f3efb36b68 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The response of a AkriDiscoveryHandlerResource list operation. + internal partial class AkriDiscoveryHandlerResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The AkriDiscoveryHandlerResource items on this page. + /// is null. + internal AkriDiscoveryHandlerResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The AkriDiscoveryHandlerResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AkriDiscoveryHandlerResourceListResult() + { + } + + /// The AkriDiscoveryHandlerResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.Serialization.cs new file mode 100644 index 000000000000..feff5610abce --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownAkriDiscoveryHandlerSchedule))] + public partial class AkriDiscoveryHandlerSchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("scheduleType"u8); + writer.WriteStringValue(ScheduleType.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AkriDiscoveryHandlerSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerSchedule(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerSchedule DeserializeAkriDiscoveryHandlerSchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("scheduleType", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Continuous": return AkriDiscoveryHandlerScheduleContinuous.DeserializeAkriDiscoveryHandlerScheduleContinuous(element, options); + case "Cron": return AkriDiscoveryHandlerScheduleCron.DeserializeAkriDiscoveryHandlerScheduleCron(element, options); + case "RunOnce": return AkriDiscoveryHandlerScheduleRunOnce.DeserializeAkriDiscoveryHandlerScheduleRunOnce(element, options); + } + } + return UnknownAkriDiscoveryHandlerSchedule.DeserializeUnknownAkriDiscoveryHandlerSchedule(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerSchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.cs new file mode 100644 index 000000000000..42e4aa434887 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerSchedule.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// AkriDiscoveryHandlerSchedule properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class AkriDiscoveryHandlerSchedule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected AkriDiscoveryHandlerSchedule() + { + } + + /// Initializes a new instance of . + /// Schedule type. + /// Keeps track of any properties unknown to the library. + internal AkriDiscoveryHandlerSchedule(AkriDiscoveryHandlerScheduleType scheduleType, IDictionary serializedAdditionalRawData) + { + ScheduleType = scheduleType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Schedule type. + internal AkriDiscoveryHandlerScheduleType ScheduleType { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.Serialization.cs new file mode 100644 index 000000000000..814e74adb1ce --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriDiscoveryHandlerScheduleContinuous : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleContinuous)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("continuous"u8); + writer.WriteStringValue(Continuous); + } + + AkriDiscoveryHandlerScheduleContinuous IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleContinuous)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerScheduleContinuous(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerScheduleContinuous DeserializeAkriDiscoveryHandlerScheduleContinuous(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string continuous = default; + AkriDiscoveryHandlerScheduleType scheduleType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("continuous"u8)) + { + continuous = property.Value.GetString(); + continue; + } + if (property.NameEquals("scheduleType"u8)) + { + scheduleType = new AkriDiscoveryHandlerScheduleType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerScheduleContinuous(scheduleType, serializedAdditionalRawData, continuous); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleContinuous)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerScheduleContinuous IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerScheduleContinuous(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleContinuous)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.cs new file mode 100644 index 000000000000..88988aad962c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleContinuous.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandlerScheduleContinuous properties. + public partial class AkriDiscoveryHandlerScheduleContinuous : AkriDiscoveryHandlerSchedule + { + /// Initializes a new instance of . + /// The time to run the discovery handler. + /// is null. + public AkriDiscoveryHandlerScheduleContinuous(string continuous) + { + Argument.AssertNotNull(continuous, nameof(continuous)); + + Continuous = continuous; + ScheduleType = AkriDiscoveryHandlerScheduleType.Continuous; + } + + /// Initializes a new instance of . + /// Schedule type. + /// Keeps track of any properties unknown to the library. + /// The time to run the discovery handler. + internal AkriDiscoveryHandlerScheduleContinuous(AkriDiscoveryHandlerScheduleType scheduleType, IDictionary serializedAdditionalRawData, string continuous) : base(scheduleType, serializedAdditionalRawData) + { + Continuous = continuous; + ScheduleType = scheduleType; + } + + /// Initializes a new instance of for deserialization. + internal AkriDiscoveryHandlerScheduleContinuous() + { + } + + /// The time to run the discovery handler. + public string Continuous { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.Serialization.cs new file mode 100644 index 000000000000..f1c53e718012 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriDiscoveryHandlerScheduleCron : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleCron)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("cron"u8); + writer.WriteStringValue(Cron); + } + + AkriDiscoveryHandlerScheduleCron IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleCron)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerScheduleCron(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerScheduleCron DeserializeAkriDiscoveryHandlerScheduleCron(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string cron = default; + AkriDiscoveryHandlerScheduleType scheduleType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("cron"u8)) + { + cron = property.Value.GetString(); + continue; + } + if (property.NameEquals("scheduleType"u8)) + { + scheduleType = new AkriDiscoveryHandlerScheduleType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerScheduleCron(scheduleType, serializedAdditionalRawData, cron); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleCron)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerScheduleCron IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerScheduleCron(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleCron)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.cs new file mode 100644 index 000000000000..e288a99055f4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleCron.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandlerScheduleCron properties. + public partial class AkriDiscoveryHandlerScheduleCron : AkriDiscoveryHandlerSchedule + { + /// Initializes a new instance of . + /// The cron expression for the schedule. + /// is null. + public AkriDiscoveryHandlerScheduleCron(string cron) + { + Argument.AssertNotNull(cron, nameof(cron)); + + Cron = cron; + ScheduleType = AkriDiscoveryHandlerScheduleType.Cron; + } + + /// Initializes a new instance of . + /// Schedule type. + /// Keeps track of any properties unknown to the library. + /// The cron expression for the schedule. + internal AkriDiscoveryHandlerScheduleCron(AkriDiscoveryHandlerScheduleType scheduleType, IDictionary serializedAdditionalRawData, string cron) : base(scheduleType, serializedAdditionalRawData) + { + Cron = cron; + ScheduleType = scheduleType; + } + + /// Initializes a new instance of for deserialization. + internal AkriDiscoveryHandlerScheduleCron() + { + } + + /// The cron expression for the schedule. + public string Cron { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.Serialization.cs new file mode 100644 index 000000000000..78714b0cb611 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class AkriDiscoveryHandlerScheduleRunOnce : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleRunOnce)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("runOnce"u8); + writer.WriteStringValue(RunOnce); + } + + AkriDiscoveryHandlerScheduleRunOnce IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleRunOnce)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerScheduleRunOnce(document.RootElement, options); + } + + internal static AkriDiscoveryHandlerScheduleRunOnce DeserializeAkriDiscoveryHandlerScheduleRunOnce(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string runOnce = default; + AkriDiscoveryHandlerScheduleType scheduleType = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runOnce"u8)) + { + runOnce = property.Value.GetString(); + continue; + } + if (property.NameEquals("scheduleType"u8)) + { + scheduleType = new AkriDiscoveryHandlerScheduleType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AkriDiscoveryHandlerScheduleRunOnce(scheduleType, serializedAdditionalRawData, runOnce); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleRunOnce)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerScheduleRunOnce IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerScheduleRunOnce(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerScheduleRunOnce)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.cs new file mode 100644 index 000000000000..6285560f25e6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleRunOnce.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandlerScheduleRunOnce properties. + public partial class AkriDiscoveryHandlerScheduleRunOnce : AkriDiscoveryHandlerSchedule + { + /// Initializes a new instance of . + /// The time to run the discovery handler. + /// is null. + public AkriDiscoveryHandlerScheduleRunOnce(string runOnce) + { + Argument.AssertNotNull(runOnce, nameof(runOnce)); + + RunOnce = runOnce; + ScheduleType = AkriDiscoveryHandlerScheduleType.RunOnce; + } + + /// Initializes a new instance of . + /// Schedule type. + /// Keeps track of any properties unknown to the library. + /// The time to run the discovery handler. + internal AkriDiscoveryHandlerScheduleRunOnce(AkriDiscoveryHandlerScheduleType scheduleType, IDictionary serializedAdditionalRawData, string runOnce) : base(scheduleType, serializedAdditionalRawData) + { + RunOnce = runOnce; + ScheduleType = scheduleType; + } + + /// Initializes a new instance of for deserialization. + internal AkriDiscoveryHandlerScheduleRunOnce() + { + } + + /// The time to run the discovery handler. + public string RunOnce { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleType.cs new file mode 100644 index 000000000000..31384142f455 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AkriDiscoveryHandlerScheduleType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// AkriDiscoveryHandlerScheduleType properties. + internal readonly partial struct AkriDiscoveryHandlerScheduleType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AkriDiscoveryHandlerScheduleType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CronValue = "Cron"; + private const string RunOnceValue = "RunOnce"; + private const string ContinuousValue = "Continuous"; + + /// The schedule is a cron expression. + public static AkriDiscoveryHandlerScheduleType Cron { get; } = new AkriDiscoveryHandlerScheduleType(CronValue); + /// The discovery handler should run once. + public static AkriDiscoveryHandlerScheduleType RunOnce { get; } = new AkriDiscoveryHandlerScheduleType(RunOnceValue); + /// The discovery handler should run continuously. + public static AkriDiscoveryHandlerScheduleType Continuous { get; } = new AkriDiscoveryHandlerScheduleType(ContinuousValue); + /// Determines if two values are the same. + public static bool operator ==(AkriDiscoveryHandlerScheduleType left, AkriDiscoveryHandlerScheduleType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AkriDiscoveryHandlerScheduleType left, AkriDiscoveryHandlerScheduleType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AkriDiscoveryHandlerScheduleType(string value) => new AkriDiscoveryHandlerScheduleType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AkriDiscoveryHandlerScheduleType other && Equals(other); + /// + public bool Equals(AkriDiscoveryHandlerScheduleType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.Serialization.cs new file mode 100644 index 000000000000..646896232937 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class AzureDeviceRegistryNamespaceRef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureDeviceRegistryNamespaceRef)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + AzureDeviceRegistryNamespaceRef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AzureDeviceRegistryNamespaceRef)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureDeviceRegistryNamespaceRef(document.RootElement, options); + } + + internal static AzureDeviceRegistryNamespaceRef DeserializeAzureDeviceRegistryNamespaceRef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureDeviceRegistryNamespaceRef(resourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AzureDeviceRegistryNamespaceRef)} does not support writing '{options.Format}' format."); + } + } + + AzureDeviceRegistryNamespaceRef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAzureDeviceRegistryNamespaceRef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureDeviceRegistryNamespaceRef)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.cs new file mode 100644 index 000000000000..5b69c192663d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/AzureDeviceRegistryNamespaceRef.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Azure Device Registry Namespace reference. + internal partial class AzureDeviceRegistryNamespaceRef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource ID of the Azure Device Registry Namespace. + /// is null. + public AzureDeviceRegistryNamespaceRef(ResourceIdentifier resourceId) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + } + + /// Initializes a new instance of . + /// The resource ID of the Azure Device Registry Namespace. + /// Keeps track of any properties unknown to the library. + internal AzureDeviceRegistryNamespaceRef(ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzureDeviceRegistryNamespaceRef() + { + } + + /// The resource ID of the Azure Device Registry Namespace. + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.Serialization.cs index 60d5d35ec0ac..9b50b2fa45a1 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.Serialization.cs @@ -50,6 +50,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("trustedClientCaCert"u8); writer.WriteStringValue(TrustedClientCaCert); } + if (Optional.IsDefined(AdditionalValidation)) + { + writer.WritePropertyName("additionalValidation"u8); + writer.WriteStringValue(AdditionalValidation.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -89,6 +94,7 @@ internal static BrokerAuthenticatorMethodX509 DeserializeBrokerAuthenticatorMeth } IDictionary authorizationAttributes = default; string trustedClientCaCert = default; + BrokerAuthenticatorValidationMethod? additionalValidation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -112,13 +118,22 @@ internal static BrokerAuthenticatorMethodX509 DeserializeBrokerAuthenticatorMeth trustedClientCaCert = property.Value.GetString(); continue; } + if (property.NameEquals("additionalValidation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalValidation = new BrokerAuthenticatorValidationMethod(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new BrokerAuthenticatorMethodX509(authorizationAttributes ?? new ChangeTrackingDictionary(), trustedClientCaCert, serializedAdditionalRawData); + return new BrokerAuthenticatorMethodX509(authorizationAttributes ?? new ChangeTrackingDictionary(), trustedClientCaCert, additionalValidation, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.cs index 5157f1ffb56d..268d7e1617e5 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorMethodX509.cs @@ -54,11 +54,13 @@ public BrokerAuthenticatorMethodX509() /// Initializes a new instance of . /// X509 authorization attributes properties. /// Name of the trusted client ca cert resource. + /// X509 authentication attributes properties. /// Keeps track of any properties unknown to the library. - internal BrokerAuthenticatorMethodX509(IDictionary authorizationAttributes, string trustedClientCaCert, IDictionary serializedAdditionalRawData) + internal BrokerAuthenticatorMethodX509(IDictionary authorizationAttributes, string trustedClientCaCert, BrokerAuthenticatorValidationMethod? additionalValidation, IDictionary serializedAdditionalRawData) { AuthorizationAttributes = authorizationAttributes; TrustedClientCaCert = trustedClientCaCert; + AdditionalValidation = additionalValidation; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -66,5 +68,7 @@ internal BrokerAuthenticatorMethodX509(IDictionary AuthorizationAttributes { get; } /// Name of the trusted client ca cert resource. public string TrustedClientCaCert { get; set; } + /// X509 authentication attributes properties. + public BrokerAuthenticatorValidationMethod? AdditionalValidation { get; set; } } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorValidationMethod.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorValidationMethod.cs new file mode 100644 index 000000000000..83a076232a41 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerAuthenticatorValidationMethod.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// X509 authentication validation methods. + public readonly partial struct BrokerAuthenticatorValidationMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BrokerAuthenticatorValidationMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string NoneValue = "None"; + private const string AzureDeviceRegistryValue = "AzureDeviceRegistry"; + + /// No additional validation is performed. + public static BrokerAuthenticatorValidationMethod None { get; } = new BrokerAuthenticatorValidationMethod(NoneValue); + /// Additional validation is performed using the Azure Device Registry. + public static BrokerAuthenticatorValidationMethod AzureDeviceRegistry { get; } = new BrokerAuthenticatorValidationMethod(AzureDeviceRegistryValue); + /// Determines if two values are the same. + public static bool operator ==(BrokerAuthenticatorValidationMethod left, BrokerAuthenticatorValidationMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BrokerAuthenticatorValidationMethod left, BrokerAuthenticatorValidationMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BrokerAuthenticatorValidationMethod(string value) => new BrokerAuthenticatorValidationMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BrokerAuthenticatorValidationMethod other && Equals(other); + /// + public bool Equals(BrokerAuthenticatorValidationMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.Serialization.cs new file mode 100644 index 000000000000..d706255a80e4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.Serialization.cs @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerPersistence : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerPersistence)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DynamicSettings)) + { + writer.WritePropertyName("dynamicSettings"u8); + writer.WriteObjectValue(DynamicSettings, options); + } + writer.WritePropertyName("maxSize"u8); + writer.WriteStringValue(MaxSize); + if (Optional.IsDefined(PersistentVolumeClaimSpec)) + { + writer.WritePropertyName("persistentVolumeClaimSpec"u8); + writer.WriteObjectValue(PersistentVolumeClaimSpec, options); + } + if (Optional.IsDefined(Retain)) + { + writer.WritePropertyName("retain"u8); + writer.WriteObjectValue(Retain, options); + } + if (Optional.IsDefined(StateStore)) + { + writer.WritePropertyName("stateStore"u8); + writer.WriteObjectValue(StateStore, options); + } + if (Optional.IsDefined(SubscriberQueue)) + { + writer.WritePropertyName("subscriberQueue"u8); + writer.WriteObjectValue(SubscriberQueue, options); + } + if (Optional.IsDefined(Encryption)) + { + writer.WritePropertyName("encryption"u8); + writer.WriteObjectValue(Encryption, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerPersistence IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerPersistence)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerPersistence(document.RootElement, options); + } + + internal static BrokerPersistence DeserializeBrokerPersistence(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerPersistenceDynamicSettings dynamicSettings = default; + string maxSize = default; + VolumeClaimSpec persistentVolumeClaimSpec = default; + BrokerRetainMessagesPolicy retain = default; + BrokerStateStorePolicy stateStore = default; + BrokerSubscriberQueuePolicy subscriberQueue = default; + BrokerPersistenceEncryption encryption = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dynamicSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dynamicSettings = BrokerPersistenceDynamicSettings.DeserializeBrokerPersistenceDynamicSettings(property.Value, options); + continue; + } + if (property.NameEquals("maxSize"u8)) + { + maxSize = property.Value.GetString(); + continue; + } + if (property.NameEquals("persistentVolumeClaimSpec"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + persistentVolumeClaimSpec = VolumeClaimSpec.DeserializeVolumeClaimSpec(property.Value, options); + continue; + } + if (property.NameEquals("retain"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + retain = BrokerRetainMessagesPolicy.DeserializeBrokerRetainMessagesPolicy(property.Value, options); + continue; + } + if (property.NameEquals("stateStore"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + stateStore = BrokerStateStorePolicy.DeserializeBrokerStateStorePolicy(property.Value, options); + continue; + } + if (property.NameEquals("subscriberQueue"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subscriberQueue = BrokerSubscriberQueuePolicy.DeserializeBrokerSubscriberQueuePolicy(property.Value, options); + continue; + } + if (property.NameEquals("encryption"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + encryption = BrokerPersistenceEncryption.DeserializeBrokerPersistenceEncryption(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerPersistence( + dynamicSettings, + maxSize, + persistentVolumeClaimSpec, + retain, + stateStore, + subscriberQueue, + encryption, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerPersistence)} does not support writing '{options.Format}' format."); + } + } + + BrokerPersistence IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerPersistence(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerPersistence)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.cs new file mode 100644 index 000000000000..256c713406d7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistence.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// Disk persistence configuration. + /// + /// When persistence is enabled, certain items (non-performance-critical data) selected for persistence will reside only on disk. Below are the affected items: + /// + /// - Retained messages will be stored on disk only. + /// - WILL messages will be stored on disk only. + /// - DSS key/value pairs will be stored on disk only, except for performance-critical items like timed locks, which remain in both disk and memory for improved performance. + /// + /// Optional. Everything is in-memory if not set. + /// Note: if configured, all MQTT session states are written to disk. + /// + public partial class BrokerPersistence + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The max size of the message buffer on disk. If a PVC template is specified using persistentVolumeClaimSpec Then this size is used as the request and limit sizes of that template. If a PVC template isn't specified Then local-path provisioner is requested with this size limit. Required. + /// is null. + public BrokerPersistence(string maxSize) + { + Argument.AssertNotNull(maxSize, nameof(maxSize)); + + MaxSize = maxSize; + } + + /// Initializes a new instance of . + /// + /// Client sets the specified user property key/value in the CONNECT/SUBSCRIBE/PUBLISH. + /// Optionally, if the customer specifies a configurable user property, it will work to enable persistence dynamically. The default user property key is 'aio-persistence' and value 'true'. + /// + /// The max size of the message buffer on disk. If a PVC template is specified using persistentVolumeClaimSpec Then this size is used as the request and limit sizes of that template. If a PVC template isn't specified Then local-path provisioner is requested with this size limit. Required. + /// + /// Use the specified persistent volume claim template to mount a persistent volume. Same object as in diskBackedMessageBuffer, but with a limitation that access modes field must be set to `ReadWriteOncePod`. + /// + /// If unset, a default PVC with default properties will be used. Among other things this PVC will use the cluster default storage class, which may or may not be using a local path provisioner. User is opting in to sub-optimal behavior if they leave this unset or set it without the storage class field, and their cluster default is not a local path class. + /// + /// + /// Controls which topic's retained messages should be persisted to disk. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// + /// Controls which keys should be persisted to disk for the state store. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// + /// Controls which subscriber message queues should be persisted to disk. Important: to facilitate reconnection, session state metadata are ALWAYS written to disk if any persistence setting is specified, even if this section isn't set. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// Controls settings related to encryption of the persistence database. Optional, defaults to enabling encryption. + /// Keeps track of any properties unknown to the library. + internal BrokerPersistence(BrokerPersistenceDynamicSettings dynamicSettings, string maxSize, VolumeClaimSpec persistentVolumeClaimSpec, BrokerRetainMessagesPolicy retain, BrokerStateStorePolicy stateStore, BrokerSubscriberQueuePolicy subscriberQueue, BrokerPersistenceEncryption encryption, IDictionary serializedAdditionalRawData) + { + DynamicSettings = dynamicSettings; + MaxSize = maxSize; + PersistentVolumeClaimSpec = persistentVolumeClaimSpec; + Retain = retain; + StateStore = stateStore; + SubscriberQueue = subscriberQueue; + Encryption = encryption; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerPersistence() + { + } + + /// + /// Client sets the specified user property key/value in the CONNECT/SUBSCRIBE/PUBLISH. + /// Optionally, if the customer specifies a configurable user property, it will work to enable persistence dynamically. The default user property key is 'aio-persistence' and value 'true'. + /// + public BrokerPersistenceDynamicSettings DynamicSettings { get; set; } + /// The max size of the message buffer on disk. If a PVC template is specified using persistentVolumeClaimSpec Then this size is used as the request and limit sizes of that template. If a PVC template isn't specified Then local-path provisioner is requested with this size limit. Required. + public string MaxSize { get; set; } + /// + /// Use the specified persistent volume claim template to mount a persistent volume. Same object as in diskBackedMessageBuffer, but with a limitation that access modes field must be set to `ReadWriteOncePod`. + /// + /// If unset, a default PVC with default properties will be used. Among other things this PVC will use the cluster default storage class, which may or may not be using a local path provisioner. User is opting in to sub-optimal behavior if they leave this unset or set it without the storage class field, and their cluster default is not a local path class. + /// + public VolumeClaimSpec PersistentVolumeClaimSpec { get; set; } + /// + /// Controls which topic's retained messages should be persisted to disk. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public BrokerRetainMessagesPolicy Retain { get; set; } + /// + /// Controls which keys should be persisted to disk for the state store. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public BrokerStateStorePolicy StateStore { get; set; } + /// + /// Controls which subscriber message queues should be persisted to disk. Important: to facilitate reconnection, session state metadata are ALWAYS written to disk if any persistence setting is specified, even if this section isn't set. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public BrokerSubscriberQueuePolicy SubscriberQueue { get; set; } + /// Controls settings related to encryption of the persistence database. Optional, defaults to enabling encryption. + internal BrokerPersistenceEncryption Encryption { get; set; } + /// Determines if encryption is enabled. + public IotOperationsOperationalMode? EncryptionMode + { + get => Encryption is null ? default(IotOperationsOperationalMode?) : Encryption.Mode; + set + { + Encryption = value.HasValue ? new BrokerPersistenceEncryption(value.Value) : null; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.Serialization.cs new file mode 100644 index 000000000000..b440eafd7e62 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerPersistenceDynamicSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerPersistenceDynamicSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("userPropertyKey"u8); + writer.WriteStringValue(UserPropertyKey); + writer.WritePropertyName("userPropertyValue"u8); + writer.WriteStringValue(UserPropertyValue); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerPersistenceDynamicSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerPersistenceDynamicSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerPersistenceDynamicSettings(document.RootElement, options); + } + + internal static BrokerPersistenceDynamicSettings DeserializeBrokerPersistenceDynamicSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string userPropertyKey = default; + string userPropertyValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userPropertyKey"u8)) + { + userPropertyKey = property.Value.GetString(); + continue; + } + if (property.NameEquals("userPropertyValue"u8)) + { + userPropertyValue = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerPersistenceDynamicSettings(userPropertyKey, userPropertyValue, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerPersistenceDynamicSettings)} does not support writing '{options.Format}' format."); + } + } + + BrokerPersistenceDynamicSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerPersistenceDynamicSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerPersistenceDynamicSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.cs new file mode 100644 index 000000000000..a165448f7c4f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceDynamicSettings.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Dynamic settings of the persistence. + public partial class BrokerPersistenceDynamicSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The user property key to enable persistence. + /// The user property value to enable persistence. + /// or is null. + public BrokerPersistenceDynamicSettings(string userPropertyKey, string userPropertyValue) + { + Argument.AssertNotNull(userPropertyKey, nameof(userPropertyKey)); + Argument.AssertNotNull(userPropertyValue, nameof(userPropertyValue)); + + UserPropertyKey = userPropertyKey; + UserPropertyValue = userPropertyValue; + } + + /// Initializes a new instance of . + /// The user property key to enable persistence. + /// The user property value to enable persistence. + /// Keeps track of any properties unknown to the library. + internal BrokerPersistenceDynamicSettings(string userPropertyKey, string userPropertyValue, IDictionary serializedAdditionalRawData) + { + UserPropertyKey = userPropertyKey; + UserPropertyValue = userPropertyValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerPersistenceDynamicSettings() + { + } + + /// The user property key to enable persistence. + public string UserPropertyKey { get; set; } + /// The user property value to enable persistence. + public string UserPropertyValue { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.Serialization.cs new file mode 100644 index 000000000000..6bcad36db41d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class BrokerPersistenceEncryption : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerPersistenceEncryption)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerPersistenceEncryption IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerPersistenceEncryption)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerPersistenceEncryption(document.RootElement, options); + } + + internal static BrokerPersistenceEncryption DeserializeBrokerPersistenceEncryption(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsOperationalMode mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new IotOperationsOperationalMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerPersistenceEncryption(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerPersistenceEncryption)} does not support writing '{options.Format}' format."); + } + } + + BrokerPersistenceEncryption IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerPersistenceEncryption(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerPersistenceEncryption)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.cs new file mode 100644 index 000000000000..2975fb15576f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistenceEncryption.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker Persistence Encryption properties. + internal partial class BrokerPersistenceEncryption + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Determines if encryption is enabled. + public BrokerPersistenceEncryption(IotOperationsOperationalMode mode) + { + Mode = mode; + } + + /// Initializes a new instance of . + /// Determines if encryption is enabled. + /// Keeps track of any properties unknown to the library. + internal BrokerPersistenceEncryption(IotOperationsOperationalMode mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerPersistenceEncryption() + { + } + + /// Determines if encryption is enabled. + public IotOperationsOperationalMode Mode { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistencePolicyMode.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistencePolicyMode.cs new file mode 100644 index 000000000000..08684bc49169 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerPersistencePolicyMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker Persistence Policy Mode values. + internal readonly partial struct BrokerPersistencePolicyMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BrokerPersistencePolicyMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AllValue = "All"; + private const string NoneValue = "None"; + private const string CustomValue = "Custom"; + + /// Policy mode for All. + public static BrokerPersistencePolicyMode All { get; } = new BrokerPersistencePolicyMode(AllValue); + /// Policy mode for None. + public static BrokerPersistencePolicyMode None { get; } = new BrokerPersistencePolicyMode(NoneValue); + /// Indicates that the policy is a custom policy. + public static BrokerPersistencePolicyMode Custom { get; } = new BrokerPersistencePolicyMode(CustomValue); + /// Determines if two values are the same. + public static bool operator ==(BrokerPersistencePolicyMode left, BrokerPersistencePolicyMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BrokerPersistencePolicyMode left, BrokerPersistencePolicyMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BrokerPersistencePolicyMode(string value) => new BrokerPersistencePolicyMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BrokerPersistencePolicyMode other && Equals(other); + /// + public bool Equals(BrokerPersistencePolicyMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.Serialization.cs new file mode 100644 index 000000000000..0ef0645da7bc --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerRetainMessagesCustomPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesCustomPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("retainSettings"u8); + writer.WriteObjectValue(RetainSettings, options); + } + + BrokerRetainMessagesCustomPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesCustomPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerRetainMessagesCustomPolicy(document.RootElement, options); + } + + internal static BrokerRetainMessagesCustomPolicy DeserializeBrokerRetainMessagesCustomPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerRetainMessagesSettings retainSettings = default; + BrokerPersistencePolicyMode mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("retainSettings"u8)) + { + retainSettings = BrokerRetainMessagesSettings.DeserializeBrokerRetainMessagesSettings(property.Value, options); + continue; + } + if (property.NameEquals("mode"u8)) + { + mode = new BrokerPersistencePolicyMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerRetainMessagesCustomPolicy(mode, serializedAdditionalRawData, retainSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesCustomPolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerRetainMessagesCustomPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerRetainMessagesCustomPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesCustomPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.cs new file mode 100644 index 000000000000..3a40b93973d7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesCustomPolicy.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Custom Broker Retain Message Policy. + public partial class BrokerRetainMessagesCustomPolicy : BrokerRetainMessagesPolicy + { + /// Initializes a new instance of . + /// Settings for the policy. + /// is null. + public BrokerRetainMessagesCustomPolicy(BrokerRetainMessagesSettings retainSettings) + { + Argument.AssertNotNull(retainSettings, nameof(retainSettings)); + + RetainSettings = retainSettings; + Mode = BrokerPersistencePolicyMode.Custom; + } + + /// Initializes a new instance of . + /// 'All' to persist all retain messages, 'None' to not persist any, 'Custom' to persist only the specified topics. + /// Keeps track of any properties unknown to the library. + /// Settings for the policy. + internal BrokerRetainMessagesCustomPolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData, BrokerRetainMessagesSettings retainSettings) : base(mode, serializedAdditionalRawData) + { + RetainSettings = retainSettings; + Mode = mode; + } + + /// Initializes a new instance of for deserialization. + internal BrokerRetainMessagesCustomPolicy() + { + } + + /// Settings for the policy. + public BrokerRetainMessagesSettings RetainSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.Serialization.cs new file mode 100644 index 000000000000..601e76e51ec1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class BrokerRetainMessagesDynamic : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesDynamic)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerRetainMessagesDynamic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesDynamic)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerRetainMessagesDynamic(document.RootElement, options); + } + + internal static BrokerRetainMessagesDynamic DeserializeBrokerRetainMessagesDynamic(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsOperationalMode mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new IotOperationsOperationalMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerRetainMessagesDynamic(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesDynamic)} does not support writing '{options.Format}' format."); + } + } + + BrokerRetainMessagesDynamic IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerRetainMessagesDynamic(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesDynamic)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.cs new file mode 100644 index 000000000000..a052a6d673f3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesDynamic.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Dynamic settings of BrokerRetainMessagesCustomPolicy. + internal partial class BrokerRetainMessagesDynamic + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Mode of the BrokerRetainMessagesCustomPolicy. + public BrokerRetainMessagesDynamic(IotOperationsOperationalMode mode) + { + Mode = mode; + } + + /// Initializes a new instance of . + /// Mode of the BrokerRetainMessagesCustomPolicy. + /// Keeps track of any properties unknown to the library. + internal BrokerRetainMessagesDynamic(IotOperationsOperationalMode mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerRetainMessagesDynamic() + { + } + + /// Mode of the BrokerRetainMessagesCustomPolicy. + public IotOperationsOperationalMode Mode { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.Serialization.cs new file mode 100644 index 000000000000..a3dfae576df4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownBrokerRetainMessagesPolicy))] + public partial class BrokerRetainMessagesPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerRetainMessagesPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerRetainMessagesPolicy(document.RootElement, options); + } + + internal static BrokerRetainMessagesPolicy DeserializeBrokerRetainMessagesPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("mode", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Custom": return BrokerRetainMessagesCustomPolicy.DeserializeBrokerRetainMessagesCustomPolicy(element, options); + } + } + return UnknownBrokerRetainMessagesPolicy.DeserializeUnknownBrokerRetainMessagesPolicy(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerRetainMessagesPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerRetainMessagesPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.cs new file mode 100644 index 000000000000..5cd028e11d25 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesPolicy.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// Broker Retain policy properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class BrokerRetainMessagesPolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected BrokerRetainMessagesPolicy() + { + } + + /// Initializes a new instance of . + /// 'All' to persist all retain messages, 'None' to not persist any, 'Custom' to persist only the specified topics. + /// Keeps track of any properties unknown to the library. + internal BrokerRetainMessagesPolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 'All' to persist all retain messages, 'None' to not persist any, 'Custom' to persist only the specified topics. + internal BrokerPersistencePolicyMode Mode { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.Serialization.cs new file mode 100644 index 000000000000..28c0f0154943 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerRetainMessagesSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Topics)) + { + writer.WritePropertyName("topics"u8); + writer.WriteStartArray(); + foreach (var item in Topics) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Dynamic)) + { + writer.WritePropertyName("dynamic"u8); + writer.WriteObjectValue(Dynamic, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerRetainMessagesSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerRetainMessagesSettings(document.RootElement, options); + } + + internal static BrokerRetainMessagesSettings DeserializeBrokerRetainMessagesSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList topics = default; + BrokerRetainMessagesDynamic @dynamic = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("topics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + topics = array; + continue; + } + if (property.NameEquals("dynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @dynamic = BrokerRetainMessagesDynamic.DeserializeBrokerRetainMessagesDynamic(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerRetainMessagesSettings(topics ?? new ChangeTrackingList(), @dynamic, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesSettings)} does not support writing '{options.Format}' format."); + } + } + + BrokerRetainMessagesSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerRetainMessagesSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.cs new file mode 100644 index 000000000000..1dd942e386ab --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerRetainMessagesSettings.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker Retain Messages properties. + public partial class BrokerRetainMessagesSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BrokerRetainMessagesSettings() + { + Topics = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of topics under which retained messages would be persisted to disk. Wildcards # and + supported. + /// Controls if MQTT clients can request for disk persistence via `MQTTv5` user property. Works in addition to other groups (logical OR). + /// Keeps track of any properties unknown to the library. + internal BrokerRetainMessagesSettings(IList topics, BrokerRetainMessagesDynamic @dynamic, IDictionary serializedAdditionalRawData) + { + Topics = topics; + Dynamic = @dynamic; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of topics under which retained messages would be persisted to disk. Wildcards # and + supported. + public IList Topics { get; } + /// Controls if MQTT clients can request for disk persistence via `MQTTv5` user property. Works in addition to other groups (logical OR). + internal BrokerRetainMessagesDynamic Dynamic { get; set; } + /// Mode of the BrokerRetainMessagesCustomPolicy. + public IotOperationsOperationalMode? DynamicMode + { + get => Dynamic is null ? default(IotOperationsOperationalMode?) : Dynamic.Mode; + set + { + Dynamic = value.HasValue ? new BrokerRetainMessagesDynamic(value.Value) : null; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.Serialization.cs new file mode 100644 index 000000000000..5c4a476d6e00 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerStateStoreCustomPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStoreCustomPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("stateStoreSettings"u8); + writer.WriteObjectValue(StateStoreSettings, options); + } + + BrokerStateStoreCustomPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStoreCustomPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerStateStoreCustomPolicy(document.RootElement, options); + } + + internal static BrokerStateStoreCustomPolicy DeserializeBrokerStateStoreCustomPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerStateStorePolicySettings stateStoreSettings = default; + BrokerPersistencePolicyMode mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("stateStoreSettings"u8)) + { + stateStoreSettings = BrokerStateStorePolicySettings.DeserializeBrokerStateStorePolicySettings(property.Value, options); + continue; + } + if (property.NameEquals("mode"u8)) + { + mode = new BrokerPersistencePolicyMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerStateStoreCustomPolicy(mode, serializedAdditionalRawData, stateStoreSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerStateStoreCustomPolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerStateStoreCustomPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerStateStoreCustomPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerStateStoreCustomPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.cs new file mode 100644 index 000000000000..fcb3d76ceaa3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreCustomPolicy.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker State Store Custom Policy. + public partial class BrokerStateStoreCustomPolicy : BrokerStateStorePolicy + { + /// Initializes a new instance of . + /// Settings for the policy. + /// is null. + public BrokerStateStoreCustomPolicy(BrokerStateStorePolicySettings stateStoreSettings) + { + Argument.AssertNotNull(stateStoreSettings, nameof(stateStoreSettings)); + + StateStoreSettings = stateStoreSettings; + Mode = BrokerPersistencePolicyMode.Custom; + } + + /// Initializes a new instance of . + /// 'All' to persist all keys, 'None' to not persist any, 'Custom' to persist only the specified keys. + /// Keeps track of any properties unknown to the library. + /// Settings for the policy. + internal BrokerStateStoreCustomPolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData, BrokerStateStorePolicySettings stateStoreSettings) : base(mode, serializedAdditionalRawData) + { + StateStoreSettings = stateStoreSettings; + Mode = mode; + } + + /// Initializes a new instance of for deserialization. + internal BrokerStateStoreCustomPolicy() + { + } + + /// Settings for the policy. + public BrokerStateStorePolicySettings StateStoreSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.Serialization.cs new file mode 100644 index 000000000000..48e91d51e8c6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class BrokerStateStoreDynamic : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStoreDynamic)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerStateStoreDynamic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStoreDynamic)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerStateStoreDynamic(document.RootElement, options); + } + + internal static BrokerStateStoreDynamic DeserializeBrokerStateStoreDynamic(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsOperationalMode mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new IotOperationsOperationalMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerStateStoreDynamic(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerStateStoreDynamic)} does not support writing '{options.Format}' format."); + } + } + + BrokerStateStoreDynamic IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerStateStoreDynamic(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerStateStoreDynamic)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.cs new file mode 100644 index 000000000000..44ff34a9f06b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreDynamic.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Dynamic settings of BrokerStateStoreCustomPolicy. + internal partial class BrokerStateStoreDynamic + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Mode of the BrokerStateStoreCustomPolicy. + public BrokerStateStoreDynamic(IotOperationsOperationalMode mode) + { + Mode = mode; + } + + /// Initializes a new instance of . + /// Mode of the BrokerStateStoreCustomPolicy. + /// Keeps track of any properties unknown to the library. + internal BrokerStateStoreDynamic(IotOperationsOperationalMode mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerStateStoreDynamic() + { + } + + /// Mode of the BrokerStateStoreCustomPolicy. + public IotOperationsOperationalMode Mode { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreKeyType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreKeyType.cs new file mode 100644 index 000000000000..9be706b53595 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStoreKeyType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker State Store Key Type properties. + public readonly partial struct BrokerStateStoreKeyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public BrokerStateStoreKeyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string PatternValue = "Pattern"; + private const string StringValue = "String"; + private const string BinaryValue = "Binary"; + + /// Used for glob-style pattern matching. + public static BrokerStateStoreKeyType Pattern { get; } = new BrokerStateStoreKeyType(PatternValue); + /// Used to do exact match, for example, when a key contains characters that might be otherwise matched as a pattern (*, ?, [0-9]). + public static BrokerStateStoreKeyType String { get; } = new BrokerStateStoreKeyType(StringValue); + /// Used to match a binary key. + public static BrokerStateStoreKeyType Binary { get; } = new BrokerStateStoreKeyType(BinaryValue); + /// Determines if two values are the same. + public static bool operator ==(BrokerStateStoreKeyType left, BrokerStateStoreKeyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(BrokerStateStoreKeyType left, BrokerStateStoreKeyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator BrokerStateStoreKeyType(string value) => new BrokerStateStoreKeyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is BrokerStateStoreKeyType other && Equals(other); + /// + public bool Equals(BrokerStateStoreKeyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.Serialization.cs new file mode 100644 index 000000000000..b7187c2657c9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownBrokerStateStorePolicy))] + public partial class BrokerStateStorePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerStateStorePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerStateStorePolicy(document.RootElement, options); + } + + internal static BrokerStateStorePolicy DeserializeBrokerStateStorePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("mode", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Custom": return BrokerStateStoreCustomPolicy.DeserializeBrokerStateStoreCustomPolicy(element, options); + } + } + return UnknownBrokerStateStorePolicy.DeserializeUnknownBrokerStateStorePolicy(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerStateStorePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerStateStorePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.cs new file mode 100644 index 000000000000..a70053b5e308 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicy.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// Broker State Store Policy. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class BrokerStateStorePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected BrokerStateStorePolicy() + { + } + + /// Initializes a new instance of . + /// 'All' to persist all keys, 'None' to not persist any, 'Custom' to persist only the specified keys. + /// Keeps track of any properties unknown to the library. + internal BrokerStateStorePolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 'All' to persist all keys, 'None' to not persist any, 'Custom' to persist only the specified keys. + internal BrokerPersistencePolicyMode Mode { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.Serialization.cs new file mode 100644 index 000000000000..89d040b4bf47 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerStateStorePolicyResources : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicyResources)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("keyType"u8); + writer.WriteStringValue(KeyType.ToString()); + writer.WritePropertyName("keys"u8); + writer.WriteStartArray(); + foreach (var item in Keys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerStateStorePolicyResources IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicyResources)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerStateStorePolicyResources(document.RootElement, options); + } + + internal static BrokerStateStorePolicyResources DeserializeBrokerStateStorePolicyResources(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerStateStoreKeyType keyType = default; + IList keys = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("keyType"u8)) + { + keyType = new BrokerStateStoreKeyType(property.Value.GetString()); + continue; + } + if (property.NameEquals("keys"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + keys = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerStateStorePolicyResources(keyType, keys, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicyResources)} does not support writing '{options.Format}' format."); + } + } + + BrokerStateStorePolicyResources IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerStateStorePolicyResources(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicyResources)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.cs new file mode 100644 index 000000000000..4d7ebeb26196 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicyResources.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker State Store Policy Resources properties. + public partial class BrokerStateStorePolicyResources + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The key to persist to disk. + /// List of keys to persist to disk, required. + /// is null. + public BrokerStateStorePolicyResources(BrokerStateStoreKeyType keyType, IEnumerable keys) + { + Argument.AssertNotNull(keys, nameof(keys)); + + KeyType = keyType; + Keys = keys.ToList(); + } + + /// Initializes a new instance of . + /// The key to persist to disk. + /// List of keys to persist to disk, required. + /// Keeps track of any properties unknown to the library. + internal BrokerStateStorePolicyResources(BrokerStateStoreKeyType keyType, IList keys, IDictionary serializedAdditionalRawData) + { + KeyType = keyType; + Keys = keys; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerStateStorePolicyResources() + { + } + + /// The key to persist to disk. + public BrokerStateStoreKeyType KeyType { get; set; } + /// List of keys to persist to disk, required. + public IList Keys { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.Serialization.cs new file mode 100644 index 000000000000..6880f699520f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.Serialization.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerStateStorePolicySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicySettings)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(StateStoreResources)) + { + writer.WritePropertyName("stateStoreResources"u8); + writer.WriteStartArray(); + foreach (var item in StateStoreResources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Dynamic)) + { + writer.WritePropertyName("dynamic"u8); + writer.WriteObjectValue(Dynamic, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerStateStorePolicySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerStateStorePolicySettings(document.RootElement, options); + } + + internal static BrokerStateStorePolicySettings DeserializeBrokerStateStorePolicySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList stateStoreResources = default; + BrokerStateStoreDynamic @dynamic = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("stateStoreResources"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(BrokerStateStorePolicyResources.DeserializeBrokerStateStorePolicyResources(item, options)); + } + stateStoreResources = array; + continue; + } + if (property.NameEquals("dynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @dynamic = BrokerStateStoreDynamic.DeserializeBrokerStateStoreDynamic(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerStateStorePolicySettings(stateStoreResources ?? new ChangeTrackingList(), @dynamic, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicySettings)} does not support writing '{options.Format}' format."); + } + } + + BrokerStateStorePolicySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerStateStorePolicySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.cs new file mode 100644 index 000000000000..599670a30af6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerStateStorePolicySettings.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker State Store Custom Policy Settings. + public partial class BrokerStateStorePolicySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BrokerStateStorePolicySettings() + { + StateStoreResources = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of key and key type to persist to disk. + /// Controls if MQTT clients can request for disk persistence via `MQTTv5` user property. Works in addition to other groups (logical OR). + /// Keeps track of any properties unknown to the library. + internal BrokerStateStorePolicySettings(IList stateStoreResources, BrokerStateStoreDynamic @dynamic, IDictionary serializedAdditionalRawData) + { + StateStoreResources = stateStoreResources; + Dynamic = @dynamic; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of key and key type to persist to disk. + public IList StateStoreResources { get; } + /// Controls if MQTT clients can request for disk persistence via `MQTTv5` user property. Works in addition to other groups (logical OR). + internal BrokerStateStoreDynamic Dynamic { get; set; } + /// Mode of the BrokerStateStoreCustomPolicy. + public IotOperationsOperationalMode? DynamicMode + { + get => Dynamic is null ? default(IotOperationsOperationalMode?) : Dynamic.Mode; + set + { + Dynamic = value.HasValue ? new BrokerStateStoreDynamic(value.Value) : null; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.Serialization.cs new file mode 100644 index 000000000000..7dfa03fd8235 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerSubscriberQueueCustomPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("subscriberQueueSettings"u8); + writer.WriteObjectValue(SubscriberQueueSettings, options); + } + + BrokerSubscriberQueueCustomPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerSubscriberQueueCustomPolicy(document.RootElement, options); + } + + internal static BrokerSubscriberQueueCustomPolicy DeserializeBrokerSubscriberQueueCustomPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerSubscriberQueueCustomPolicySettings subscriberQueueSettings = default; + BrokerPersistencePolicyMode mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriberQueueSettings"u8)) + { + subscriberQueueSettings = BrokerSubscriberQueueCustomPolicySettings.DeserializeBrokerSubscriberQueueCustomPolicySettings(property.Value, options); + continue; + } + if (property.NameEquals("mode"u8)) + { + mode = new BrokerPersistencePolicyMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerSubscriberQueueCustomPolicy(mode, serializedAdditionalRawData, subscriberQueueSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerSubscriberQueueCustomPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerSubscriberQueueCustomPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.cs new file mode 100644 index 000000000000..a3bb00792026 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicy.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Custom Subscriber Queue Policy Properties. + public partial class BrokerSubscriberQueueCustomPolicy : BrokerSubscriberQueuePolicy + { + /// Initializes a new instance of . + /// Custom policy, required if mode is Custom. Subscriber queues from all groups are persisted to disk (logical OR). + /// is null. + public BrokerSubscriberQueueCustomPolicy(BrokerSubscriberQueueCustomPolicySettings subscriberQueueSettings) + { + Argument.AssertNotNull(subscriberQueueSettings, nameof(subscriberQueueSettings)); + + SubscriberQueueSettings = subscriberQueueSettings; + Mode = BrokerPersistencePolicyMode.Custom; + } + + /// Initializes a new instance of . + /// 'All' to persist all subscriber queues, 'None' to not persist any, 'Custom' to persist only the specified queues. + /// Keeps track of any properties unknown to the library. + /// Custom policy, required if mode is Custom. Subscriber queues from all groups are persisted to disk (logical OR). + internal BrokerSubscriberQueueCustomPolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData, BrokerSubscriberQueueCustomPolicySettings subscriberQueueSettings) : base(mode, serializedAdditionalRawData) + { + SubscriberQueueSettings = subscriberQueueSettings; + Mode = mode; + } + + /// Initializes a new instance of for deserialization. + internal BrokerSubscriberQueueCustomPolicy() + { + } + + /// Custom policy, required if mode is Custom. Subscriber queues from all groups are persisted to disk (logical OR). + public BrokerSubscriberQueueCustomPolicySettings SubscriberQueueSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.Serialization.cs new file mode 100644 index 000000000000..4bd2c22bcca9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class BrokerSubscriberQueueCustomPolicySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicySettings)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(SubscriberClientIds)) + { + writer.WritePropertyName("subscriberClientIds"u8); + writer.WriteStartArray(); + foreach (var item in SubscriberClientIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Dynamic)) + { + writer.WritePropertyName("dynamic"u8); + writer.WriteObjectValue(Dynamic, options); + } + if (Optional.IsCollectionDefined(Topics)) + { + writer.WritePropertyName("topics"u8); + writer.WriteStartArray(); + foreach (var item in Topics) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerSubscriberQueueCustomPolicySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerSubscriberQueueCustomPolicySettings(document.RootElement, options); + } + + internal static BrokerSubscriberQueueCustomPolicySettings DeserializeBrokerSubscriberQueueCustomPolicySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList subscriberClientIds = default; + BrokerSubscriberQueueDynamic @dynamic = default; + IList topics = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("subscriberClientIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + subscriberClientIds = array; + continue; + } + if (property.NameEquals("dynamic"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + @dynamic = BrokerSubscriberQueueDynamic.DeserializeBrokerSubscriberQueueDynamic(property.Value, options); + continue; + } + if (property.NameEquals("topics"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + topics = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerSubscriberQueueCustomPolicySettings(subscriberClientIds ?? new ChangeTrackingList(), @dynamic, topics ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicySettings)} does not support writing '{options.Format}' format."); + } + } + + BrokerSubscriberQueueCustomPolicySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerSubscriberQueueCustomPolicySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueueCustomPolicySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.cs new file mode 100644 index 000000000000..f8e2580868cd --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueCustomPolicySettings.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Broker Subscriber Queue Custom Policy properties. + public partial class BrokerSubscriberQueueCustomPolicySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public BrokerSubscriberQueueCustomPolicySettings() + { + SubscriberClientIds = new ChangeTrackingList(); + Topics = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// List of client IDs of the subscribers, wildcard * supported. + /// Controls if MQTT clients can request for disk persistence via `MQTTv5` user property. Works in addition to other groups (logical OR). + /// List of topics under which messages would be persisted to disk for each subscriber. Wildcards # and + supported. + /// Keeps track of any properties unknown to the library. + internal BrokerSubscriberQueueCustomPolicySettings(IList subscriberClientIds, BrokerSubscriberQueueDynamic @dynamic, IList topics, IDictionary serializedAdditionalRawData) + { + SubscriberClientIds = subscriberClientIds; + Dynamic = @dynamic; + Topics = topics; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// List of client IDs of the subscribers, wildcard * supported. + public IList SubscriberClientIds { get; } + /// Controls if MQTT clients can request for disk persistence via `MQTTv5` user property. Works in addition to other groups (logical OR). + internal BrokerSubscriberQueueDynamic Dynamic { get; set; } + /// Mode of the BrokerSubscriberQueueCustomPolicy. + public IotOperationsOperationalMode? DynamicMode + { + get => Dynamic is null ? default(IotOperationsOperationalMode?) : Dynamic.Mode; + set + { + Dynamic = value.HasValue ? new BrokerSubscriberQueueDynamic(value.Value) : null; + } + } + + /// List of topics under which messages would be persisted to disk for each subscriber. Wildcards # and + supported. + public IList Topics { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.Serialization.cs new file mode 100644 index 000000000000..5161de3fa0d5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class BrokerSubscriberQueueDynamic : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueueDynamic)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerSubscriberQueueDynamic IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueueDynamic)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerSubscriberQueueDynamic(document.RootElement, options); + } + + internal static BrokerSubscriberQueueDynamic DeserializeBrokerSubscriberQueueDynamic(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsOperationalMode mode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new IotOperationsOperationalMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new BrokerSubscriberQueueDynamic(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueueDynamic)} does not support writing '{options.Format}' format."); + } + } + + BrokerSubscriberQueueDynamic IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerSubscriberQueueDynamic(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueueDynamic)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.cs new file mode 100644 index 000000000000..362e3b240fb9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueueDynamic.cs @@ -0,0 +1,72 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Dynamic settings of BrokerSubscriberQueueCustomPolicy. + internal partial class BrokerSubscriberQueueDynamic + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Mode of the BrokerSubscriberQueueCustomPolicy. + public BrokerSubscriberQueueDynamic(IotOperationsOperationalMode mode) + { + Mode = mode; + } + + /// Initializes a new instance of . + /// Mode of the BrokerSubscriberQueueCustomPolicy. + /// Keeps track of any properties unknown to the library. + internal BrokerSubscriberQueueDynamic(IotOperationsOperationalMode mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal BrokerSubscriberQueueDynamic() + { + } + + /// Mode of the BrokerSubscriberQueueCustomPolicy. + public IotOperationsOperationalMode Mode { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.Serialization.cs new file mode 100644 index 000000000000..4161e3ae7141 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.Serialization.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownBrokerSubscriberQueuePolicy))] + public partial class BrokerSubscriberQueuePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + BrokerSubscriberQueuePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerSubscriberQueuePolicy(document.RootElement, options); + } + + internal static BrokerSubscriberQueuePolicy DeserializeBrokerSubscriberQueuePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("mode", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Custom": return BrokerSubscriberQueueCustomPolicy.DeserializeBrokerSubscriberQueueCustomPolicy(element, options); + } + } + return UnknownBrokerSubscriberQueuePolicy.DeserializeUnknownBrokerSubscriberQueuePolicy(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerSubscriberQueuePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerSubscriberQueuePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.cs new file mode 100644 index 000000000000..3c028a91c80f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/BrokerSubscriberQueuePolicy.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// Broker Subscriber Queue Policy properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + public abstract partial class BrokerSubscriberQueuePolicy + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected BrokerSubscriberQueuePolicy() + { + } + + /// Initializes a new instance of . + /// 'All' to persist all subscriber queues, 'None' to not persist any, 'Custom' to persist only the specified queues. + /// Keeps track of any properties unknown to the library. + internal BrokerSubscriberQueuePolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData) + { + Mode = mode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// 'All' to persist all subscriber queues, 'None' to not persist any, 'Custom' to persist only the specified queues. + internal BrokerPersistencePolicyMode Mode { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.Serialization.cs new file mode 100644 index 000000000000..75efcefbd466 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.Serialization.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DatafloGraphDestinationNode : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatafloGraphDestinationNode)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("destinationSettings"u8); + writer.WriteObjectValue(DestinationSettings, options); + } + + DatafloGraphDestinationNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatafloGraphDestinationNode)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatafloGraphDestinationNode(document.RootElement, options); + } + + internal static DatafloGraphDestinationNode DeserializeDatafloGraphDestinationNode(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowGraphDestinationNodeSettings destinationSettings = default; + string name = default; + DataflowGraphNodeType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("destinationSettings"u8)) + { + destinationSettings = DataflowGraphDestinationNodeSettings.DeserializeDataflowGraphDestinationNodeSettings(property.Value, options); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DataflowGraphNodeType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DatafloGraphDestinationNode(name, type, serializedAdditionalRawData, destinationSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DatafloGraphDestinationNode)} does not support writing '{options.Format}' format."); + } + } + + DatafloGraphDestinationNode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDatafloGraphDestinationNode(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatafloGraphDestinationNode)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.cs new file mode 100644 index 000000000000..e8a39fdbc0ee --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DatafloGraphDestinationNode.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph destination node properties. + public partial class DatafloGraphDestinationNode : DataflowGraphNode + { + /// Initializes a new instance of . + /// Name of the node. + /// Destination configuration. + /// or is null. + public DatafloGraphDestinationNode(string name, DataflowGraphDestinationNodeSettings destinationSettings) : base(name) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(destinationSettings, nameof(destinationSettings)); + + DestinationSettings = destinationSettings; + Type = DataflowGraphNodeType.Destination; + } + + /// Initializes a new instance of . + /// Name of the node. + /// Type of the node. + /// Keeps track of any properties unknown to the library. + /// Destination configuration. + internal DatafloGraphDestinationNode(string name, DataflowGraphNodeType type, IDictionary serializedAdditionalRawData, DataflowGraphDestinationNodeSettings destinationSettings) : base(name, type, serializedAdditionalRawData) + { + DestinationSettings = destinationSettings; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal DatafloGraphDestinationNode() + { + } + + /// Destination configuration. + public DataflowGraphDestinationNodeSettings DestinationSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.Serialization.cs new file mode 100644 index 000000000000..7946a1768942 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowEndpointAuthenticationAnonymous : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowEndpointAuthenticationAnonymous)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowEndpointAuthenticationAnonymous IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowEndpointAuthenticationAnonymous)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowEndpointAuthenticationAnonymous(document.RootElement, options); + } + + internal static DataflowEndpointAuthenticationAnonymous DeserializeDataflowEndpointAuthenticationAnonymous(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowEndpointAuthenticationAnonymous(serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowEndpointAuthenticationAnonymous)} does not support writing '{options.Format}' format."); + } + } + + DataflowEndpointAuthenticationAnonymous IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowEndpointAuthenticationAnonymous(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowEndpointAuthenticationAnonymous)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.cs new file mode 100644 index 000000000000..a9529a9c0a1c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationAnonymous.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowEndpoint Anonymous Authentication properties. + public partial class DataflowEndpointAuthenticationAnonymous + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public DataflowEndpointAuthenticationAnonymous() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal DataflowEndpointAuthenticationAnonymous(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.Serialization.cs index 0ce3c6d4836c..bec208d8f91f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.IotOperations.Models { - internal partial class DataflowEndpointAuthenticationServiceAccountToken : IUtf8JsonSerializable, IJsonModel + public partial class DataflowEndpointAuthenticationServiceAccountToken : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.cs index 4beb7de61619..6c6d3fd6b677 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationServiceAccountToken.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.IotOperations.Models { /// Service Account Token for BrokerAuthentication. - internal partial class DataflowEndpointAuthenticationServiceAccountToken + public partial class DataflowEndpointAuthenticationServiceAccountToken { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.Serialization.cs index a92a2acbc1ba..7b19a1867224 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.IotOperations.Models { - internal partial class DataflowEndpointAuthenticationX509 : IUtf8JsonSerializable, IJsonModel + public partial class DataflowEndpointAuthenticationX509 : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.cs index 3006690008ca..55273a2313b0 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointAuthenticationX509.cs @@ -11,7 +11,7 @@ namespace Azure.ResourceManager.IotOperations.Models { /// DataflowEndpoint Authentication X509 properties. - internal partial class DataflowEndpointAuthenticationX509 + public partial class DataflowEndpointAuthenticationX509 { /// /// Keeps track of any properties unknown to the library. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.Serialization.cs new file mode 100644 index 000000000000..d4f102fd2ef6 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowEndpointOpenTelemetry : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowEndpointOpenTelemetry)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("host"u8); + writer.WriteStringValue(Host); + if (Optional.IsDefined(Batching)) + { + writer.WritePropertyName("batching"u8); + writer.WriteObjectValue(Batching, options); + } + if (Optional.IsDefined(Tls)) + { + writer.WritePropertyName("tls"u8); + writer.WriteObjectValue(Tls, options); + } + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowEndpointOpenTelemetry IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowEndpointOpenTelemetry)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowEndpointOpenTelemetry(document.RootElement, options); + } + + internal static DataflowEndpointOpenTelemetry DeserializeDataflowEndpointOpenTelemetry(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string host = default; + IotOperationsBatchingConfig batching = default; + IotOperationsTlsProperties tls = default; + DataflowOpenTelemetryAuthentication authentication = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("host"u8)) + { + host = property.Value.GetString(); + continue; + } + if (property.NameEquals("batching"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + batching = IotOperationsBatchingConfig.DeserializeIotOperationsBatchingConfig(property.Value, options); + continue; + } + if (property.NameEquals("tls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tls = IotOperationsTlsProperties.DeserializeIotOperationsTlsProperties(property.Value, options); + continue; + } + if (property.NameEquals("authentication"u8)) + { + authentication = DataflowOpenTelemetryAuthentication.DeserializeDataflowOpenTelemetryAuthentication(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowEndpointOpenTelemetry(host, batching, tls, authentication, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowEndpointOpenTelemetry)} does not support writing '{options.Format}' format."); + } + } + + DataflowEndpointOpenTelemetry IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowEndpointOpenTelemetry(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowEndpointOpenTelemetry)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.cs new file mode 100644 index 000000000000..a162018b6c04 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointOpenTelemetry.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// OpenTelemetry endpoint properties. + public partial class DataflowEndpointOpenTelemetry + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Host of the OpenTelemetry in the form of <host>:<port>. + /// + /// Authentication properties for OpenTelemetry endpoints + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// or is null. + public DataflowEndpointOpenTelemetry(string host, DataflowOpenTelemetryAuthentication authentication) + { + Argument.AssertNotNull(host, nameof(host)); + Argument.AssertNotNull(authentication, nameof(authentication)); + + Host = host; + Authentication = authentication; + } + + /// Initializes a new instance of . + /// Host of the OpenTelemetry in the form of <host>:<port>. + /// Batching configuration. + /// TLS configuration. + /// + /// Authentication properties for OpenTelemetry endpoints + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// Keeps track of any properties unknown to the library. + internal DataflowEndpointOpenTelemetry(string host, IotOperationsBatchingConfig batching, IotOperationsTlsProperties tls, DataflowOpenTelemetryAuthentication authentication, IDictionary serializedAdditionalRawData) + { + Host = host; + Batching = batching; + Tls = tls; + Authentication = authentication; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowEndpointOpenTelemetry() + { + } + + /// Host of the OpenTelemetry in the form of <host>:<port>. + public string Host { get; set; } + /// Batching configuration. + public IotOperationsBatchingConfig Batching { get; set; } + /// TLS configuration. + public IotOperationsTlsProperties Tls { get; set; } + /// + /// Authentication properties for OpenTelemetry endpoints + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public DataflowOpenTelemetryAuthentication Authentication { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointType.cs index cf2f76bbb3ba..b61c1e9e510a 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointType.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEndpointType.cs @@ -28,6 +28,7 @@ public DataflowEndpointType(string value) private const string KafkaValue = "Kafka"; private const string LocalStorageValue = "LocalStorage"; private const string MqttValue = "Mqtt"; + private const string OpenTelemetryValue = "OpenTelemetry"; /// Azure Data Explorer Type. public static DataflowEndpointType DataExplorer { get; } = new DataflowEndpointType(DataExplorerValue); @@ -41,6 +42,8 @@ public DataflowEndpointType(string value) public static DataflowEndpointType LocalStorage { get; } = new DataflowEndpointType(LocalStorageValue); /// Broker Type. public static DataflowEndpointType Mqtt { get; } = new DataflowEndpointType(MqttValue); + /// OpenTelemetry Type. + public static DataflowEndpointType OpenTelemetry { get; } = new DataflowEndpointType(OpenTelemetryValue); /// Determines if two values are the same. public static bool operator ==(DataflowEndpointType left, DataflowEndpointType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEnpointHostType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEnpointHostType.cs new file mode 100644 index 000000000000..87b730939a16 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowEnpointHostType.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowEndpoint Host Type properties. + public readonly partial struct DataflowEnpointHostType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataflowEnpointHostType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string FabricRTValue = "FabricRT"; + private const string EventGridValue = "EventGrid"; + private const string LocalBrokerValue = "LocalBroker"; + private const string EventhubValue = "Eventhub"; + private const string CustomMqttValue = "CustomMqtt"; + private const string CustomKafkaValue = "CustomKafka"; + + /// Fabric Real-Time Type. + public static DataflowEnpointHostType FabricRT { get; } = new DataflowEnpointHostType(FabricRTValue); + /// EventGrid Type. + public static DataflowEnpointHostType EventGrid { get; } = new DataflowEnpointHostType(EventGridValue); + /// Local MQTT Type. + public static DataflowEnpointHostType LocalBroker { get; } = new DataflowEnpointHostType(LocalBrokerValue); + /// EventHub Type. + public static DataflowEnpointHostType Eventhub { get; } = new DataflowEnpointHostType(EventhubValue); + /// Custom MQTT Type. + public static DataflowEnpointHostType CustomMqtt { get; } = new DataflowEnpointHostType(CustomMqttValue); + /// Custom Kafka Type. + public static DataflowEnpointHostType CustomKafka { get; } = new DataflowEnpointHostType(CustomKafkaValue); + /// Determines if two values are the same. + public static bool operator ==(DataflowEnpointHostType left, DataflowEnpointHostType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataflowEnpointHostType left, DataflowEnpointHostType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataflowEnpointHostType(string value) => new DataflowEnpointHostType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataflowEnpointHostType other && Equals(other); + /// + public bool Equals(DataflowEnpointHostType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.Serialization.cs new file mode 100644 index 000000000000..55c7dc3db894 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphConnectionInput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphConnectionInput)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Schema)) + { + writer.WritePropertyName("schema"u8); + writer.WriteObjectValue(Schema, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphConnectionInput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphConnectionInput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphConnectionInput(document.RootElement, options); + } + + internal static DataflowGraphConnectionInput DeserializeDataflowGraphConnectionInput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + DataflowGraphSchemaSettings schema = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("schema"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + schema = DataflowGraphSchemaSettings.DeserializeDataflowGraphSchemaSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphConnectionInput(name, schema, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphConnectionInput)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphConnectionInput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphConnectionInput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphConnectionInput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.cs new file mode 100644 index 000000000000..9a8967c95047 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionInput.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph DataflowGraphNode Connection Input. + public partial class DataflowGraphConnectionInput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the source node. + /// is null. + public DataflowGraphConnectionInput(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// Name of the source node. + /// Schema settings for the source node. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphConnectionInput(string name, DataflowGraphSchemaSettings schema, IDictionary serializedAdditionalRawData) + { + Name = name; + Schema = schema; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphConnectionInput() + { + } + + /// Name of the source node. + public string Name { get; set; } + /// Schema settings for the source node. + public DataflowGraphSchemaSettings Schema { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.Serialization.cs new file mode 100644 index 000000000000..901dc9e4c0a5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphConnectionOutput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphConnectionOutput)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphConnectionOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphConnectionOutput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphConnectionOutput(document.RootElement, options); + } + + internal static DataflowGraphConnectionOutput DeserializeDataflowGraphConnectionOutput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphConnectionOutput(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphConnectionOutput)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphConnectionOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphConnectionOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphConnectionOutput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.cs new file mode 100644 index 000000000000..c61e0ccffe38 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphConnectionOutput.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph DataflowGraphNode Connection Output. + public partial class DataflowGraphConnectionOutput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the destination node. + /// is null. + public DataflowGraphConnectionOutput(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// Name of the destination node. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphConnectionOutput(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphConnectionOutput() + { + } + + /// Name of the destination node. + public string Name { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.Serialization.cs new file mode 100644 index 000000000000..fff457dba013 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphDestinationNodeSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphDestinationNodeSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("endpointRef"u8); + writer.WriteStringValue(EndpointRef); + writer.WritePropertyName("dataDestination"u8); + writer.WriteStringValue(DataDestination); + if (Optional.IsDefined(OutputSchemaSettings)) + { + writer.WritePropertyName("outputSchemaSettings"u8); + writer.WriteObjectValue(OutputSchemaSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphDestinationNodeSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphDestinationNodeSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphDestinationNodeSettings(document.RootElement, options); + } + + internal static DataflowGraphDestinationNodeSettings DeserializeDataflowGraphDestinationNodeSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string endpointRef = default; + string dataDestination = default; + DataflowGraphSchemaSettings outputSchemaSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointRef"u8)) + { + endpointRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataDestination"u8)) + { + dataDestination = property.Value.GetString(); + continue; + } + if (property.NameEquals("outputSchemaSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputSchemaSettings = DataflowGraphSchemaSettings.DeserializeDataflowGraphSchemaSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphDestinationNodeSettings(endpointRef, dataDestination, outputSchemaSettings, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphDestinationNodeSettings)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphDestinationNodeSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphDestinationNodeSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphDestinationNodeSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.cs new file mode 100644 index 000000000000..1b3e39de531e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphDestinationNodeSettings.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph destination node settings. + public partial class DataflowGraphDestinationNodeSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The endpoint reference for the destination. + /// Data destination at the endpoint. + /// or is null. + public DataflowGraphDestinationNodeSettings(string endpointRef, string dataDestination) + { + Argument.AssertNotNull(endpointRef, nameof(endpointRef)); + Argument.AssertNotNull(dataDestination, nameof(dataDestination)); + + EndpointRef = endpointRef; + DataDestination = dataDestination; + } + + /// Initializes a new instance of . + /// The endpoint reference for the destination. + /// Data destination at the endpoint. + /// Output schema settings. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphDestinationNodeSettings(string endpointRef, string dataDestination, DataflowGraphSchemaSettings outputSchemaSettings, IDictionary serializedAdditionalRawData) + { + EndpointRef = endpointRef; + DataDestination = dataDestination; + OutputSchemaSettings = outputSchemaSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphDestinationNodeSettings() + { + } + + /// The endpoint reference for the destination. + public string EndpointRef { get; set; } + /// Data destination at the endpoint. + public string DataDestination { get; set; } + /// Output schema settings. + public DataflowGraphSchemaSettings OutputSchemaSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.Serialization.cs new file mode 100644 index 000000000000..a29ba9cafc08 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.Serialization.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphGraphNode : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphGraphNode)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("graphSettings"u8); + writer.WriteObjectValue(GraphSettings, options); + } + + DataflowGraphGraphNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphGraphNode)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphGraphNode(document.RootElement, options); + } + + internal static DataflowGraphGraphNode DeserializeDataflowGraphGraphNode(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowGraphNodeGraphSettings graphSettings = default; + string name = default; + DataflowGraphNodeType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("graphSettings"u8)) + { + graphSettings = DataflowGraphNodeGraphSettings.DeserializeDataflowGraphNodeGraphSettings(property.Value, options); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DataflowGraphNodeType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphGraphNode(name, type, serializedAdditionalRawData, graphSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphGraphNode)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphGraphNode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphGraphNode(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphGraphNode)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.cs new file mode 100644 index 000000000000..41b341501665 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNode.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph graph node properties. + public partial class DataflowGraphGraphNode : DataflowGraphNode + { + /// Initializes a new instance of . + /// Name of the node. + /// Graph configuration. + /// or is null. + public DataflowGraphGraphNode(string name, DataflowGraphNodeGraphSettings graphSettings) : base(name) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(graphSettings, nameof(graphSettings)); + + GraphSettings = graphSettings; + Type = DataflowGraphNodeType.Graph; + } + + /// Initializes a new instance of . + /// Name of the node. + /// Type of the node. + /// Keeps track of any properties unknown to the library. + /// Graph configuration. + internal DataflowGraphGraphNode(string name, DataflowGraphNodeType type, IDictionary serializedAdditionalRawData, DataflowGraphNodeGraphSettings graphSettings) : base(name, type, serializedAdditionalRawData) + { + GraphSettings = graphSettings; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphGraphNode() + { + } + + /// Graph configuration. + public DataflowGraphNodeGraphSettings GraphSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.Serialization.cs new file mode 100644 index 000000000000..3e2360f9a0c5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphGraphNodeConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphGraphNodeConfiguration)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("key"u8); + writer.WriteStringValue(Key); + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphGraphNodeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphGraphNodeConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphGraphNodeConfiguration(document.RootElement, options); + } + + internal static DataflowGraphGraphNodeConfiguration DeserializeDataflowGraphGraphNodeConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string key = default; + string value = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("key"u8)) + { + key = property.Value.GetString(); + continue; + } + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphGraphNodeConfiguration(key, value, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphGraphNodeConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphGraphNodeConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphGraphNodeConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphGraphNodeConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.cs new file mode 100644 index 000000000000..1a4a10769bec --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphGraphNodeConfiguration.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph graph node configuration. + public partial class DataflowGraphGraphNodeConfiguration + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Key of the configuration. + /// Value of the configuration. + /// or is null. + public DataflowGraphGraphNodeConfiguration(string key, string value) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + Key = key; + Value = value; + } + + /// Initializes a new instance of . + /// Key of the configuration. + /// Value of the configuration. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphGraphNodeConfiguration(string key, string value, IDictionary serializedAdditionalRawData) + { + Key = key; + Value = value; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphGraphNodeConfiguration() + { + } + + /// Key of the configuration. + public string Key { get; set; } + /// Value of the configuration. + public string Value { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.Serialization.cs new file mode 100644 index 000000000000..5cd7f8c1a994 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.Serialization.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownDataflowGraphNode))] + public partial class DataflowGraphNode : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphNode(document.RootElement, options); + } + + internal static DataflowGraphNode DeserializeDataflowGraphNode(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Destination": return DatafloGraphDestinationNode.DeserializeDatafloGraphDestinationNode(element, options); + case "Graph": return DataflowGraphGraphNode.DeserializeDataflowGraphGraphNode(element, options); + case "Source": return DataflowGraphSourceNode.DeserializeDataflowGraphSourceNode(element, options); + } + } + return UnknownDataflowGraphNode.DeserializeUnknownDataflowGraphNode(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphNode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphNode(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.cs new file mode 100644 index 000000000000..87f0b9bc30c3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNode.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// DataflowGraph node properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class DataflowGraphNode + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the node. + /// is null. + protected DataflowGraphNode(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// Name of the node. + /// Type of the node. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphNode(string name, DataflowGraphNodeType type, IDictionary serializedAdditionalRawData) + { + Name = name; + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphNode() + { + } + + /// Name of the node. + public string Name { get; set; } + /// Type of the node. + internal DataflowGraphNodeType Type { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.Serialization.cs new file mode 100644 index 000000000000..3710bcc737c5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphNodeConnection : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNodeConnection)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("from"u8); + writer.WriteObjectValue(From, options); + writer.WritePropertyName("to"u8); + writer.WriteObjectValue(To, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphNodeConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNodeConnection)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphNodeConnection(document.RootElement, options); + } + + internal static DataflowGraphNodeConnection DeserializeDataflowGraphNodeConnection(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowGraphConnectionInput @from = default; + DataflowGraphConnectionOutput to = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("from"u8)) + { + @from = DataflowGraphConnectionInput.DeserializeDataflowGraphConnectionInput(property.Value, options); + continue; + } + if (property.NameEquals("to"u8)) + { + to = DataflowGraphConnectionOutput.DeserializeDataflowGraphConnectionOutput(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphNodeConnection(@from, to, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphNodeConnection)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphNodeConnection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphNodeConnection(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphNodeConnection)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.cs new file mode 100644 index 000000000000..b7139c092907 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeConnection.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph DataflowGraphNode Connection. + public partial class DataflowGraphNodeConnection + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Information about the source node. + /// Information about the destination node. + /// or is null. + public DataflowGraphNodeConnection(DataflowGraphConnectionInput @from, DataflowGraphConnectionOutput to) + { + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + + From = @from; + To = to; + } + + /// Initializes a new instance of . + /// Information about the source node. + /// Information about the destination node. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphNodeConnection(DataflowGraphConnectionInput @from, DataflowGraphConnectionOutput to, IDictionary serializedAdditionalRawData) + { + From = @from; + To = to; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphNodeConnection() + { + } + + /// Information about the source node. + public DataflowGraphConnectionInput From { get; set; } + /// Information about the destination node. + internal DataflowGraphConnectionOutput To { get; set; } + /// Name of the destination node. + public string ToName + { + get => To is null ? default : To.Name; + set => To = new DataflowGraphConnectionOutput(value); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.Serialization.cs new file mode 100644 index 000000000000..109c6c9d1c29 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphNodeGraphSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNodeGraphSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("registryEndpointRef"u8); + writer.WriteStringValue(RegistryEndpointRef); + writer.WritePropertyName("artifact"u8); + writer.WriteStringValue(Artifact); + if (Optional.IsCollectionDefined(Configuration)) + { + writer.WritePropertyName("configuration"u8); + writer.WriteStartArray(); + foreach (var item in Configuration) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphNodeGraphSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNodeGraphSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphNodeGraphSettings(document.RootElement, options); + } + + internal static DataflowGraphNodeGraphSettings DeserializeDataflowGraphNodeGraphSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string registryEndpointRef = default; + string artifact = default; + IList configuration = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registryEndpointRef"u8)) + { + registryEndpointRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("artifact"u8)) + { + artifact = property.Value.GetString(); + continue; + } + if (property.NameEquals("configuration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataflowGraphGraphNodeConfiguration.DeserializeDataflowGraphGraphNodeConfiguration(item, options)); + } + configuration = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphNodeGraphSettings(registryEndpointRef, artifact, configuration ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphNodeGraphSettings)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphNodeGraphSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphNodeGraphSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphNodeGraphSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.cs new file mode 100644 index 000000000000..d5251e1e0b34 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeGraphSettings.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph graph node settings. + public partial class DataflowGraphNodeGraphSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Reference to the registry endpoint for pulling the artifact. + /// The artifact name and version to pull. + /// or is null. + public DataflowGraphNodeGraphSettings(string registryEndpointRef, string artifact) + { + Argument.AssertNotNull(registryEndpointRef, nameof(registryEndpointRef)); + Argument.AssertNotNull(artifact, nameof(artifact)); + + RegistryEndpointRef = registryEndpointRef; + Artifact = artifact; + Configuration = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Reference to the registry endpoint for pulling the artifact. + /// The artifact name and version to pull. + /// Configuration key-value pairs. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphNodeGraphSettings(string registryEndpointRef, string artifact, IList configuration, IDictionary serializedAdditionalRawData) + { + RegistryEndpointRef = registryEndpointRef; + Artifact = artifact; + Configuration = configuration; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphNodeGraphSettings() + { + } + + /// Reference to the registry endpoint for pulling the artifact. + public string RegistryEndpointRef { get; set; } + /// The artifact name and version to pull. + public string Artifact { get; set; } + /// Configuration key-value pairs. + public IList Configuration { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeType.cs new file mode 100644 index 000000000000..4d0380385e6b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphNodeType.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph node types. + internal readonly partial struct DataflowGraphNodeType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataflowGraphNodeType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SourceValue = "Source"; + private const string GraphValue = "Graph"; + private const string DestinationValue = "Destination"; + + /// Dataflow source node. + public static DataflowGraphNodeType Source { get; } = new DataflowGraphNodeType(SourceValue); + /// Dataflow graph node. + public static DataflowGraphNodeType Graph { get; } = new DataflowGraphNodeType(GraphValue); + /// Dataflow destination node. + public static DataflowGraphNodeType Destination { get; } = new DataflowGraphNodeType(DestinationValue); + /// Determines if two values are the same. + public static bool operator ==(DataflowGraphNodeType left, DataflowGraphNodeType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataflowGraphNodeType left, DataflowGraphNodeType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataflowGraphNodeType(string value) => new DataflowGraphNodeType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataflowGraphNodeType other && Equals(other); + /// + public bool Equals(DataflowGraphNodeType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.Serialization.cs new file mode 100644 index 000000000000..42dcba35581b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.Serialization.cs @@ -0,0 +1,205 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsDefined(RequestDiskPersistence)) + { + writer.WritePropertyName("requestDiskPersistence"u8); + writer.WriteStringValue(RequestDiskPersistence.Value.ToString()); + } + writer.WritePropertyName("nodes"u8); + writer.WriteStartArray(); + foreach (var item in Nodes) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("nodeConnections"u8); + writer.WriteStartArray(); + foreach (var item in NodeConnections) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphProperties(document.RootElement, options); + } + + internal static DataflowGraphProperties DeserializeDataflowGraphProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IotOperationsOperationalMode? mode = default; + IotOperationsOperationalMode? requestDiskPersistence = default; + IList nodes = default; + IList nodeConnections = default; + IotOperationsProvisioningState? provisioningState = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new IotOperationsOperationalMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("requestDiskPersistence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + requestDiskPersistence = new IotOperationsOperationalMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("nodes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataflowGraphNode.DeserializeDataflowGraphNode(item, options)); + } + nodes = array; + continue; + } + if (property.NameEquals("nodeConnections"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataflowGraphNodeConnection.DeserializeDataflowGraphNodeConnection(item, options)); + } + nodeConnections = array; + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new IotOperationsProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphProperties( + mode, + requestDiskPersistence, + nodes, + nodeConnections, + provisioningState, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphProperties)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.cs new file mode 100644 index 000000000000..efd14704043c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphProperties.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph properties. + public partial class DataflowGraphProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// List of nodes in the dataflow graph. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// List of connections between nodes in the dataflow graph. + /// or is null. + public DataflowGraphProperties(IEnumerable nodes, IEnumerable nodeConnections) + { + Argument.AssertNotNull(nodes, nameof(nodes)); + Argument.AssertNotNull(nodeConnections, nameof(nodeConnections)); + + Nodes = nodes.ToList(); + NodeConnections = nodeConnections.ToList(); + } + + /// Initializes a new instance of . + /// The mode of the dataflow graph. + /// Disk persistence mode. + /// + /// List of nodes in the dataflow graph. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + /// List of connections between nodes in the dataflow graph. + /// The provisioning state of the dataflow graph. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphProperties(IotOperationsOperationalMode? mode, IotOperationsOperationalMode? requestDiskPersistence, IList nodes, IList nodeConnections, IotOperationsProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + { + Mode = mode; + RequestDiskPersistence = requestDiskPersistence; + Nodes = nodes; + NodeConnections = nodeConnections; + ProvisioningState = provisioningState; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphProperties() + { + } + + /// The mode of the dataflow graph. + public IotOperationsOperationalMode? Mode { get; set; } + /// Disk persistence mode. + public IotOperationsOperationalMode? RequestDiskPersistence { get; set; } + /// + /// List of nodes in the dataflow graph. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public IList Nodes { get; } + /// List of connections between nodes in the dataflow graph. + public IList NodeConnections { get; } + /// The provisioning state of the dataflow graph. + public IotOperationsProvisioningState? ProvisioningState { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.Serialization.cs new file mode 100644 index 000000000000..edb1dec7309d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class DataflowGraphResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphResourceListResult(document.RootElement, options); + } + + internal static DataflowGraphResourceListResult DeserializeDataflowGraphResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DataflowGraphResourceData.DeserializeDataflowGraphResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.cs new file mode 100644 index 000000000000..49cf7a6bedf9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The response of a DataflowGraphResource list operation. + internal partial class DataflowGraphResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The DataflowGraphResource items on this page. + /// is null. + internal DataflowGraphResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The DataflowGraphResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphResourceListResult() + { + } + + /// The DataflowGraphResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.Serialization.cs new file mode 100644 index 000000000000..d644eda80863 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.Serialization.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphSchemaSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphSchemaSettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SerializationFormat)) + { + writer.WritePropertyName("serializationFormat"u8); + writer.WriteStringValue(SerializationFormat.Value.ToString()); + } + writer.WritePropertyName("schemaRef"u8); + writer.WriteStringValue(SchemaRef); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphSchemaSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphSchemaSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphSchemaSettings(document.RootElement, options); + } + + internal static DataflowGraphSchemaSettings DeserializeDataflowGraphSchemaSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowGraphSerializationFormat? serializationFormat = default; + string schemaRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serializationFormat"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serializationFormat = new DataflowGraphSerializationFormat(property.Value.GetString()); + continue; + } + if (property.NameEquals("schemaRef"u8)) + { + schemaRef = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphSchemaSettings(serializationFormat, schemaRef, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphSchemaSettings)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphSchemaSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphSchemaSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphSchemaSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.cs new file mode 100644 index 000000000000..ad5f9d531071 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSchemaSettings.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph output schema settings. + public partial class DataflowGraphSchemaSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Reference to the schema that describes the output of the transformation. + /// is null. + public DataflowGraphSchemaSettings(string schemaRef) + { + Argument.AssertNotNull(schemaRef, nameof(schemaRef)); + + SchemaRef = schemaRef; + } + + /// Initializes a new instance of . + /// Output serialization format. + /// Reference to the schema that describes the output of the transformation. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphSchemaSettings(DataflowGraphSerializationFormat? serializationFormat, string schemaRef, IDictionary serializedAdditionalRawData) + { + SerializationFormat = serializationFormat; + SchemaRef = schemaRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphSchemaSettings() + { + } + + /// Output serialization format. + public DataflowGraphSerializationFormat? SerializationFormat { get; set; } + /// Reference to the schema that describes the output of the transformation. + public string SchemaRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSerializationFormat.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSerializationFormat.cs new file mode 100644 index 000000000000..b4297010765f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSerializationFormat.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Serialization format for dataflow graph. + public readonly partial struct DataflowGraphSerializationFormat : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataflowGraphSerializationFormat(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DeltaValue = "Delta"; + private const string JsonValue = "Json"; + private const string ParquetValue = "Parquet"; + private const string AvroValue = "Avro"; + + /// Delta Format. + public static DataflowGraphSerializationFormat Delta { get; } = new DataflowGraphSerializationFormat(DeltaValue); + /// JSON Format. + public static DataflowGraphSerializationFormat Json { get; } = new DataflowGraphSerializationFormat(JsonValue); + /// Parquet Format. + public static DataflowGraphSerializationFormat Parquet { get; } = new DataflowGraphSerializationFormat(ParquetValue); + /// Avro serialization format. + public static DataflowGraphSerializationFormat Avro { get; } = new DataflowGraphSerializationFormat(AvroValue); + /// Determines if two values are the same. + public static bool operator ==(DataflowGraphSerializationFormat left, DataflowGraphSerializationFormat right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataflowGraphSerializationFormat left, DataflowGraphSerializationFormat right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataflowGraphSerializationFormat(string value) => new DataflowGraphSerializationFormat(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataflowGraphSerializationFormat other && Equals(other); + /// + public bool Equals(DataflowGraphSerializationFormat other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.Serialization.cs new file mode 100644 index 000000000000..99836762ef1d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.Serialization.cs @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphSourceNode : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphSourceNode)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("sourceSettings"u8); + writer.WriteObjectValue(SourceSettings, options); + } + + DataflowGraphSourceNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphSourceNode)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphSourceNode(document.RootElement, options); + } + + internal static DataflowGraphSourceNode DeserializeDataflowGraphSourceNode(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowGraphSourceSettings sourceSettings = default; + string name = default; + DataflowGraphNodeType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("sourceSettings"u8)) + { + sourceSettings = DataflowGraphSourceSettings.DeserializeDataflowGraphSourceSettings(property.Value, options); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DataflowGraphNodeType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphSourceNode(name, type, serializedAdditionalRawData, sourceSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphSourceNode)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphSourceNode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphSourceNode(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphSourceNode)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.cs new file mode 100644 index 000000000000..f10b6eee8849 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceNode.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph source node properties. + public partial class DataflowGraphSourceNode : DataflowGraphNode + { + /// Initializes a new instance of . + /// Name of the node. + /// Source configuration. + /// or is null. + public DataflowGraphSourceNode(string name, DataflowGraphSourceSettings sourceSettings) : base(name) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(sourceSettings, nameof(sourceSettings)); + + SourceSettings = sourceSettings; + Type = DataflowGraphNodeType.Source; + } + + /// Initializes a new instance of . + /// Name of the node. + /// Type of the node. + /// Keeps track of any properties unknown to the library. + /// Source configuration. + internal DataflowGraphSourceNode(string name, DataflowGraphNodeType type, IDictionary serializedAdditionalRawData, DataflowGraphSourceSettings sourceSettings) : base(name, type, serializedAdditionalRawData) + { + SourceSettings = sourceSettings; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphSourceNode() + { + } + + /// Source configuration. + public DataflowGraphSourceSettings SourceSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.Serialization.cs new file mode 100644 index 000000000000..72468d8cafbc --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.Serialization.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowGraphSourceSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphSourceSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("endpointRef"u8); + writer.WriteStringValue(EndpointRef); + writer.WritePropertyName("dataSources"u8); + writer.WriteStartArray(); + foreach (var item in DataSources) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowGraphSourceSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphSourceSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphSourceSettings(document.RootElement, options); + } + + internal static DataflowGraphSourceSettings DeserializeDataflowGraphSourceSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string endpointRef = default; + IList dataSources = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endpointRef"u8)) + { + endpointRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataSources"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + dataSources = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowGraphSourceSettings(endpointRef, dataSources, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphSourceSettings)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphSourceSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphSourceSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphSourceSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.cs new file mode 100644 index 000000000000..6dc90e2090af --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowGraphSourceSettings.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowGraph source node settings. + public partial class DataflowGraphSourceSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The endpoint reference for the source. + /// List of data sources. + /// or is null. + public DataflowGraphSourceSettings(string endpointRef, IEnumerable dataSources) + { + Argument.AssertNotNull(endpointRef, nameof(endpointRef)); + Argument.AssertNotNull(dataSources, nameof(dataSources)); + + EndpointRef = endpointRef; + DataSources = dataSources.ToList(); + } + + /// Initializes a new instance of . + /// The endpoint reference for the source. + /// List of data sources. + /// Keeps track of any properties unknown to the library. + internal DataflowGraphSourceSettings(string endpointRef, IList dataSources, IDictionary serializedAdditionalRawData) + { + EndpointRef = endpointRef; + DataSources = dataSources; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DataflowGraphSourceSettings() + { + } + + /// The endpoint reference for the source. + public string EndpointRef { get; set; } + /// List of data sources. + public IList DataSources { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.Serialization.cs new file mode 100644 index 000000000000..7eeafd6588d7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowOpenTelemetryAnonymousAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAnonymousAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("anonymousSettings"u8); + writer.WriteObjectValue(AnonymousSettings, options); + } + + DataflowOpenTelemetryAnonymousAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAnonymousAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowOpenTelemetryAnonymousAuthentication(document.RootElement, options); + } + + internal static DataflowOpenTelemetryAnonymousAuthentication DeserializeDataflowOpenTelemetryAnonymousAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowEndpointAuthenticationAnonymous anonymousSettings = default; + DataflowOpenTelemetryAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("anonymousSettings"u8)) + { + anonymousSettings = DataflowEndpointAuthenticationAnonymous.DeserializeDataflowEndpointAuthenticationAnonymous(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new DataflowOpenTelemetryAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowOpenTelemetryAnonymousAuthentication(method, serializedAdditionalRawData, anonymousSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAnonymousAuthentication)} does not support writing '{options.Format}' format."); + } + } + + DataflowOpenTelemetryAnonymousAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowOpenTelemetryAnonymousAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAnonymousAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.cs new file mode 100644 index 000000000000..8956d987b879 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAnonymousAuthentication.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowOpenTelemetryAnonymousAuthentication properties. + public partial class DataflowOpenTelemetryAnonymousAuthentication : DataflowOpenTelemetryAuthentication + { + /// Initializes a new instance of . + /// Settings for the anonymous connection. + /// is null. + public DataflowOpenTelemetryAnonymousAuthentication(DataflowEndpointAuthenticationAnonymous anonymousSettings) + { + Argument.AssertNotNull(anonymousSettings, nameof(anonymousSettings)); + + AnonymousSettings = anonymousSettings; + Method = DataflowOpenTelemetryAuthenticationMethod.Anonymous; + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + /// Settings for the anonymous connection. + internal DataflowOpenTelemetryAnonymousAuthentication(DataflowOpenTelemetryAuthenticationMethod method, IDictionary serializedAdditionalRawData, DataflowEndpointAuthenticationAnonymous anonymousSettings) : base(method, serializedAdditionalRawData) + { + AnonymousSettings = anonymousSettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal DataflowOpenTelemetryAnonymousAuthentication() + { + } + + /// Settings for the anonymous connection. + public DataflowEndpointAuthenticationAnonymous AnonymousSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.Serialization.cs new file mode 100644 index 000000000000..07d88ede9b51 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.Serialization.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownDataflowOpenTelemetryAuthentication))] + public partial class DataflowOpenTelemetryAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("method"u8); + writer.WriteStringValue(Method.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + DataflowOpenTelemetryAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowOpenTelemetryAuthentication(document.RootElement, options); + } + + internal static DataflowOpenTelemetryAuthentication DeserializeDataflowOpenTelemetryAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("method", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Anonymous": return DataflowOpenTelemetryAnonymousAuthentication.DeserializeDataflowOpenTelemetryAnonymousAuthentication(element, options); + case "ServiceAccountToken": return DataflowOpenTelemetryServiceAccountAuthentication.DeserializeDataflowOpenTelemetryServiceAccountAuthentication(element, options); + case "X509Certificate": return DataflowOpenTelemetryX509CertificateAuthentication.DeserializeDataflowOpenTelemetryX509CertificateAuthentication(element, options); + } + } + return UnknownDataflowOpenTelemetryAuthentication.DeserializeUnknownDataflowOpenTelemetryAuthentication(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support writing '{options.Format}' format."); + } + } + + DataflowOpenTelemetryAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowOpenTelemetryAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.cs new file mode 100644 index 000000000000..3c103f48da0d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthentication.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// Dataflow OpenTelemetry authentication properties. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , and . + /// + public abstract partial class DataflowOpenTelemetryAuthentication + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected DataflowOpenTelemetryAuthentication() + { + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + internal DataflowOpenTelemetryAuthentication(DataflowOpenTelemetryAuthenticationMethod method, IDictionary serializedAdditionalRawData) + { + Method = method; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The authentication method. + internal DataflowOpenTelemetryAuthenticationMethod Method { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthenticationMethod.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthenticationMethod.cs new file mode 100644 index 000000000000..31690c5e6ca3 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryAuthenticationMethod.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Dataflow OpenTelemetry authentication method values. + internal readonly partial struct DataflowOpenTelemetryAuthenticationMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public DataflowOpenTelemetryAuthenticationMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ServiceAccountTokenValue = "ServiceAccountToken"; + private const string X509CertificateValue = "X509Certificate"; + private const string AnonymousValue = "Anonymous"; + + /// Uses serviceaccount token. + public static DataflowOpenTelemetryAuthenticationMethod ServiceAccountToken { get; } = new DataflowOpenTelemetryAuthenticationMethod(ServiceAccountTokenValue); + /// Uses x509 certificate. + public static DataflowOpenTelemetryAuthenticationMethod X509Certificate { get; } = new DataflowOpenTelemetryAuthenticationMethod(X509CertificateValue); + /// Connects anonymously. + public static DataflowOpenTelemetryAuthenticationMethod Anonymous { get; } = new DataflowOpenTelemetryAuthenticationMethod(AnonymousValue); + /// Determines if two values are the same. + public static bool operator ==(DataflowOpenTelemetryAuthenticationMethod left, DataflowOpenTelemetryAuthenticationMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(DataflowOpenTelemetryAuthenticationMethod left, DataflowOpenTelemetryAuthenticationMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator DataflowOpenTelemetryAuthenticationMethod(string value) => new DataflowOpenTelemetryAuthenticationMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataflowOpenTelemetryAuthenticationMethod other && Equals(other); + /// + public bool Equals(DataflowOpenTelemetryAuthenticationMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.Serialization.cs new file mode 100644 index 000000000000..ca443d1a756d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowOpenTelemetryServiceAccountAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryServiceAccountAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("serviceAccountTokenSettings"u8); + writer.WriteObjectValue(ServiceAccountTokenSettings, options); + } + + DataflowOpenTelemetryServiceAccountAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryServiceAccountAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowOpenTelemetryServiceAccountAuthentication(document.RootElement, options); + } + + internal static DataflowOpenTelemetryServiceAccountAuthentication DeserializeDataflowOpenTelemetryServiceAccountAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowEndpointAuthenticationServiceAccountToken serviceAccountTokenSettings = default; + DataflowOpenTelemetryAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceAccountTokenSettings"u8)) + { + serviceAccountTokenSettings = DataflowEndpointAuthenticationServiceAccountToken.DeserializeDataflowEndpointAuthenticationServiceAccountToken(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new DataflowOpenTelemetryAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowOpenTelemetryServiceAccountAuthentication(method, serializedAdditionalRawData, serviceAccountTokenSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryServiceAccountAuthentication)} does not support writing '{options.Format}' format."); + } + } + + DataflowOpenTelemetryServiceAccountAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowOpenTelemetryServiceAccountAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryServiceAccountAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.cs new file mode 100644 index 000000000000..30f7f5ac9877 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryServiceAccountAuthentication.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowOpenTelemetryServiceAccountAuthentication properties. + public partial class DataflowOpenTelemetryServiceAccountAuthentication : DataflowOpenTelemetryAuthentication + { + /// Initializes a new instance of . + /// Kubernetes service account token authentication. + /// is null. + public DataflowOpenTelemetryServiceAccountAuthentication(DataflowEndpointAuthenticationServiceAccountToken serviceAccountTokenSettings) + { + Argument.AssertNotNull(serviceAccountTokenSettings, nameof(serviceAccountTokenSettings)); + + ServiceAccountTokenSettings = serviceAccountTokenSettings; + Method = DataflowOpenTelemetryAuthenticationMethod.ServiceAccountToken; + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + /// Kubernetes service account token authentication. + internal DataflowOpenTelemetryServiceAccountAuthentication(DataflowOpenTelemetryAuthenticationMethod method, IDictionary serializedAdditionalRawData, DataflowEndpointAuthenticationServiceAccountToken serviceAccountTokenSettings) : base(method, serializedAdditionalRawData) + { + ServiceAccountTokenSettings = serviceAccountTokenSettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal DataflowOpenTelemetryServiceAccountAuthentication() + { + } + + /// Kubernetes service account token authentication. + internal DataflowEndpointAuthenticationServiceAccountToken ServiceAccountTokenSettings { get; set; } + /// Audience of the service account. Optional, defaults to the broker internal service account audience. + public string ServiceAccountTokenAudience + { + get => ServiceAccountTokenSettings is null ? default : ServiceAccountTokenSettings.Audience; + set => ServiceAccountTokenSettings = new DataflowEndpointAuthenticationServiceAccountToken(value); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.Serialization.cs new file mode 100644 index 000000000000..86bea8b3c451 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class DataflowOpenTelemetryX509CertificateAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryX509CertificateAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("x509CertificateSettings"u8); + writer.WriteObjectValue(X509CertificateSettings, options); + } + + DataflowOpenTelemetryX509CertificateAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryX509CertificateAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowOpenTelemetryX509CertificateAuthentication(document.RootElement, options); + } + + internal static DataflowOpenTelemetryX509CertificateAuthentication DeserializeDataflowOpenTelemetryX509CertificateAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowEndpointAuthenticationX509 x509CertificateSettings = default; + DataflowOpenTelemetryAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("x509CertificateSettings"u8)) + { + x509CertificateSettings = DataflowEndpointAuthenticationX509.DeserializeDataflowEndpointAuthenticationX509(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new DataflowOpenTelemetryAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DataflowOpenTelemetryX509CertificateAuthentication(method, serializedAdditionalRawData, x509CertificateSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryX509CertificateAuthentication)} does not support writing '{options.Format}' format."); + } + } + + DataflowOpenTelemetryX509CertificateAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowOpenTelemetryX509CertificateAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryX509CertificateAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.cs new file mode 100644 index 000000000000..61b5ba759c8c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/DataflowOpenTelemetryX509CertificateAuthentication.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// DataflowOpenTelemetryX509CertificateAuthentication properties. + public partial class DataflowOpenTelemetryX509CertificateAuthentication : DataflowOpenTelemetryAuthentication + { + /// Initializes a new instance of . + /// X.509 certificate authentication settings. + /// is null. + public DataflowOpenTelemetryX509CertificateAuthentication(DataflowEndpointAuthenticationX509 x509CertificateSettings) + { + Argument.AssertNotNull(x509CertificateSettings, nameof(x509CertificateSettings)); + + X509CertificateSettings = x509CertificateSettings; + Method = DataflowOpenTelemetryAuthenticationMethod.X509Certificate; + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + /// X.509 certificate authentication settings. + internal DataflowOpenTelemetryX509CertificateAuthentication(DataflowOpenTelemetryAuthenticationMethod method, IDictionary serializedAdditionalRawData, DataflowEndpointAuthenticationX509 x509CertificateSettings) : base(method, serializedAdditionalRawData) + { + X509CertificateSettings = x509CertificateSettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal DataflowOpenTelemetryX509CertificateAuthentication() + { + } + + /// X.509 certificate authentication settings. + internal DataflowEndpointAuthenticationX509 X509CertificateSettings { get; set; } + /// Secret reference of the X.509 certificate. + public string X509CertificateSecretRef + { + get => X509CertificateSettings is null ? default : X509CertificateSettings.SecretRef; + set => X509CertificateSettings = new DataflowEndpointAuthenticationX509(value); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.Serialization.cs new file mode 100644 index 000000000000..e4e22fcd3e7c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.Serialization.cs @@ -0,0 +1,159 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class InstanceFeature : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InstanceFeature)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Mode)) + { + writer.WritePropertyName("mode"u8); + writer.WriteStringValue(Mode.Value.ToString()); + } + if (Optional.IsCollectionDefined(Settings)) + { + writer.WritePropertyName("settings"u8); + writer.WriteStartObject(); + foreach (var item in Settings) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value.ToString()); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + InstanceFeature IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InstanceFeature)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInstanceFeature(document.RootElement, options); + } + + internal static InstanceFeature DeserializeInstanceFeature(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InstanceFeatureMode? mode = default; + IDictionary settings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + mode = new InstanceFeatureMode(property.Value.GetString()); + continue; + } + if (property.NameEquals("settings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, new IotOperationsOperationalMode(property0.Value.GetString())); + } + settings = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new InstanceFeature(mode, settings ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(InstanceFeature)} does not support writing '{options.Format}' format."); + } + } + + InstanceFeature IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeInstanceFeature(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InstanceFeature)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.cs new file mode 100644 index 000000000000..7c3a878a78de --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeature.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The features of the AIO Instance. + public partial class InstanceFeature + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public InstanceFeature() + { + Settings = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The state of the feature. + /// The settings of the feature. + /// Keeps track of any properties unknown to the library. + internal InstanceFeature(InstanceFeatureMode? mode, IDictionary settings, IDictionary serializedAdditionalRawData) + { + Mode = mode; + Settings = settings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The state of the feature. + public InstanceFeatureMode? Mode { get; set; } + /// The settings of the feature. + public IDictionary Settings { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeatureMode.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeatureMode.cs new file mode 100644 index 000000000000..f32fc9dcb482 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/InstanceFeatureMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The enum defining mode of a feature. + public readonly partial struct InstanceFeatureMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public InstanceFeatureMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StableValue = "Stable"; + private const string PreviewValue = "Preview"; + private const string DisabledValue = "Disabled"; + + /// Opt in to enable a stable feature. + public static InstanceFeatureMode Stable { get; } = new InstanceFeatureMode(StableValue); + /// Opt in to enable a preview feature. + public static InstanceFeatureMode Preview { get; } = new InstanceFeatureMode(PreviewValue); + /// Opt out of a feature. + public static InstanceFeatureMode Disabled { get; } = new InstanceFeatureMode(DisabledValue); + /// Determines if two values are the same. + public static bool operator ==(InstanceFeatureMode left, InstanceFeatureMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(InstanceFeatureMode left, InstanceFeatureMode right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator InstanceFeatureMode(string value) => new InstanceFeatureMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is InstanceFeatureMode other && Equals(other); + /// + public bool Equals(InstanceFeatureMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.Serialization.cs index e6f3db620ed7..fd525ef35252 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.Serialization.cs @@ -64,6 +64,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("memoryProfile"u8); writer.WriteStringValue(MemoryProfile.Value.ToString()); } + if (Optional.IsDefined(Persistence)) + { + writer.WritePropertyName("persistence"u8); + writer.WriteObjectValue(Persistence, options); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -112,6 +117,7 @@ internal static IotOperationsBrokerProperties DeserializeIotOperationsBrokerProp DiskBackedMessageBuffer diskBackedMessageBuffer = default; GenerateResourceLimits generateResourceLimits = default; BrokerMemoryProfile? memoryProfile = default; + BrokerPersistence persistence = default; IotOperationsProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -171,6 +177,15 @@ internal static IotOperationsBrokerProperties DeserializeIotOperationsBrokerProp memoryProfile = new BrokerMemoryProfile(property.Value.GetString()); continue; } + if (property.NameEquals("persistence"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + persistence = BrokerPersistence.DeserializeBrokerPersistence(property.Value, options); + continue; + } if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -193,6 +208,7 @@ internal static IotOperationsBrokerProperties DeserializeIotOperationsBrokerProp diskBackedMessageBuffer, generateResourceLimits, memoryProfile, + persistence, provisioningState, serializedAdditionalRawData); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.cs index 895aa85c0e2a..ec36538f2b51 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsBrokerProperties.cs @@ -57,9 +57,10 @@ public IotOperationsBrokerProperties() /// Settings of Disk Backed Message Buffer. /// This setting controls whether Kubernetes CPU resource limits are requested. Increasing the number of replicas or workers proportionally increases the amount of CPU resources requested. If this setting is enabled and there are insufficient CPU resources, an error will be emitted. /// Memory profile of Broker. + /// The persistence settings of the Broker. /// The status of the last operation. /// Keeps track of any properties unknown to the library. - internal IotOperationsBrokerProperties(BrokerAdvancedSettings advanced, BrokerCardinality cardinality, BrokerDiagnostics diagnostics, DiskBackedMessageBuffer diskBackedMessageBuffer, GenerateResourceLimits generateResourceLimits, BrokerMemoryProfile? memoryProfile, IotOperationsProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal IotOperationsBrokerProperties(BrokerAdvancedSettings advanced, BrokerCardinality cardinality, BrokerDiagnostics diagnostics, DiskBackedMessageBuffer diskBackedMessageBuffer, GenerateResourceLimits generateResourceLimits, BrokerMemoryProfile? memoryProfile, BrokerPersistence persistence, IotOperationsProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { Advanced = advanced; Cardinality = cardinality; @@ -67,6 +68,7 @@ internal IotOperationsBrokerProperties(BrokerAdvancedSettings advanced, BrokerCa DiskBackedMessageBuffer = diskBackedMessageBuffer; GenerateResourceLimits = generateResourceLimits; MemoryProfile = memoryProfile; + Persistence = persistence; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -95,6 +97,8 @@ public IotOperationsOperationalMode? GenerateResourceLimitsCpu /// Memory profile of Broker. public BrokerMemoryProfile? MemoryProfile { get; set; } + /// The persistence settings of the Broker. + public BrokerPersistence Persistence { get; set; } /// The status of the last operation. public IotOperationsProvisioningState? ProvisioningState { get; } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.Serialization.cs index 45db1c2fe4ce..bc28abf0da2f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.Serialization.cs @@ -36,6 +36,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("endpointType"u8); writer.WriteStringValue(EndpointType.ToString()); + if (Optional.IsDefined(HostType)) + { + writer.WritePropertyName("hostType"u8); + writer.WriteStringValue(HostType.Value.ToString()); + } if (Optional.IsDefined(DataExplorerSettings)) { writer.WritePropertyName("dataExplorerSettings"u8); @@ -66,6 +71,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("mqttSettings"u8); writer.WriteObjectValue(MqttSettings, options); } + if (Optional.IsDefined(OpenTelemetrySettings)) + { + writer.WritePropertyName("openTelemetrySettings"u8); + writer.WriteObjectValue(OpenTelemetrySettings, options); + } if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -109,12 +119,14 @@ internal static IotOperationsDataflowEndpointProperties DeserializeIotOperations return null; } DataflowEndpointType endpointType = default; + DataflowEnpointHostType? hostType = default; DataflowEndpointDataExplorer dataExplorerSettings = default; DataflowEndpointDataLakeStorage dataLakeStorageSettings = default; DataflowEndpointFabricOneLake fabricOneLakeSettings = default; DataflowEndpointKafka kafkaSettings = default; DataflowEndpointLocalStorage localStorageSettings = default; DataflowEndpointMqtt mqttSettings = default; + DataflowEndpointOpenTelemetry openTelemetrySettings = default; IotOperationsProvisioningState? provisioningState = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -125,6 +137,15 @@ internal static IotOperationsDataflowEndpointProperties DeserializeIotOperations endpointType = new DataflowEndpointType(property.Value.GetString()); continue; } + if (property.NameEquals("hostType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hostType = new DataflowEnpointHostType(property.Value.GetString()); + continue; + } if (property.NameEquals("dataExplorerSettings"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -179,6 +200,15 @@ internal static IotOperationsDataflowEndpointProperties DeserializeIotOperations mqttSettings = DataflowEndpointMqtt.DeserializeDataflowEndpointMqtt(property.Value, options); continue; } + if (property.NameEquals("openTelemetrySettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openTelemetrySettings = DataflowEndpointOpenTelemetry.DeserializeDataflowEndpointOpenTelemetry(property.Value, options); + continue; + } if (property.NameEquals("provisioningState"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -196,12 +226,14 @@ internal static IotOperationsDataflowEndpointProperties DeserializeIotOperations serializedAdditionalRawData = rawDataDictionary; return new IotOperationsDataflowEndpointProperties( endpointType, + hostType, dataExplorerSettings, dataLakeStorageSettings, fabricOneLakeSettings, kafkaSettings, localStorageSettings, mqttSettings, + openTelemetrySettings, provisioningState, serializedAdditionalRawData); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.cs index dec808ba0d3b..8e58b56b3848 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsDataflowEndpointProperties.cs @@ -54,23 +54,27 @@ public IotOperationsDataflowEndpointProperties(DataflowEndpointType endpointType /// Initializes a new instance of . /// Endpoint Type. + /// The type of the Kafka host. E.g FabricRT, EventGrid. /// Azure Data Explorer endpoint. /// Azure Data Lake endpoint. /// Microsoft Fabric endpoint. /// Kafka endpoint. /// Local persistent volume endpoint. /// Broker endpoint. + /// OpenTelemetry endpoint. /// The status of the last operation. /// Keeps track of any properties unknown to the library. - internal IotOperationsDataflowEndpointProperties(DataflowEndpointType endpointType, DataflowEndpointDataExplorer dataExplorerSettings, DataflowEndpointDataLakeStorage dataLakeStorageSettings, DataflowEndpointFabricOneLake fabricOneLakeSettings, DataflowEndpointKafka kafkaSettings, DataflowEndpointLocalStorage localStorageSettings, DataflowEndpointMqtt mqttSettings, IotOperationsProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal IotOperationsDataflowEndpointProperties(DataflowEndpointType endpointType, DataflowEnpointHostType? hostType, DataflowEndpointDataExplorer dataExplorerSettings, DataflowEndpointDataLakeStorage dataLakeStorageSettings, DataflowEndpointFabricOneLake fabricOneLakeSettings, DataflowEndpointKafka kafkaSettings, DataflowEndpointLocalStorage localStorageSettings, DataflowEndpointMqtt mqttSettings, DataflowEndpointOpenTelemetry openTelemetrySettings, IotOperationsProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { EndpointType = endpointType; + HostType = hostType; DataExplorerSettings = dataExplorerSettings; DataLakeStorageSettings = dataLakeStorageSettings; FabricOneLakeSettings = fabricOneLakeSettings; KafkaSettings = kafkaSettings; LocalStorageSettings = localStorageSettings; MqttSettings = mqttSettings; + OpenTelemetrySettings = openTelemetrySettings; ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -82,6 +86,8 @@ internal IotOperationsDataflowEndpointProperties() /// Endpoint Type. public DataflowEndpointType EndpointType { get; set; } + /// The type of the Kafka host. E.g FabricRT, EventGrid. + public DataflowEnpointHostType? HostType { get; set; } /// Azure Data Explorer endpoint. public DataflowEndpointDataExplorer DataExplorerSettings { get; set; } /// Azure Data Lake endpoint. @@ -101,6 +107,8 @@ public string LocalStoragePersistentVolumeClaimRef /// Broker endpoint. public DataflowEndpointMqtt MqttSettings { get; set; } + /// OpenTelemetry endpoint. + public DataflowEndpointOpenTelemetry OpenTelemetrySettings { get; set; } /// The status of the last operation. public IotOperationsProvisioningState? ProvisioningState { get; } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.Serialization.cs index 70d86854ae63..960f613594b9 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.Serialization.cs @@ -51,6 +51,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("schemaRegistryRef"u8); writer.WriteObjectValue(SchemaRegistryRef, options); + if (Optional.IsDefined(DefaultSecretProviderClassRef)) + { + writer.WritePropertyName("defaultSecretProviderClassRef"u8); + writer.WriteObjectValue(DefaultSecretProviderClassRef, options); + } + if (Optional.IsCollectionDefined(Features)) + { + writer.WritePropertyName("features"u8); + writer.WriteStartObject(); + foreach (var item in Features) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(AdrNamespaceRef)) + { + writer.WritePropertyName("adrNamespaceRef"u8); + writer.WriteObjectValue(AdrNamespaceRef, options); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -92,6 +113,9 @@ internal static IotOperationsInstanceProperties DeserializeIotOperationsInstance IotOperationsProvisioningState? provisioningState = default; string version = default; SchemaRegistryRef schemaRegistryRef = default; + SecretProviderClassRef defaultSecretProviderClassRef = default; + IDictionary features = default; + AzureDeviceRegistryNamespaceRef adrNamespaceRef = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -120,13 +144,53 @@ internal static IotOperationsInstanceProperties DeserializeIotOperationsInstance schemaRegistryRef = SchemaRegistryRef.DeserializeSchemaRegistryRef(property.Value, options); continue; } + if (property.NameEquals("defaultSecretProviderClassRef"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultSecretProviderClassRef = SecretProviderClassRef.DeserializeSecretProviderClassRef(property.Value, options); + continue; + } + if (property.NameEquals("features"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, InstanceFeature.DeserializeInstanceFeature(property0.Value, options)); + } + features = dictionary; + continue; + } + if (property.NameEquals("adrNamespaceRef"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + adrNamespaceRef = AzureDeviceRegistryNamespaceRef.DeserializeAzureDeviceRegistryNamespaceRef(property.Value, options); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new IotOperationsInstanceProperties(description, provisioningState, version, schemaRegistryRef, serializedAdditionalRawData); + return new IotOperationsInstanceProperties( + description, + provisioningState, + version, + schemaRegistryRef, + defaultSecretProviderClassRef, + features ?? new ChangeTrackingDictionary(), + adrNamespaceRef, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.cs index da45d642b4d5..7f87e9ebf831 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/IotOperationsInstanceProperties.cs @@ -54,6 +54,7 @@ public IotOperationsInstanceProperties(SchemaRegistryRef schemaRegistryRef) Argument.AssertNotNull(schemaRegistryRef, nameof(schemaRegistryRef)); SchemaRegistryRef = schemaRegistryRef; + Features = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -61,13 +62,19 @@ public IotOperationsInstanceProperties(SchemaRegistryRef schemaRegistryRef) /// The status of the last operation. /// The Azure IoT Operations version. /// The reference to the Schema Registry for this AIO Instance. + /// The reference to the AIO Secret provider class. + /// The features of the AIO Instance. + /// The Azure Device Registry Namespace used by Assets, Discovered Assets and devices. /// Keeps track of any properties unknown to the library. - internal IotOperationsInstanceProperties(string description, IotOperationsProvisioningState? provisioningState, string version, SchemaRegistryRef schemaRegistryRef, IDictionary serializedAdditionalRawData) + internal IotOperationsInstanceProperties(string description, IotOperationsProvisioningState? provisioningState, string version, SchemaRegistryRef schemaRegistryRef, SecretProviderClassRef defaultSecretProviderClassRef, IDictionary features, AzureDeviceRegistryNamespaceRef adrNamespaceRef, IDictionary serializedAdditionalRawData) { Description = description; ProvisioningState = provisioningState; Version = version; SchemaRegistryRef = schemaRegistryRef; + DefaultSecretProviderClassRef = defaultSecretProviderClassRef; + Features = features; + AdrNamespaceRef = adrNamespaceRef; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -90,5 +97,25 @@ public ResourceIdentifier SchemaRegistryRefResourceId get => SchemaRegistryRef is null ? default : SchemaRegistryRef.ResourceId; set => SchemaRegistryRef = new SchemaRegistryRef(value); } + + /// The reference to the AIO Secret provider class. + internal SecretProviderClassRef DefaultSecretProviderClassRef { get; set; } + /// The resource ID of the AIO Secret provider class. + public ResourceIdentifier DefaultSecretProviderClassRefResourceId + { + get => DefaultSecretProviderClassRef is null ? default : DefaultSecretProviderClassRef.ResourceId; + set => DefaultSecretProviderClassRef = new SecretProviderClassRef(value); + } + + /// The features of the AIO Instance. + public IDictionary Features { get; } + /// The Azure Device Registry Namespace used by Assets, Discovered Assets and devices. + internal AzureDeviceRegistryNamespaceRef AdrNamespaceRef { get; set; } + /// The resource ID of the Azure Device Registry Namespace. + public ResourceIdentifier AdrNamespaceRefResourceId + { + get => AdrNamespaceRef is null ? default : AdrNamespaceRef.ResourceId; + set => AdrNamespaceRef = new AzureDeviceRegistryNamespaceRef(value); + } } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.Serialization.cs new file mode 100644 index 000000000000..1ae42fa826b9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointAnonymousAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("anonymousSettings"u8); + writer.WriteObjectValue(AnonymousSettings, options); + } + + RegistryEndpointAnonymousAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointAnonymousAuthentication(document.RootElement, options); + } + + internal static RegistryEndpointAnonymousAuthentication DeserializeRegistryEndpointAnonymousAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointAnonymousSettings anonymousSettings = default; + RegistryEndpointAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("anonymousSettings"u8)) + { + anonymousSettings = RegistryEndpointAnonymousSettings.DeserializeRegistryEndpointAnonymousSettings(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new RegistryEndpointAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointAnonymousAuthentication(method, serializedAdditionalRawData, anonymousSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousAuthentication)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointAnonymousAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointAnonymousAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.cs new file mode 100644 index 000000000000..5d52c672a3ab --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousAuthentication.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Anonymous authentication. + public partial class RegistryEndpointAnonymousAuthentication : RegistryEndpointAuthentication + { + /// Initializes a new instance of . + /// Anonymous authentication properties. + /// is null. + public RegistryEndpointAnonymousAuthentication(RegistryEndpointAnonymousSettings anonymousSettings) + { + Argument.AssertNotNull(anonymousSettings, nameof(anonymousSettings)); + + AnonymousSettings = anonymousSettings; + Method = RegistryEndpointAuthenticationMethod.Anonymous; + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + /// Anonymous authentication properties. + internal RegistryEndpointAnonymousAuthentication(RegistryEndpointAuthenticationMethod method, IDictionary serializedAdditionalRawData, RegistryEndpointAnonymousSettings anonymousSettings) : base(method, serializedAdditionalRawData) + { + AnonymousSettings = anonymousSettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointAnonymousAuthentication() + { + } + + /// Anonymous authentication properties. + public RegistryEndpointAnonymousSettings AnonymousSettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.Serialization.cs new file mode 100644 index 000000000000..b440008c2f74 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointAnonymousSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousSettings)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointAnonymousSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointAnonymousSettings(document.RootElement, options); + } + + internal static RegistryEndpointAnonymousSettings DeserializeRegistryEndpointAnonymousSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointAnonymousSettings(serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousSettings)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointAnonymousSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointAnonymousSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointAnonymousSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.cs new file mode 100644 index 000000000000..841c4fabee15 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAnonymousSettings.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// RegistryEndpoint Anonymous authentication properties. + public partial class RegistryEndpointAnonymousSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RegistryEndpointAnonymousSettings() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointAnonymousSettings(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.Serialization.cs new file mode 100644 index 000000000000..f9934351914c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointArtifactPullSecretAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("artifactPullSecretSettings"u8); + writer.WriteObjectValue(ArtifactPullSecretSettings, options); + } + + RegistryEndpointArtifactPullSecretAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointArtifactPullSecretAuthentication(document.RootElement, options); + } + + internal static RegistryEndpointArtifactPullSecretAuthentication DeserializeRegistryEndpointArtifactPullSecretAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointArtifactPullSecretSettings artifactPullSecretSettings = default; + RegistryEndpointAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("artifactPullSecretSettings"u8)) + { + artifactPullSecretSettings = RegistryEndpointArtifactPullSecretSettings.DeserializeRegistryEndpointArtifactPullSecretSettings(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new RegistryEndpointAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointArtifactPullSecretAuthentication(method, serializedAdditionalRawData, artifactPullSecretSettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretAuthentication)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointArtifactPullSecretAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointArtifactPullSecretAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.cs new file mode 100644 index 000000000000..1dad44012042 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretAuthentication.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Artifact Pull Secret authentication. + public partial class RegistryEndpointArtifactPullSecretAuthentication : RegistryEndpointAuthentication + { + /// Initializes a new instance of . + /// Artifact Pull Secret authentication properties. + /// is null. + public RegistryEndpointArtifactPullSecretAuthentication(RegistryEndpointArtifactPullSecretSettings artifactPullSecretSettings) + { + Argument.AssertNotNull(artifactPullSecretSettings, nameof(artifactPullSecretSettings)); + + ArtifactPullSecretSettings = artifactPullSecretSettings; + Method = RegistryEndpointAuthenticationMethod.ArtifactPullSecret; + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + /// Artifact Pull Secret authentication properties. + internal RegistryEndpointArtifactPullSecretAuthentication(RegistryEndpointAuthenticationMethod method, IDictionary serializedAdditionalRawData, RegistryEndpointArtifactPullSecretSettings artifactPullSecretSettings) : base(method, serializedAdditionalRawData) + { + ArtifactPullSecretSettings = artifactPullSecretSettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointArtifactPullSecretAuthentication() + { + } + + /// Artifact Pull Secret authentication properties. + internal RegistryEndpointArtifactPullSecretSettings ArtifactPullSecretSettings { get; set; } + /// The name of the kubernetes secret that contains the artifact pull secret. + public string SecretRef + { + get => ArtifactPullSecretSettings is null ? default : ArtifactPullSecretSettings.SecretRef; + set => ArtifactPullSecretSettings = new RegistryEndpointArtifactPullSecretSettings(value); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.Serialization.cs new file mode 100644 index 000000000000..ded2ec77e10a --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointArtifactPullSecretSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("secretRef"u8); + writer.WriteStringValue(SecretRef); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointArtifactPullSecretSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointArtifactPullSecretSettings(document.RootElement, options); + } + + internal static RegistryEndpointArtifactPullSecretSettings DeserializeRegistryEndpointArtifactPullSecretSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretRef = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretRef"u8)) + { + secretRef = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointArtifactPullSecretSettings(secretRef, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretSettings)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointArtifactPullSecretSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointArtifactPullSecretSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointArtifactPullSecretSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.cs new file mode 100644 index 000000000000..5045edcb11ef --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointArtifactPullSecretSettings.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// RegistryEndpoint Artifact Pull Secret authentication properties. + public partial class RegistryEndpointArtifactPullSecretSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The name of the kubernetes secret that contains the artifact pull secret. + /// is null. + public RegistryEndpointArtifactPullSecretSettings(string secretRef) + { + Argument.AssertNotNull(secretRef, nameof(secretRef)); + + SecretRef = secretRef; + } + + /// Initializes a new instance of . + /// The name of the kubernetes secret that contains the artifact pull secret. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointArtifactPullSecretSettings(string secretRef, IDictionary serializedAdditionalRawData) + { + SecretRef = secretRef; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointArtifactPullSecretSettings() + { + } + + /// The name of the kubernetes secret that contains the artifact pull secret. + public string SecretRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.Serialization.cs new file mode 100644 index 000000000000..32e1184acd7c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.Serialization.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownRegistryEndpointAuthentication))] + public partial class RegistryEndpointAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("method"u8); + writer.WriteStringValue(Method.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointAuthentication(document.RootElement, options); + } + + internal static RegistryEndpointAuthentication DeserializeRegistryEndpointAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("method", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Anonymous": return RegistryEndpointAnonymousAuthentication.DeserializeRegistryEndpointAnonymousAuthentication(element, options); + case "ArtifactPullSecret": return RegistryEndpointArtifactPullSecretAuthentication.DeserializeRegistryEndpointArtifactPullSecretAuthentication(element, options); + case "SystemAssignedManagedIdentity": return RegistryEndpointSystemAssignedIdentityAuthentication.DeserializeRegistryEndpointSystemAssignedIdentityAuthentication(element, options); + case "UserAssignedManagedIdentity": return RegistryEndpointUserAssignedIdentityAuthentication.DeserializeRegistryEndpointUserAssignedIdentityAuthentication(element, options); + } + } + return UnknownRegistryEndpointAuthentication.DeserializeUnknownRegistryEndpointAuthentication(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.cs new file mode 100644 index 000000000000..eccffa1579d0 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthentication.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// Model for RegistryEndpointAuthentication + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + public abstract partial class RegistryEndpointAuthentication + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected RegistryEndpointAuthentication() + { + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointAuthentication(RegistryEndpointAuthenticationMethod method, IDictionary serializedAdditionalRawData) + { + Method = method; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The authentication method. + internal RegistryEndpointAuthenticationMethod Method { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthenticationMethod.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthenticationMethod.cs new file mode 100644 index 000000000000..7fd1cba2dec4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointAuthenticationMethod.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The authentication method. + internal readonly partial struct RegistryEndpointAuthenticationMethod : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RegistryEndpointAuthenticationMethod(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SystemAssignedManagedIdentityValue = "SystemAssignedManagedIdentity"; + private const string UserAssignedManagedIdentityValue = "UserAssignedManagedIdentity"; + private const string AnonymousValue = "Anonymous"; + private const string ArtifactPullSecretValue = "ArtifactPullSecret"; + + /// SystemAssignedManagedIdentity type. + public static RegistryEndpointAuthenticationMethod SystemAssignedManagedIdentity { get; } = new RegistryEndpointAuthenticationMethod(SystemAssignedManagedIdentityValue); + /// UserAssignedManagedIdentity type. + public static RegistryEndpointAuthenticationMethod UserAssignedManagedIdentity { get; } = new RegistryEndpointAuthenticationMethod(UserAssignedManagedIdentityValue); + /// Anonymous Option. + public static RegistryEndpointAuthenticationMethod Anonymous { get; } = new RegistryEndpointAuthenticationMethod(AnonymousValue); + /// Artifact Pull Secret authentication. + public static RegistryEndpointAuthenticationMethod ArtifactPullSecret { get; } = new RegistryEndpointAuthenticationMethod(ArtifactPullSecretValue); + /// Determines if two values are the same. + public static bool operator ==(RegistryEndpointAuthenticationMethod left, RegistryEndpointAuthenticationMethod right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RegistryEndpointAuthenticationMethod left, RegistryEndpointAuthenticationMethod right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RegistryEndpointAuthenticationMethod(string value) => new RegistryEndpointAuthenticationMethod(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RegistryEndpointAuthenticationMethod other && Equals(other); + /// + public bool Equals(RegistryEndpointAuthenticationMethod other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.Serialization.cs new file mode 100644 index 000000000000..0bcc833a5580 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.Serialization.cs @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("host"u8); + writer.WriteStringValue(Host); + writer.WritePropertyName("authentication"u8); + writer.WriteObjectValue(Authentication, options); + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsDefined(TrustSettings)) + { + writer.WritePropertyName("trustSettings"u8); + writer.WriteObjectValue(TrustSettings, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointProperties(document.RootElement, options); + } + + internal static RegistryEndpointProperties DeserializeRegistryEndpointProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string host = default; + RegistryEndpointAuthentication authentication = default; + IotOperationsProvisioningState? provisioningState = default; + RegistryEndpointTrustedSettings trustSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("host"u8)) + { + host = property.Value.GetString(); + continue; + } + if (property.NameEquals("authentication"u8)) + { + authentication = RegistryEndpointAuthentication.DeserializeRegistryEndpointAuthentication(property.Value, options); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new IotOperationsProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("trustSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustSettings = RegistryEndpointTrustedSettings.DeserializeRegistryEndpointTrustedSettings(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointProperties(host, authentication, provisioningState, trustSettings, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointProperties)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.cs new file mode 100644 index 000000000000..eda259dfd71e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointProperties.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// RegistryEndpoint properties. + public partial class RegistryEndpointProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The Container Registry endpoint hostname. + /// + /// The authentication settings for the Azure Container Registry. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// or is null. + public RegistryEndpointProperties(string host, RegistryEndpointAuthentication authentication) + { + Argument.AssertNotNull(host, nameof(host)); + Argument.AssertNotNull(authentication, nameof(authentication)); + + Host = host; + Authentication = authentication; + } + + /// Initializes a new instance of . + /// The Container Registry endpoint hostname. + /// + /// The authentication settings for the Azure Container Registry. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + /// The status of the last operation. + /// Trust settings for the registry endpoint. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointProperties(string host, RegistryEndpointAuthentication authentication, IotOperationsProvisioningState? provisioningState, RegistryEndpointTrustedSettings trustSettings, IDictionary serializedAdditionalRawData) + { + Host = host; + Authentication = authentication; + ProvisioningState = provisioningState; + TrustSettings = trustSettings; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointProperties() + { + } + + /// The Container Registry endpoint hostname. + public string Host { get; set; } + /// + /// The authentication settings for the Azure Container Registry. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include , , and . + /// + public RegistryEndpointAuthentication Authentication { get; set; } + /// The status of the last operation. + public IotOperationsProvisioningState? ProvisioningState { get; } + /// Trust settings for the registry endpoint. + internal RegistryEndpointTrustedSettings TrustSettings { get; set; } + /// + /// The trust properties for the registry endpoint. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public RegistryEndpointTrustedSigningKey TrustTrustedSigningKeys + { + get => TrustSettings is null ? default : TrustSettings.TrustedSigningKeys; + set => TrustSettings = new RegistryEndpointTrustedSettings(value); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.Serialization.cs new file mode 100644 index 000000000000..176bec7e044e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.Serialization.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class RegistryEndpointResourceListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointResourceListResult)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink.AbsoluteUri); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointResourceListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointResourceListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointResourceListResult(document.RootElement, options); + } + + internal static RegistryEndpointResourceListResult DeserializeRegistryEndpointResourceListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + Uri nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(RegistryEndpointResourceData.DeserializeRegistryEndpointResourceData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointResourceListResult(value, nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointResourceListResult)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointResourceListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointResourceListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointResourceListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.cs new file mode 100644 index 000000000000..4688a68a4626 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointResourceListResult.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The response of a RegistryEndpointResource list operation. + internal partial class RegistryEndpointResourceListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The RegistryEndpointResource items on this page. + /// is null. + internal RegistryEndpointResourceListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The RegistryEndpointResource items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointResourceListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointResourceListResult() + { + } + + /// The RegistryEndpointResource items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.Serialization.cs new file mode 100644 index 000000000000..054eed83579d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointSystemAssignedIdentityAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedIdentityAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("systemAssignedManagedIdentitySettings"u8); + writer.WriteObjectValue(SystemAssignedManagedIdentitySettings, options); + } + + RegistryEndpointSystemAssignedIdentityAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedIdentityAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointSystemAssignedIdentityAuthentication(document.RootElement, options); + } + + internal static RegistryEndpointSystemAssignedIdentityAuthentication DeserializeRegistryEndpointSystemAssignedIdentityAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointSystemAssignedManagedIdentitySettings systemAssignedManagedIdentitySettings = default; + RegistryEndpointAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("systemAssignedManagedIdentitySettings"u8)) + { + systemAssignedManagedIdentitySettings = RegistryEndpointSystemAssignedManagedIdentitySettings.DeserializeRegistryEndpointSystemAssignedManagedIdentitySettings(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new RegistryEndpointAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointSystemAssignedIdentityAuthentication(method, serializedAdditionalRawData, systemAssignedManagedIdentitySettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedIdentityAuthentication)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointSystemAssignedIdentityAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointSystemAssignedIdentityAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedIdentityAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.cs new file mode 100644 index 000000000000..546daaef99a9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedIdentityAuthentication.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// System assigned identity authentication. + public partial class RegistryEndpointSystemAssignedIdentityAuthentication : RegistryEndpointAuthentication + { + /// Initializes a new instance of . + /// System assigned managed identity properties. + /// is null. + public RegistryEndpointSystemAssignedIdentityAuthentication(RegistryEndpointSystemAssignedManagedIdentitySettings systemAssignedManagedIdentitySettings) + { + Argument.AssertNotNull(systemAssignedManagedIdentitySettings, nameof(systemAssignedManagedIdentitySettings)); + + SystemAssignedManagedIdentitySettings = systemAssignedManagedIdentitySettings; + Method = RegistryEndpointAuthenticationMethod.SystemAssignedManagedIdentity; + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + /// System assigned managed identity properties. + internal RegistryEndpointSystemAssignedIdentityAuthentication(RegistryEndpointAuthenticationMethod method, IDictionary serializedAdditionalRawData, RegistryEndpointSystemAssignedManagedIdentitySettings systemAssignedManagedIdentitySettings) : base(method, serializedAdditionalRawData) + { + SystemAssignedManagedIdentitySettings = systemAssignedManagedIdentitySettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointSystemAssignedIdentityAuthentication() + { + } + + /// System assigned managed identity properties. + internal RegistryEndpointSystemAssignedManagedIdentitySettings SystemAssignedManagedIdentitySettings { get; set; } + /// Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration. + public string SystemAssignedManagedIdentityAudience + { + get => SystemAssignedManagedIdentitySettings is null ? default : SystemAssignedManagedIdentitySettings.Audience; + set + { + if (SystemAssignedManagedIdentitySettings is null) + SystemAssignedManagedIdentitySettings = new RegistryEndpointSystemAssignedManagedIdentitySettings(); + SystemAssignedManagedIdentitySettings.Audience = value; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.Serialization.cs new file mode 100644 index 000000000000..76c9fc67c920 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.Serialization.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointSystemAssignedManagedIdentitySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedManagedIdentitySettings)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Audience)) + { + writer.WritePropertyName("audience"u8); + writer.WriteStringValue(Audience); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointSystemAssignedManagedIdentitySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedManagedIdentitySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointSystemAssignedManagedIdentitySettings(document.RootElement, options); + } + + internal static RegistryEndpointSystemAssignedManagedIdentitySettings DeserializeRegistryEndpointSystemAssignedManagedIdentitySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string audience = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("audience"u8)) + { + audience = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointSystemAssignedManagedIdentitySettings(audience, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedManagedIdentitySettings)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointSystemAssignedManagedIdentitySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointSystemAssignedManagedIdentitySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointSystemAssignedManagedIdentitySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.cs new file mode 100644 index 000000000000..ff27bfc64da1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointSystemAssignedManagedIdentitySettings.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// System assigned managed identity properties. + public partial class RegistryEndpointSystemAssignedManagedIdentitySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RegistryEndpointSystemAssignedManagedIdentitySettings() + { + } + + /// Initializes a new instance of . + /// Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointSystemAssignedManagedIdentitySettings(string audience, IDictionary serializedAdditionalRawData) + { + Audience = audience; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Audience of the service to authenticate against. Optional; defaults to the audience for Service host configuration. + public string Audience { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.Serialization.cs new file mode 100644 index 000000000000..cf16efa3a321 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class RegistryEndpointTrustedSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("trustedSigningKeys"u8); + writer.WriteObjectValue(TrustedSigningKeys, options); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointTrustedSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointTrustedSettings(document.RootElement, options); + } + + internal static RegistryEndpointTrustedSettings DeserializeRegistryEndpointTrustedSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointTrustedSigningKey trustedSigningKeys = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("trustedSigningKeys"u8)) + { + trustedSigningKeys = RegistryEndpointTrustedSigningKey.DeserializeRegistryEndpointTrustedSigningKey(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointTrustedSettings(trustedSigningKeys, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSettings)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointTrustedSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointTrustedSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.cs new file mode 100644 index 000000000000..5b0d6d4c1af0 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSettings.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// RegistryEndpointTrustedSettings properties. + internal partial class RegistryEndpointTrustedSettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// + /// The trust properties for the registry endpoint. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// is null. + public RegistryEndpointTrustedSettings(RegistryEndpointTrustedSigningKey trustedSigningKeys) + { + Argument.AssertNotNull(trustedSigningKeys, nameof(trustedSigningKeys)); + + TrustedSigningKeys = trustedSigningKeys; + } + + /// Initializes a new instance of . + /// + /// The trust properties for the registry endpoint. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointTrustedSettings(RegistryEndpointTrustedSigningKey trustedSigningKeys, IDictionary serializedAdditionalRawData) + { + TrustedSigningKeys = trustedSigningKeys; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointTrustedSettings() + { + } + + /// + /// The trust properties for the registry endpoint. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public RegistryEndpointTrustedSigningKey TrustedSigningKeys { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.Serialization.cs new file mode 100644 index 000000000000..5fe8805db212 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + [PersistableModelProxy(typeof(UnknownRegistryEndpointTrustedSigningKey))] + public partial class RegistryEndpointTrustedSigningKey : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointTrustedSigningKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointTrustedSigningKey(document.RootElement, options); + } + + internal static RegistryEndpointTrustedSigningKey DeserializeRegistryEndpointTrustedSigningKey(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "ConfigMap": return RegistryEndpointTrustedSigningKeyConfigMap.DeserializeRegistryEndpointTrustedSigningKeyConfigMap(element, options); + case "Secret": return RegistryEndpointTrustedSigningKeySecret.DeserializeRegistryEndpointTrustedSigningKeySecret(element, options); + } + } + return UnknownRegistryEndpointTrustedSigningKey.DeserializeUnknownRegistryEndpointTrustedSigningKey(element, options); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointTrustedSigningKey IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointTrustedSigningKey(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.cs new file mode 100644 index 000000000000..b51e5413dcea --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKey.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// + /// RegistryEndpoint Trust properties + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include and . + /// + public abstract partial class RegistryEndpointTrustedSigningKey + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + protected RegistryEndpointTrustedSigningKey() + { + } + + /// Initializes a new instance of . + /// The trust type for the registry endpoint. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointTrustedSigningKey(RegistryEndpointTrustedSigningKeyType type, IDictionary serializedAdditionalRawData) + { + Type = type; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The trust type for the registry endpoint. + internal RegistryEndpointTrustedSigningKeyType Type { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.Serialization.cs new file mode 100644 index 000000000000..396c9b45fdcd --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointTrustedSigningKeyConfigMap : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeyConfigMap)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("configMapRef"u8); + writer.WriteStringValue(ConfigMapRef); + } + + RegistryEndpointTrustedSigningKeyConfigMap IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeyConfigMap)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointTrustedSigningKeyConfigMap(document.RootElement, options); + } + + internal static RegistryEndpointTrustedSigningKeyConfigMap DeserializeRegistryEndpointTrustedSigningKeyConfigMap(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string configMapRef = default; + RegistryEndpointTrustedSigningKeyType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("configMapRef"u8)) + { + configMapRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new RegistryEndpointTrustedSigningKeyType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointTrustedSigningKeyConfigMap(type, serializedAdditionalRawData, configMapRef); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeyConfigMap)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointTrustedSigningKeyConfigMap IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointTrustedSigningKeyConfigMap(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeyConfigMap)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.cs new file mode 100644 index 000000000000..30380f1d81af --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyConfigMap.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Settings for RegistryEndpoint trust provided through a configmap. + public partial class RegistryEndpointTrustedSigningKeyConfigMap : RegistryEndpointTrustedSigningKey + { + /// Initializes a new instance of . + /// The name of the configmap. + /// is null. + public RegistryEndpointTrustedSigningKeyConfigMap(string configMapRef) + { + Argument.AssertNotNull(configMapRef, nameof(configMapRef)); + + ConfigMapRef = configMapRef; + Type = RegistryEndpointTrustedSigningKeyType.ConfigMap; + } + + /// Initializes a new instance of . + /// The trust type for the registry endpoint. + /// Keeps track of any properties unknown to the library. + /// The name of the configmap. + internal RegistryEndpointTrustedSigningKeyConfigMap(RegistryEndpointTrustedSigningKeyType type, IDictionary serializedAdditionalRawData, string configMapRef) : base(type, serializedAdditionalRawData) + { + ConfigMapRef = configMapRef; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointTrustedSigningKeyConfigMap() + { + } + + /// The name of the configmap. + public string ConfigMapRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.Serialization.cs new file mode 100644 index 000000000000..5130b3b7e0cc --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointTrustedSigningKeySecret : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeySecret)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("secretRef"u8); + writer.WriteStringValue(SecretRef); + } + + RegistryEndpointTrustedSigningKeySecret IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeySecret)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointTrustedSigningKeySecret(document.RootElement, options); + } + + internal static RegistryEndpointTrustedSigningKeySecret DeserializeRegistryEndpointTrustedSigningKeySecret(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string secretRef = default; + RegistryEndpointTrustedSigningKeyType type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("secretRef"u8)) + { + secretRef = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new RegistryEndpointTrustedSigningKeyType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointTrustedSigningKeySecret(type, serializedAdditionalRawData, secretRef); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeySecret)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointTrustedSigningKeySecret IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointTrustedSigningKeySecret(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKeySecret)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.cs new file mode 100644 index 000000000000..51448a52620e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeySecret.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Settings for RegistryEndpoint trust provided through a secret. + public partial class RegistryEndpointTrustedSigningKeySecret : RegistryEndpointTrustedSigningKey + { + /// Initializes a new instance of . + /// The name of the secret. + /// is null. + public RegistryEndpointTrustedSigningKeySecret(string secretRef) + { + Argument.AssertNotNull(secretRef, nameof(secretRef)); + + SecretRef = secretRef; + Type = RegistryEndpointTrustedSigningKeyType.Secret; + } + + /// Initializes a new instance of . + /// The trust type for the registry endpoint. + /// Keeps track of any properties unknown to the library. + /// The name of the secret. + internal RegistryEndpointTrustedSigningKeySecret(RegistryEndpointTrustedSigningKeyType type, IDictionary serializedAdditionalRawData, string secretRef) : base(type, serializedAdditionalRawData) + { + SecretRef = secretRef; + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointTrustedSigningKeySecret() + { + } + + /// The name of the secret. + public string SecretRef { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyType.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyType.cs new file mode 100644 index 000000000000..a76148400f45 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointTrustedSigningKeyType.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// RegistryEndpointTrustedSigningKeyType values. + internal readonly partial struct RegistryEndpointTrustedSigningKeyType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public RegistryEndpointTrustedSigningKeyType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SecretValue = "Secret"; + private const string ConfigMapValue = "ConfigMap"; + + /// Trust settings stored in a Kubernetes Secret. + public static RegistryEndpointTrustedSigningKeyType Secret { get; } = new RegistryEndpointTrustedSigningKeyType(SecretValue); + /// Trust settings stored in a Kubernetes ConfigMap. + public static RegistryEndpointTrustedSigningKeyType ConfigMap { get; } = new RegistryEndpointTrustedSigningKeyType(ConfigMapValue); + /// Determines if two values are the same. + public static bool operator ==(RegistryEndpointTrustedSigningKeyType left, RegistryEndpointTrustedSigningKeyType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(RegistryEndpointTrustedSigningKeyType left, RegistryEndpointTrustedSigningKeyType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator RegistryEndpointTrustedSigningKeyType(string value) => new RegistryEndpointTrustedSigningKeyType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RegistryEndpointTrustedSigningKeyType other && Equals(other); + /// + public bool Equals(RegistryEndpointTrustedSigningKeyType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.Serialization.cs new file mode 100644 index 000000000000..b00fd33ed9a9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.Serialization.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointUserAssignedIdentityAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedIdentityAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("userAssignedManagedIdentitySettings"u8); + writer.WriteObjectValue(UserAssignedManagedIdentitySettings, options); + } + + RegistryEndpointUserAssignedIdentityAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedIdentityAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointUserAssignedIdentityAuthentication(document.RootElement, options); + } + + internal static RegistryEndpointUserAssignedIdentityAuthentication DeserializeRegistryEndpointUserAssignedIdentityAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointUserAssignedManagedIdentitySettings userAssignedManagedIdentitySettings = default; + RegistryEndpointAuthenticationMethod method = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("userAssignedManagedIdentitySettings"u8)) + { + userAssignedManagedIdentitySettings = RegistryEndpointUserAssignedManagedIdentitySettings.DeserializeRegistryEndpointUserAssignedManagedIdentitySettings(property.Value, options); + continue; + } + if (property.NameEquals("method"u8)) + { + method = new RegistryEndpointAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointUserAssignedIdentityAuthentication(method, serializedAdditionalRawData, userAssignedManagedIdentitySettings); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedIdentityAuthentication)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointUserAssignedIdentityAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointUserAssignedIdentityAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedIdentityAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.cs new file mode 100644 index 000000000000..32b7a018a39b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedIdentityAuthentication.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// User assigned identity authentication. + public partial class RegistryEndpointUserAssignedIdentityAuthentication : RegistryEndpointAuthentication + { + /// Initializes a new instance of . + /// User assigned managed identity properties. + /// is null. + public RegistryEndpointUserAssignedIdentityAuthentication(RegistryEndpointUserAssignedManagedIdentitySettings userAssignedManagedIdentitySettings) + { + Argument.AssertNotNull(userAssignedManagedIdentitySettings, nameof(userAssignedManagedIdentitySettings)); + + UserAssignedManagedIdentitySettings = userAssignedManagedIdentitySettings; + Method = RegistryEndpointAuthenticationMethod.UserAssignedManagedIdentity; + } + + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + /// User assigned managed identity properties. + internal RegistryEndpointUserAssignedIdentityAuthentication(RegistryEndpointAuthenticationMethod method, IDictionary serializedAdditionalRawData, RegistryEndpointUserAssignedManagedIdentitySettings userAssignedManagedIdentitySettings) : base(method, serializedAdditionalRawData) + { + UserAssignedManagedIdentitySettings = userAssignedManagedIdentitySettings; + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointUserAssignedIdentityAuthentication() + { + } + + /// User assigned managed identity properties. + public RegistryEndpointUserAssignedManagedIdentitySettings UserAssignedManagedIdentitySettings { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.Serialization.cs new file mode 100644 index 000000000000..ed75fb3be23c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.Serialization.cs @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class RegistryEndpointUserAssignedManagedIdentitySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedManagedIdentitySettings)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("clientId"u8); + writer.WriteStringValue(ClientId); + if (Optional.IsDefined(Scope)) + { + writer.WritePropertyName("scope"u8); + writer.WriteStringValue(Scope); + } + writer.WritePropertyName("tenantId"u8); + writer.WriteStringValue(TenantId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + RegistryEndpointUserAssignedManagedIdentitySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedManagedIdentitySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointUserAssignedManagedIdentitySettings(document.RootElement, options); + } + + internal static RegistryEndpointUserAssignedManagedIdentitySettings DeserializeRegistryEndpointUserAssignedManagedIdentitySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clientId = default; + string scope = default; + string tenantId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clientId"u8)) + { + clientId = property.Value.GetString(); + continue; + } + if (property.NameEquals("scope"u8)) + { + scope = property.Value.GetString(); + continue; + } + if (property.NameEquals("tenantId"u8)) + { + tenantId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointUserAssignedManagedIdentitySettings(clientId, scope, tenantId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedManagedIdentitySettings)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointUserAssignedManagedIdentitySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointUserAssignedManagedIdentitySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointUserAssignedManagedIdentitySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.cs new file mode 100644 index 000000000000..5cf9437dc33f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/RegistryEndpointUserAssignedManagedIdentitySettings.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// User assigned managed identity properties. + public partial class RegistryEndpointUserAssignedManagedIdentitySettings + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Client ID for the user-assigned managed identity. + /// Tenant ID. + /// or is null. + public RegistryEndpointUserAssignedManagedIdentitySettings(string clientId, string tenantId) + { + Argument.AssertNotNull(clientId, nameof(clientId)); + Argument.AssertNotNull(tenantId, nameof(tenantId)); + + ClientId = clientId; + TenantId = tenantId; + } + + /// Initializes a new instance of . + /// Client ID for the user-assigned managed identity. + /// Resource identifier (application ID URI) of the resource, affixed with the .default suffix. + /// Tenant ID. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointUserAssignedManagedIdentitySettings(string clientId, string scope, string tenantId, IDictionary serializedAdditionalRawData) + { + ClientId = clientId; + Scope = scope; + TenantId = tenantId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RegistryEndpointUserAssignedManagedIdentitySettings() + { + } + + /// Client ID for the user-assigned managed identity. + public string ClientId { get; set; } + /// Resource identifier (application ID URI) of the resource, affixed with the .default suffix. + public string Scope { get; set; } + /// Tenant ID. + public string TenantId { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.Serialization.cs new file mode 100644 index 000000000000..438b04e0e2df --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class SecretProviderClassRef : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretProviderClassRef)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + SecretProviderClassRef IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SecretProviderClassRef)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSecretProviderClassRef(document.RootElement, options); + } + + internal static SecretProviderClassRef DeserializeSecretProviderClassRef(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new SecretProviderClassRef(resourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(SecretProviderClassRef)} does not support writing '{options.Format}' format."); + } + } + + SecretProviderClassRef IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeSecretProviderClassRef(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SecretProviderClassRef)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.cs new file mode 100644 index 000000000000..c990b440ac21 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/SecretProviderClassRef.cs @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// The reference to the AIO Secret provider class. + internal partial class SecretProviderClassRef + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// The resource ID of the AIO Secret provider class. + /// is null. + public SecretProviderClassRef(ResourceIdentifier resourceId) + { + Argument.AssertNotNull(resourceId, nameof(resourceId)); + + ResourceId = resourceId; + } + + /// Initializes a new instance of . + /// The resource ID of the AIO Secret provider class. + /// Keeps track of any properties unknown to the library. + internal SecretProviderClassRef(ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal SecretProviderClassRef() + { + } + + /// The resource ID of the AIO Secret provider class. + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.Serialization.cs new file mode 100644 index 000000000000..fb711a57bf6b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriConnectorTemplateAllocation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriConnectorTemplateAllocation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateAllocation(document.RootElement, options); + } + + internal static UnknownAkriConnectorTemplateAllocation DeserializeUnknownAkriConnectorTemplateAllocation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateAllocationPolicy policy = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("policy"u8)) + { + policy = new AkriConnectorTemplateAllocationPolicy(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriConnectorTemplateAllocation(policy, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateAllocation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateAllocation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateAllocation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.cs new file mode 100644 index 000000000000..711c6d7008a1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateAllocation.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriConnectorTemplateAllocation. + internal partial class UnknownAkriConnectorTemplateAllocation : AkriConnectorTemplateAllocation + { + /// Initializes a new instance of . + /// The allocation policy type. + /// Keeps track of any properties unknown to the library. + internal UnknownAkriConnectorTemplateAllocation(AkriConnectorTemplateAllocationPolicy policy, IDictionary serializedAdditionalRawData) : base(policy, serializedAdditionalRawData) + { + Policy = policy; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriConnectorTemplateAllocation() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.Serialization.cs new file mode 100644 index 000000000000..8a389dc840fc --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriConnectorTemplateHelmRegistrySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriConnectorTemplateHelmRegistrySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateHelmRegistrySettings(document.RootElement, options); + } + + internal static UnknownAkriConnectorTemplateHelmRegistrySettings DeserializeUnknownAkriConnectorTemplateHelmRegistrySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateHelmRegistrySettingsType registrySettingsType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registrySettingsType"u8)) + { + registrySettingsType = new AkriConnectorTemplateHelmRegistrySettingsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriConnectorTemplateHelmRegistrySettings(registrySettingsType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateHelmRegistrySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateHelmRegistrySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateHelmRegistrySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.cs new file mode 100644 index 000000000000..7b0a53729485 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateHelmRegistrySettings.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriConnectorTemplateHelmRegistrySettings. + internal partial class UnknownAkriConnectorTemplateHelmRegistrySettings : AkriConnectorTemplateHelmRegistrySettings + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownAkriConnectorTemplateHelmRegistrySettings(AkriConnectorTemplateHelmRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData) : base(registrySettingsType, serializedAdditionalRawData) + { + RegistrySettingsType = registrySettingsType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriConnectorTemplateHelmRegistrySettings() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.Serialization.cs new file mode 100644 index 000000000000..bde244d3876c --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.Serialization.cs @@ -0,0 +1,217 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriConnectorTemplateManagedConfigurationSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriConnectorTemplateManagedConfigurationSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateManagedConfigurationSettings(document.RootElement, options); + } + + internal static UnknownAkriConnectorTemplateManagedConfigurationSettings DeserializeUnknownAkriConnectorTemplateManagedConfigurationSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateManagedConfigurationType managedConfigurationType = "Unknown"; + AkriConnectorTemplateAllocation allocation = default; + IList persistentVolumeClaims = default; + IDictionary additionalConfiguration = default; + IList> persistentVolumeClaimTemplates = default; + IList secrets = default; + AkriConnectorTemplateTrustList trustSettings = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("managedConfigurationType"u8)) + { + managedConfigurationType = new AkriConnectorTemplateManagedConfigurationType(property.Value.GetString()); + continue; + } + if (property.NameEquals("allocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocation = AkriConnectorTemplateAllocation.DeserializeAkriConnectorTemplateAllocation(property.Value, options); + continue; + } + if (property.NameEquals("persistentVolumeClaims"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorTemplatePersistentVolumeClaim.DeserializeAkriConnectorTemplatePersistentVolumeClaim(item, options)); + } + persistentVolumeClaims = array; + continue; + } + if (property.NameEquals("additionalConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property0 in property.Value.EnumerateObject()) + { + dictionary.Add(property0.Name, property0.Value.GetString()); + } + additionalConfiguration = dictionary; + continue; + } + if (property.NameEquals("persistentVolumeClaimTemplates"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List> array = new List>(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + Dictionary dictionary = new Dictionary(); + foreach (var property0 in item.EnumerateObject()) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(property0.Name, null); + } + else + { + dictionary.Add(property0.Name, BinaryData.FromString(property0.Value.GetRawText())); + } + } + array.Add(dictionary); + } + } + persistentVolumeClaimTemplates = array; + continue; + } + if (property.NameEquals("secrets"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(AkriConnectorsSecret.DeserializeAkriConnectorsSecret(item, options)); + } + secrets = array; + continue; + } + if (property.NameEquals("trustSettings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trustSettings = AkriConnectorTemplateTrustList.DeserializeAkriConnectorTemplateTrustList(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriConnectorTemplateManagedConfigurationSettings( + managedConfigurationType, + allocation, + persistentVolumeClaims ?? new ChangeTrackingList(), + additionalConfiguration ?? new ChangeTrackingDictionary(), + persistentVolumeClaimTemplates ?? new ChangeTrackingList>(), + secrets ?? new ChangeTrackingList(), + trustSettings, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateManagedConfigurationSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateManagedConfigurationSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateManagedConfigurationSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.cs new file mode 100644 index 000000000000..18046f50149a --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateManagedConfigurationSettings.cs @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriConnectorTemplateManagedConfigurationSettings. + internal partial class UnknownAkriConnectorTemplateManagedConfigurationSettings : AkriConnectorTemplateManagedConfigurationSettings + { + /// Initializes a new instance of . + /// The type of the managed configuration. + /// + /// Allocation settings for the managed configuration. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + /// The persistent volume claims for the managed configuration. + /// Additional configuration for the image of the managed configuration. + /// + /// The persistent volume claim templates for the managed configuration. + /// See https://raw.githubusercontent.com/kubernetes/kubernetes/refs/heads/master/api/openapi-spec/v3/apis__apps__v1_openapi.json. + /// + /// Connector secrets that will be mounted onto all connector instances. + /// Trust list for the connector. This is used to specify the certificates that all connector instances should trust. + /// Keeps track of any properties unknown to the library. + internal UnknownAkriConnectorTemplateManagedConfigurationSettings(AkriConnectorTemplateManagedConfigurationType managedConfigurationType, AkriConnectorTemplateAllocation allocation, IList persistentVolumeClaims, IDictionary additionalConfiguration, IList> persistentVolumeClaimTemplates, IList secrets, AkriConnectorTemplateTrustList trustSettings, IDictionary serializedAdditionalRawData) : base(managedConfigurationType, allocation, persistentVolumeClaims, additionalConfiguration, persistentVolumeClaimTemplates, secrets, trustSettings, serializedAdditionalRawData) + { + ManagedConfigurationType = managedConfigurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriConnectorTemplateManagedConfigurationSettings() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.Serialization.cs new file mode 100644 index 000000000000..21598ead53da --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriConnectorTemplateRuntimeConfiguration : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriConnectorTemplateRuntimeConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorTemplateRuntimeConfiguration(document.RootElement, options); + } + + internal static UnknownAkriConnectorTemplateRuntimeConfiguration DeserializeUnknownAkriConnectorTemplateRuntimeConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorTemplateRuntimeConfigurationType runtimeConfigurationType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("runtimeConfigurationType"u8)) + { + runtimeConfigurationType = new AkriConnectorTemplateRuntimeConfigurationType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriConnectorTemplateRuntimeConfiguration(runtimeConfigurationType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorTemplateRuntimeConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorTemplateRuntimeConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorTemplateRuntimeConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.cs new file mode 100644 index 000000000000..89d7f2031522 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorTemplateRuntimeConfiguration.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriConnectorTemplateRuntimeConfiguration. + internal partial class UnknownAkriConnectorTemplateRuntimeConfiguration : AkriConnectorTemplateRuntimeConfiguration + { + /// Initializes a new instance of . + /// Runtime configuration type for the Connector template. + /// Keeps track of any properties unknown to the library. + internal UnknownAkriConnectorTemplateRuntimeConfiguration(AkriConnectorTemplateRuntimeConfigurationType runtimeConfigurationType, IDictionary serializedAdditionalRawData) : base(runtimeConfigurationType, serializedAdditionalRawData) + { + RuntimeConfigurationType = runtimeConfigurationType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriConnectorTemplateRuntimeConfiguration() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.Serialization.cs new file mode 100644 index 000000000000..cfec74582928 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriConnectorsMqttAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriConnectorsMqttAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsMqttAuthentication(document.RootElement, options); + } + + internal static UnknownAkriConnectorsMqttAuthentication DeserializeUnknownAkriConnectorsMqttAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorsMqttAuthenticationMethod method = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("method"u8)) + { + method = new AkriConnectorsMqttAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriConnectorsMqttAuthentication(method, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsMqttAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsMqttAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsMqttAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.cs new file mode 100644 index 000000000000..14841d0a507e --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsMqttAuthentication.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriConnectorsMqttAuthentication. + internal partial class UnknownAkriConnectorsMqttAuthentication : AkriConnectorsMqttAuthentication + { + /// Initializes a new instance of . + /// The authentication method for the MQTT connection. + /// Keeps track of any properties unknown to the library. + internal UnknownAkriConnectorsMqttAuthentication(AkriConnectorsMqttAuthenticationMethod method, IDictionary serializedAdditionalRawData) : base(method, serializedAdditionalRawData) + { + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriConnectorsMqttAuthentication() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.Serialization.cs new file mode 100644 index 000000000000..48e215db550d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriConnectorsRegistrySettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriConnectorsRegistrySettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsRegistrySettings(document.RootElement, options); + } + + internal static UnknownAkriConnectorsRegistrySettings DeserializeUnknownAkriConnectorsRegistrySettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorsRegistrySettingsType registrySettingsType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("registrySettingsType"u8)) + { + registrySettingsType = new AkriConnectorsRegistrySettingsType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriConnectorsRegistrySettings(registrySettingsType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsRegistrySettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsRegistrySettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsRegistrySettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.cs new file mode 100644 index 000000000000..295258c2f015 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsRegistrySettings.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriConnectorsRegistrySettings. + internal partial class UnknownAkriConnectorsRegistrySettings : AkriConnectorsRegistrySettings + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownAkriConnectorsRegistrySettings(AkriConnectorsRegistrySettingsType registrySettingsType, IDictionary serializedAdditionalRawData) : base(registrySettingsType, serializedAdditionalRawData) + { + RegistrySettingsType = registrySettingsType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriConnectorsRegistrySettings() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.Serialization.cs new file mode 100644 index 000000000000..47c32b4c300f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriConnectorsTagDigestSettings : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriConnectorsTagDigestSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriConnectorsTagDigestSettings(document.RootElement, options); + } + + internal static UnknownAkriConnectorsTagDigestSettings DeserializeUnknownAkriConnectorsTagDigestSettings(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriConnectorsTagDigestType tagDigestType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tagDigestType"u8)) + { + tagDigestType = new AkriConnectorsTagDigestType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriConnectorsTagDigestSettings(tagDigestType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support writing '{options.Format}' format."); + } + } + + AkriConnectorsTagDigestSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriConnectorsTagDigestSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriConnectorsTagDigestSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.cs new file mode 100644 index 000000000000..5f2baf58d19f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriConnectorsTagDigestSettings.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriConnectorsTagDigestSettings. + internal partial class UnknownAkriConnectorsTagDigestSettings : AkriConnectorsTagDigestSettings + { + /// Initializes a new instance of . + /// The tag or digest type. + /// Keeps track of any properties unknown to the library. + internal UnknownAkriConnectorsTagDigestSettings(AkriConnectorsTagDigestType tagDigestType, IDictionary serializedAdditionalRawData) : base(tagDigestType, serializedAdditionalRawData) + { + TagDigestType = tagDigestType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriConnectorsTagDigestSettings() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.Serialization.cs new file mode 100644 index 000000000000..23718b0659c1 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownAkriDiscoveryHandlerSchedule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + AkriDiscoveryHandlerSchedule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAkriDiscoveryHandlerSchedule(document.RootElement, options); + } + + internal static UnknownAkriDiscoveryHandlerSchedule DeserializeUnknownAkriDiscoveryHandlerSchedule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AkriDiscoveryHandlerScheduleType scheduleType = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("scheduleType"u8)) + { + scheduleType = new AkriDiscoveryHandlerScheduleType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownAkriDiscoveryHandlerSchedule(scheduleType, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support writing '{options.Format}' format."); + } + } + + AkriDiscoveryHandlerSchedule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAkriDiscoveryHandlerSchedule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AkriDiscoveryHandlerSchedule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.cs new file mode 100644 index 000000000000..d7864273cc36 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownAkriDiscoveryHandlerSchedule.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of AkriDiscoveryHandlerSchedule. + internal partial class UnknownAkriDiscoveryHandlerSchedule : AkriDiscoveryHandlerSchedule + { + /// Initializes a new instance of . + /// Schedule type. + /// Keeps track of any properties unknown to the library. + internal UnknownAkriDiscoveryHandlerSchedule(AkriDiscoveryHandlerScheduleType scheduleType, IDictionary serializedAdditionalRawData) : base(scheduleType, serializedAdditionalRawData) + { + ScheduleType = scheduleType; + } + + /// Initializes a new instance of for deserialization. + internal UnknownAkriDiscoveryHandlerSchedule() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.Serialization.cs new file mode 100644 index 000000000000..ce879f30407d --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownBrokerRetainMessagesPolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BrokerRetainMessagesPolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerRetainMessagesPolicy(document.RootElement, options); + } + + internal static UnknownBrokerRetainMessagesPolicy DeserializeUnknownBrokerRetainMessagesPolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerPersistencePolicyMode mode = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new BrokerPersistencePolicyMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBrokerRetainMessagesPolicy(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerRetainMessagesPolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerRetainMessagesPolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerRetainMessagesPolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.cs new file mode 100644 index 000000000000..ad97218d5072 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerRetainMessagesPolicy.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of BrokerRetainMessagesPolicy. + internal partial class UnknownBrokerRetainMessagesPolicy : BrokerRetainMessagesPolicy + { + /// Initializes a new instance of . + /// 'All' to persist all retain messages, 'None' to not persist any, 'Custom' to persist only the specified topics. + /// Keeps track of any properties unknown to the library. + internal UnknownBrokerRetainMessagesPolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData) : base(mode, serializedAdditionalRawData) + { + Mode = mode; + } + + /// Initializes a new instance of for deserialization. + internal UnknownBrokerRetainMessagesPolicy() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.Serialization.cs new file mode 100644 index 000000000000..5dca70e99050 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownBrokerStateStorePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BrokerStateStorePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerStateStorePolicy(document.RootElement, options); + } + + internal static UnknownBrokerStateStorePolicy DeserializeUnknownBrokerStateStorePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerPersistencePolicyMode mode = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new BrokerPersistencePolicyMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBrokerStateStorePolicy(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerStateStorePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerStateStorePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerStateStorePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.cs new file mode 100644 index 000000000000..84511e4c246f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerStateStorePolicy.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of BrokerStateStorePolicy. + internal partial class UnknownBrokerStateStorePolicy : BrokerStateStorePolicy + { + /// Initializes a new instance of . + /// 'All' to persist all keys, 'None' to not persist any, 'Custom' to persist only the specified keys. + /// Keeps track of any properties unknown to the library. + internal UnknownBrokerStateStorePolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData) : base(mode, serializedAdditionalRawData) + { + Mode = mode; + } + + /// Initializes a new instance of for deserialization. + internal UnknownBrokerStateStorePolicy() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.Serialization.cs new file mode 100644 index 000000000000..2bcce7c10317 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownBrokerSubscriberQueuePolicy : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + BrokerSubscriberQueuePolicy IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeBrokerSubscriberQueuePolicy(document.RootElement, options); + } + + internal static UnknownBrokerSubscriberQueuePolicy DeserializeUnknownBrokerSubscriberQueuePolicy(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + BrokerPersistencePolicyMode mode = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mode"u8)) + { + mode = new BrokerPersistencePolicyMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownBrokerSubscriberQueuePolicy(mode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support writing '{options.Format}' format."); + } + } + + BrokerSubscriberQueuePolicy IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeBrokerSubscriberQueuePolicy(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(BrokerSubscriberQueuePolicy)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.cs new file mode 100644 index 000000000000..d965de76faa5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownBrokerSubscriberQueuePolicy.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of BrokerSubscriberQueuePolicy. + internal partial class UnknownBrokerSubscriberQueuePolicy : BrokerSubscriberQueuePolicy + { + /// Initializes a new instance of . + /// 'All' to persist all subscriber queues, 'None' to not persist any, 'Custom' to persist only the specified queues. + /// Keeps track of any properties unknown to the library. + internal UnknownBrokerSubscriberQueuePolicy(BrokerPersistencePolicyMode mode, IDictionary serializedAdditionalRawData) : base(mode, serializedAdditionalRawData) + { + Mode = mode; + } + + /// Initializes a new instance of for deserialization. + internal UnknownBrokerSubscriberQueuePolicy() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.Serialization.cs new file mode 100644 index 000000000000..15ff7aa3e12b --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownDataflowGraphNode : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataflowGraphNode IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowGraphNode(document.RootElement, options); + } + + internal static UnknownDataflowGraphNode DeserializeUnknownDataflowGraphNode(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + DataflowGraphNodeType type = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new DataflowGraphNodeType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataflowGraphNode(name, type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support writing '{options.Format}' format."); + } + } + + DataflowGraphNode IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowGraphNode(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowGraphNode)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.cs new file mode 100644 index 000000000000..42f2a8550b39 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowGraphNode.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of DataflowGraphNode. + internal partial class UnknownDataflowGraphNode : DataflowGraphNode + { + /// Initializes a new instance of . + /// Name of the node. + /// Type of the node. + /// Keeps track of any properties unknown to the library. + internal UnknownDataflowGraphNode(string name, DataflowGraphNodeType type, IDictionary serializedAdditionalRawData) : base(name, type, serializedAdditionalRawData) + { + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataflowGraphNode() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.Serialization.cs new file mode 100644 index 000000000000..e666c5ae85a4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownDataflowOpenTelemetryAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + DataflowOpenTelemetryAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataflowOpenTelemetryAuthentication(document.RootElement, options); + } + + internal static UnknownDataflowOpenTelemetryAuthentication DeserializeUnknownDataflowOpenTelemetryAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataflowOpenTelemetryAuthenticationMethod method = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("method"u8)) + { + method = new DataflowOpenTelemetryAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownDataflowOpenTelemetryAuthentication(method, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support writing '{options.Format}' format."); + } + } + + DataflowOpenTelemetryAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataflowOpenTelemetryAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataflowOpenTelemetryAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.cs new file mode 100644 index 000000000000..3d4292dda571 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownDataflowOpenTelemetryAuthentication.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of DataflowOpenTelemetryAuthentication. + internal partial class UnknownDataflowOpenTelemetryAuthentication : DataflowOpenTelemetryAuthentication + { + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + internal UnknownDataflowOpenTelemetryAuthentication(DataflowOpenTelemetryAuthenticationMethod method, IDictionary serializedAdditionalRawData) : base(method, serializedAdditionalRawData) + { + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal UnknownDataflowOpenTelemetryAuthentication() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.Serialization.cs new file mode 100644 index 000000000000..677d4d27c7a2 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownRegistryEndpointAuthentication : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + RegistryEndpointAuthentication IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointAuthentication(document.RootElement, options); + } + + internal static UnknownRegistryEndpointAuthentication DeserializeUnknownRegistryEndpointAuthentication(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointAuthenticationMethod method = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("method"u8)) + { + method = new RegistryEndpointAuthenticationMethod(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownRegistryEndpointAuthentication(method, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointAuthentication IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointAuthentication(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointAuthentication)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.cs new file mode 100644 index 000000000000..d27a8d209473 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointAuthentication.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of RegistryEndpointAuthentication. + internal partial class UnknownRegistryEndpointAuthentication : RegistryEndpointAuthentication + { + /// Initializes a new instance of . + /// The authentication method. + /// Keeps track of any properties unknown to the library. + internal UnknownRegistryEndpointAuthentication(RegistryEndpointAuthenticationMethod method, IDictionary serializedAdditionalRawData) : base(method, serializedAdditionalRawData) + { + Method = method; + } + + /// Initializes a new instance of for deserialization. + internal UnknownRegistryEndpointAuthentication() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.Serialization.cs new file mode 100644 index 000000000000..a6eea932453a --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.Serialization.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + internal partial class UnknownRegistryEndpointTrustedSigningKey : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + RegistryEndpointTrustedSigningKey IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointTrustedSigningKey(document.RootElement, options); + } + + internal static UnknownRegistryEndpointTrustedSigningKey DeserializeUnknownRegistryEndpointTrustedSigningKey(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointTrustedSigningKeyType type = "Unknown"; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new RegistryEndpointTrustedSigningKeyType(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownRegistryEndpointTrustedSigningKey(type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointTrustedSigningKey IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointTrustedSigningKey(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointTrustedSigningKey)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.cs new file mode 100644 index 000000000000..04d934157ef7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/UnknownRegistryEndpointTrustedSigningKey.cs @@ -0,0 +1,29 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// Unknown version of RegistryEndpointTrustedSigningKey. + internal partial class UnknownRegistryEndpointTrustedSigningKey : RegistryEndpointTrustedSigningKey + { + /// Initializes a new instance of . + /// The trust type for the registry endpoint. + /// Keeps track of any properties unknown to the library. + internal UnknownRegistryEndpointTrustedSigningKey(RegistryEndpointTrustedSigningKeyType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal UnknownRegistryEndpointTrustedSigningKey() + { + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.Serialization.cs index e13fbb05a339..8988b52dd692 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.Serialization.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.Serialization.cs @@ -56,6 +56,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WriteEndObject(); } + if (Optional.IsCollectionDefined(Claims)) + { + writer.WritePropertyName("claims"u8); + writer.WriteStartArray(); + foreach (var item in Claims) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -95,6 +105,7 @@ internal static VolumeClaimResourceRequirements DeserializeVolumeClaimResourceRe } IDictionary limits = default; IDictionary requests = default; + IList claims = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -127,13 +138,27 @@ internal static VolumeClaimResourceRequirements DeserializeVolumeClaimResourceRe requests = dictionary; continue; } + if (property.NameEquals("claims"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(VolumeClaimResourceRequirementsClaims.DeserializeVolumeClaimResourceRequirementsClaims(item, options)); + } + claims = array; + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new VolumeClaimResourceRequirements(limits ?? new ChangeTrackingDictionary(), requests ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); + return new VolumeClaimResourceRequirements(limits ?? new ChangeTrackingDictionary(), requests ?? new ChangeTrackingDictionary(), claims ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.cs index ee277898596a..15fc9d5439d7 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirements.cs @@ -50,16 +50,25 @@ public VolumeClaimResourceRequirements() { Limits = new ChangeTrackingDictionary(); Requests = new ChangeTrackingDictionary(); + Claims = new ChangeTrackingList(); } /// Initializes a new instance of . /// Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/. /// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/. + /// + /// Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + /// + /// This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + /// + /// This field is immutable. It can only be set for containers. + /// /// Keeps track of any properties unknown to the library. - internal VolumeClaimResourceRequirements(IDictionary limits, IDictionary requests, IDictionary serializedAdditionalRawData) + internal VolumeClaimResourceRequirements(IDictionary limits, IDictionary requests, IList claims, IDictionary serializedAdditionalRawData) { Limits = limits; Requests = requests; + Claims = claims; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -67,5 +76,13 @@ internal VolumeClaimResourceRequirements(IDictionary limits, IDi public IDictionary Limits { get; } /// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/. public IDictionary Requests { get; } + /// + /// Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container. + /// + /// This is an alpha field and requires enabling the DynamicResourceAllocation feature gate. + /// + /// This field is immutable. It can only be set for containers. + /// + public IList Claims { get; } } } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.Serialization.cs new file mode 100644 index 000000000000..fcd7cd0430ac --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.IotOperations.Models +{ + public partial class VolumeClaimResourceRequirementsClaims : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VolumeClaimResourceRequirementsClaims)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + VolumeClaimResourceRequirementsClaims IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(VolumeClaimResourceRequirementsClaims)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVolumeClaimResourceRequirementsClaims(document.RootElement, options); + } + + internal static VolumeClaimResourceRequirementsClaims DeserializeVolumeClaimResourceRequirementsClaims(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new VolumeClaimResourceRequirementsClaims(name, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(VolumeClaimResourceRequirementsClaims)} does not support writing '{options.Format}' format."); + } + } + + VolumeClaimResourceRequirementsClaims IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeVolumeClaimResourceRequirementsClaims(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VolumeClaimResourceRequirementsClaims)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.cs new file mode 100644 index 000000000000..d46981cf3997 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/Models/VolumeClaimResourceRequirementsClaims.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.IotOperations.Models +{ + /// VolumeClaimResourceRequirementsClaims properties. + public partial class VolumeClaimResourceRequirementsClaims + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Name of the resource. This must match the name of a resource in spec.resourceClaims. + /// is null. + public VolumeClaimResourceRequirementsClaims(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// Name of the resource. This must match the name of a resource in spec.resourceClaims. + /// Keeps track of any properties unknown to the library. + internal VolumeClaimResourceRequirementsClaims(string name, IDictionary serializedAdditionalRawData) + { + Name = name; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal VolumeClaimResourceRequirementsClaims() + { + } + + /// Name of the resource. This must match the name of a resource in spec.resourceClaims. + public string Name { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.Serialization.cs new file mode 100644 index 000000000000..c98db9599768 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class RegistryEndpointResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + RegistryEndpointResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerIotOperationsContext.Default); + + RegistryEndpointResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerIotOperationsContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.cs new file mode 100644 index 000000000000..7b9a1e54b3f5 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResource.cs @@ -0,0 +1,347 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A Class representing a RegistryEndpointResource along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetRegistryEndpointResource method. + /// Otherwise you can get one from its parent resource using the GetRegistryEndpointResource method. + /// + public partial class RegistryEndpointResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The instanceName. + /// The registryEndpointName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _registryEndpointResourceRegistryEndpointClientDiagnostics; + private readonly RegistryEndpointRestOperations _registryEndpointResourceRegistryEndpointRestClient; + private readonly RegistryEndpointResourceData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.IoTOperations/instances/registryEndpoints"; + + /// Initializes a new instance of the class for mocking. + protected RegistryEndpointResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal RegistryEndpointResource(ArmClient client, RegistryEndpointResourceData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal RegistryEndpointResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _registryEndpointResourceRegistryEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string registryEndpointResourceRegistryEndpointApiVersion); + _registryEndpointResourceRegistryEndpointRestClient = new RegistryEndpointRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, registryEndpointResourceRegistryEndpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual RegistryEndpointResourceData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Get a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResource.Get"); + scope.Start(); + try + { + var response = await _registryEndpointResourceRegistryEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistryEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResource.Get"); + scope.Start(); + try + { + var response = _registryEndpointResourceRegistryEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistryEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResource.Delete"); + scope.Start(); + try + { + var response = await _registryEndpointResourceRegistryEndpointRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(_registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, _registryEndpointResourceRegistryEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Delete + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResource.Delete"); + scope.Start(); + try + { + var response = _registryEndpointResourceRegistryEndpointRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new IotOperationsArmOperation(_registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, _registryEndpointResourceRegistryEndpointRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, RegistryEndpointResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResource.Update"); + scope.Start(); + try + { + var response = await _registryEndpointResourceRegistryEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new RegistryEndpointResourceOperationSource(Client), _registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, _registryEndpointResourceRegistryEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Resource create parameters. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, RegistryEndpointResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResource.Update"); + scope.Start(); + try + { + var response = _registryEndpointResourceRegistryEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data, cancellationToken); + var operation = new IotOperationsArmOperation(new RegistryEndpointResourceOperationSource(Client), _registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, _registryEndpointResourceRegistryEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceCollection.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceCollection.cs new file mode 100644 index 000000000000..065cb61a6c40 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceCollection.cs @@ -0,0 +1,493 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetRegistryEndpointResources method from an instance of . + /// + public partial class RegistryEndpointResourceCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _registryEndpointResourceRegistryEndpointClientDiagnostics; + private readonly RegistryEndpointRestOperations _registryEndpointResourceRegistryEndpointRestClient; + + /// Initializes a new instance of the class for mocking. + protected RegistryEndpointResourceCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal RegistryEndpointResourceCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _registryEndpointResourceRegistryEndpointClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.IotOperations", RegistryEndpointResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(RegistryEndpointResource.ResourceType, out string registryEndpointResourceRegistryEndpointApiVersion); + _registryEndpointResourceRegistryEndpointRestClient = new RegistryEndpointRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, registryEndpointResourceRegistryEndpointApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != IotOperationsInstanceResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, IotOperationsInstanceResource.ResourceType), nameof(id)); + } + + /// + /// Create a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of RegistryEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string registryEndpointName, RegistryEndpointResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _registryEndpointResourceRegistryEndpointRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, data, cancellationToken).ConfigureAwait(false); + var operation = new IotOperationsArmOperation(new RegistryEndpointResourceOperationSource(Client), _registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, _registryEndpointResourceRegistryEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// Name of RegistryEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string registryEndpointName, RegistryEndpointResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _registryEndpointResourceRegistryEndpointRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, data, cancellationToken); + var operation = new IotOperationsArmOperation(new RegistryEndpointResourceOperationSource(Client), _registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, _registryEndpointResourceRegistryEndpointRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.Get"); + scope.Start(); + try + { + var response = await _registryEndpointResourceRegistryEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistryEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a RegistryEndpointResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.Get"); + scope.Start(); + try + { + var response = _registryEndpointResourceRegistryEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new RegistryEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List RegistryEndpointResource resources by InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints + /// + /// + /// Operation Id + /// RegistryEndpointResource_ListByInstanceResource + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _registryEndpointResourceRegistryEndpointRestClient.CreateListByInstanceResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _registryEndpointResourceRegistryEndpointRestClient.CreateListByInstanceResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new RegistryEndpointResource(Client, RegistryEndpointResourceData.DeserializeRegistryEndpointResourceData(e)), _registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, "RegistryEndpointResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List RegistryEndpointResource resources by InstanceResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints + /// + /// + /// Operation Id + /// RegistryEndpointResource_ListByInstanceResource + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _registryEndpointResourceRegistryEndpointRestClient.CreateListByInstanceResourceRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _registryEndpointResourceRegistryEndpointRestClient.CreateListByInstanceResourceNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new RegistryEndpointResource(Client, RegistryEndpointResourceData.DeserializeRegistryEndpointResourceData(e)), _registryEndpointResourceRegistryEndpointClientDiagnostics, Pipeline, "RegistryEndpointResourceCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.Exists"); + scope.Start(); + try + { + var response = await _registryEndpointResourceRegistryEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.Exists"); + scope.Start(); + try + { + var response = _registryEndpointResourceRegistryEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _registryEndpointResourceRegistryEndpointRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RegistryEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTOperations/instances/{instanceName}/registryEndpoints/{registryEndpointName} + /// + /// + /// Operation Id + /// RegistryEndpointResource_Get + /// + /// + /// Default Api Version + /// 2025-07-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var scope = _registryEndpointResourceRegistryEndpointClientDiagnostics.CreateScope("RegistryEndpointResourceCollection.GetIfExists"); + scope.Start(); + try + { + var response = _registryEndpointResourceRegistryEndpointRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, registryEndpointName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new RegistryEndpointResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.Serialization.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.Serialization.cs new file mode 100644 index 000000000000..7de722a105d7 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.Serialization.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + public partial class RegistryEndpointResourceData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointResourceData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsDefined(ExtendedLocation)) + { + writer.WritePropertyName("extendedLocation"u8); + writer.WriteObjectValue(ExtendedLocation, options); + } + } + + RegistryEndpointResourceData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RegistryEndpointResourceData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRegistryEndpointResourceData(document.RootElement, options); + } + + internal static RegistryEndpointResourceData DeserializeRegistryEndpointResourceData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RegistryEndpointProperties properties = default; + IotOperationsExtendedLocation extendedLocation = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = RegistryEndpointProperties.DeserializeRegistryEndpointProperties(property.Value, options); + continue; + } + if (property.NameEquals("extendedLocation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + extendedLocation = IotOperationsExtendedLocation.DeserializeIotOperationsExtendedLocation(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RegistryEndpointResourceData( + id, + name, + type, + systemData, + properties, + extendedLocation, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureResourceManagerIotOperationsContext.Default); + default: + throw new FormatException($"The model {nameof(RegistryEndpointResourceData)} does not support writing '{options.Format}' format."); + } + } + + RegistryEndpointResourceData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeRegistryEndpointResourceData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RegistryEndpointResourceData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.cs new file mode 100644 index 000000000000..0c86418c0a4f --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RegistryEndpointResourceData.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.IotOperations.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.IotOperations +{ + /// + /// A class representing the RegistryEndpointResource data model. + /// RegistryEndpoint resource + /// + public partial class RegistryEndpointResourceData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public RegistryEndpointResourceData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Edge location of the resource. + /// Keeps track of any properties unknown to the library. + internal RegistryEndpointResourceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, RegistryEndpointProperties properties, IotOperationsExtendedLocation extendedLocation, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + ExtendedLocation = extendedLocation; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public RegistryEndpointProperties Properties { get; set; } + /// Edge location of the resource. + public IotOperationsExtendedLocation ExtendedLocation { get; set; } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorRestOperations.cs new file mode 100644 index 000000000000..0f30158cada4 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorRestOperations.cs @@ -0,0 +1,549 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.IotOperations.Models; + +namespace Azure.ResourceManager.IotOperations +{ + internal partial class AkriConnectorRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AkriConnectorRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AkriConnectorRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors/", false); + uri.AppendPath(akriConnectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors/", false); + uri.AppendPath(akriConnectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AkriConnectorResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriConnectorResourceData.DeserializeAkriConnectorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AkriConnectorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AkriConnectorResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriConnectorResourceData.DeserializeAkriConnectorResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AkriConnectorResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, AkriConnectorResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors/", false); + uri.AppendPath(akriConnectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, AkriConnectorResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors/", false); + uri.AppendPath(akriConnectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a AkriConnectorResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Name of AkriConnector resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, AkriConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a AkriConnectorResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Name of AkriConnector resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, AkriConnectorResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors/", false); + uri.AppendPath(akriConnectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors/", false); + uri.AppendPath(akriConnectorName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a AkriConnectorResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a AkriConnectorResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Name of AkriConnector resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, string akriConnectorName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNullOrEmpty(akriConnectorName, nameof(akriConnectorName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, akriConnectorName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByTemplateRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByTemplateRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendPath("/akriConnectors", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AkriConnectorResource resources by AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByTemplateAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateListByTemplateRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriConnectorResourceListResult.DeserializeAkriConnectorResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AkriConnectorResource resources by AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByTemplate(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateListByTemplateRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriConnectorResourceListResult.DeserializeAkriConnectorResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByTemplateNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByTemplateNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AkriConnectorResource resources by AkriConnectorTemplateResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByTemplateNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateListByTemplateNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriConnectorResourceListResult.DeserializeAkriConnectorResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AkriConnectorResource resources by AkriConnectorTemplateResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByTemplateNextPage(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateListByTemplateNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriConnectorResourceListResult.DeserializeAkriConnectorResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorTemplateRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorTemplateRestOperations.cs new file mode 100644 index 000000000000..3454def06ce9 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriConnectorTemplateRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.IotOperations.Models; + +namespace Azure.ResourceManager.IotOperations +{ + internal partial class AkriConnectorTemplateRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AkriConnectorTemplateRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AkriConnectorTemplateRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorTemplateResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriConnectorTemplateResourceData.DeserializeAkriConnectorTemplateResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AkriConnectorTemplateResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorTemplateResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriConnectorTemplateResourceData.DeserializeAkriConnectorTemplateResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AkriConnectorTemplateResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, AkriConnectorTemplateResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, AkriConnectorTemplateResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, AkriConnectorTemplateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, AkriConnectorTemplateResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates/", false); + uri.AppendPath(akriConnectorTemplateName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a AkriConnectorTemplateResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriConnectorTemplate resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string instanceName, string akriConnectorTemplateName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriConnectorTemplateName, nameof(akriConnectorTemplateName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, akriConnectorTemplateName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceResourceRequestUri(string subscriptionId, string resourceGroupName, string instanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByInstanceResourceRequest(string subscriptionId, string resourceGroupName, string instanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriConnectorTemplates", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AkriConnectorTemplateResource resources by InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceResourceAsync(string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceRequest(subscriptionId, resourceGroupName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorTemplateResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriConnectorTemplateResourceListResult.DeserializeAkriConnectorTemplateResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AkriConnectorTemplateResource resources by InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstanceResource(string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceRequest(subscriptionId, resourceGroupName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorTemplateResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriConnectorTemplateResourceListResult.DeserializeAkriConnectorTemplateResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceResourceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string instanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByInstanceResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string instanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AkriConnectorTemplateResource resources by InstanceResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorTemplateResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriConnectorTemplateResourceListResult.DeserializeAkriConnectorTemplateResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AkriConnectorTemplateResource resources by InstanceResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstanceResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriConnectorTemplateResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriConnectorTemplateResourceListResult.DeserializeAkriConnectorTemplateResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriDiscoveryHandlerRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriDiscoveryHandlerRestOperations.cs new file mode 100644 index 000000000000..31fdae68fd84 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/AkriDiscoveryHandlerRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.IotOperations.Models; + +namespace Azure.ResourceManager.IotOperations +{ + internal partial class AkriDiscoveryHandlerRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AkriDiscoveryHandlerRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public AkriDiscoveryHandlerRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers/", false); + uri.AppendPath(akriDiscoveryHandlerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers/", false); + uri.AppendPath(akriDiscoveryHandlerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a AkriDiscoveryHandlerResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriDiscoveryHandlerResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriDiscoveryHandlerResourceData.DeserializeAkriDiscoveryHandlerResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AkriDiscoveryHandlerResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a AkriDiscoveryHandlerResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriDiscoveryHandlerResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriDiscoveryHandlerResourceData.DeserializeAkriDiscoveryHandlerResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((AkriDiscoveryHandlerResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, AkriDiscoveryHandlerResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers/", false); + uri.AppendPath(akriDiscoveryHandlerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, AkriDiscoveryHandlerResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers/", false); + uri.AppendPath(akriDiscoveryHandlerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a AkriDiscoveryHandlerResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriDiscoveryHandler resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, AkriDiscoveryHandlerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a AkriDiscoveryHandlerResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriDiscoveryHandler resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, AkriDiscoveryHandlerResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers/", false); + uri.AppendPath(akriDiscoveryHandlerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers/", false); + uri.AppendPath(akriDiscoveryHandlerName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a AkriDiscoveryHandlerResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a AkriDiscoveryHandlerResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of AkriDiscoveryHandler resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string instanceName, string akriDiscoveryHandlerName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(akriDiscoveryHandlerName, nameof(akriDiscoveryHandlerName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, akriDiscoveryHandlerName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceResourceRequestUri(string subscriptionId, string resourceGroupName, string instanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByInstanceResourceRequest(string subscriptionId, string resourceGroupName, string instanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/akriDiscoveryHandlers", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AkriDiscoveryHandlerResource resources by InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceResourceAsync(string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceRequest(subscriptionId, resourceGroupName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriDiscoveryHandlerResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriDiscoveryHandlerResourceListResult.DeserializeAkriDiscoveryHandlerResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AkriDiscoveryHandlerResource resources by InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstanceResource(string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceRequest(subscriptionId, resourceGroupName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriDiscoveryHandlerResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriDiscoveryHandlerResourceListResult.DeserializeAkriDiscoveryHandlerResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceResourceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string instanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByInstanceResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string instanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List AkriDiscoveryHandlerResource resources by InstanceResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + AkriDiscoveryHandlerResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = AkriDiscoveryHandlerResourceListResult.DeserializeAkriDiscoveryHandlerResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List AkriDiscoveryHandlerResource resources by InstanceResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstanceResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + AkriDiscoveryHandlerResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = AkriDiscoveryHandlerResourceListResult.DeserializeAkriDiscoveryHandlerResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthenticationRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthenticationRestOperations.cs index f8249f3cc94d..fe879eae50d3 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthenticationRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthenticationRestOperations.cs @@ -32,7 +32,7 @@ public BrokerAuthenticationRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthorizationRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthorizationRestOperations.cs index 5b465eb60fc6..57ee5c3b1926 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthorizationRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerAuthorizationRestOperations.cs @@ -32,7 +32,7 @@ public BrokerAuthorizationRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerListenerRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerListenerRestOperations.cs index 21c3440b6825..481cb4611f71 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerListenerRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerListenerRestOperations.cs @@ -32,7 +32,7 @@ public BrokerListenerRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerRestOperations.cs index a97d1d01f335..a179c32fb28f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/BrokerRestOperations.cs @@ -32,7 +32,7 @@ public BrokerRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowEndpointRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowEndpointRestOperations.cs index 4006f7a48b9a..eb5ca9538879 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowEndpointRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowEndpointRestOperations.cs @@ -32,7 +32,7 @@ public DataflowEndpointRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowGraphRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowGraphRestOperations.cs new file mode 100644 index 000000000000..6842a28348bf --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowGraphRestOperations.cs @@ -0,0 +1,549 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.IotOperations.Models; + +namespace Azure.ResourceManager.IotOperations +{ + internal partial class DataflowGraphRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DataflowGraphRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public DataflowGraphRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs/", false); + uri.AppendPath(dataflowGraphName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs/", false); + uri.AppendPath(dataflowGraphName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a DataflowGraphResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataflowGraphResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataflowGraphResourceData.DeserializeDataflowGraphResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataflowGraphResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a DataflowGraphResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataflowGraphResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataflowGraphResourceData.DeserializeDataflowGraphResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((DataflowGraphResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, DataflowGraphResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs/", false); + uri.AppendPath(dataflowGraphName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, DataflowGraphResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs/", false); + uri.AppendPath(dataflowGraphName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a DataflowGraphResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// Name of Instance dataflowEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, DataflowGraphResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a DataflowGraphResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// Name of Instance dataflowEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, DataflowGraphResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs/", false); + uri.AppendPath(dataflowGraphName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs/", false); + uri.AppendPath(dataflowGraphName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a DataflowGraphResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a DataflowGraphResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// Name of Instance dataflowEndpoint resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, string dataflowGraphName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + Argument.AssertNotNullOrEmpty(dataflowGraphName, nameof(dataflowGraphName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName, dataflowGraphName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDataflowProfileRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByDataflowProfileRequest(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/dataflowProfiles/", false); + uri.AppendPath(dataflowProfileName, true); + uri.AppendPath("/dataflowGraphs", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DataflowGraphResource resources by DataflowProfileResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByDataflowProfileAsync(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + + using var message = CreateListByDataflowProfileRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataflowGraphResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataflowGraphResourceListResult.DeserializeDataflowGraphResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DataflowGraphResource resources by DataflowProfileResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByDataflowProfile(string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + + using var message = CreateListByDataflowProfileRequest(subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataflowGraphResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataflowGraphResourceListResult.DeserializeDataflowGraphResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByDataflowProfileNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByDataflowProfileNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List DataflowGraphResource resources by DataflowProfileResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListByDataflowProfileNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + + using var message = CreateListByDataflowProfileNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + DataflowGraphResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = DataflowGraphResourceListResult.DeserializeDataflowGraphResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List DataflowGraphResource resources by DataflowProfileResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of Instance dataflowProfile resource. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListByDataflowProfileNextPage(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, string dataflowProfileName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(dataflowProfileName, nameof(dataflowProfileName)); + + using var message = CreateListByDataflowProfileNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName, dataflowProfileName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + DataflowGraphResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = DataflowGraphResourceListResult.DeserializeDataflowGraphResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowProfileRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowProfileRestOperations.cs index de82bbd53d59..2c7c6f5ed444 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowProfileRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowProfileRestOperations.cs @@ -32,7 +32,7 @@ public DataflowProfileRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowRestOperations.cs index 47da4ba3f339..005bd57abc8d 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/DataflowRestOperations.cs @@ -32,7 +32,7 @@ public DataflowRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/InstanceRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/InstanceRestOperations.cs index 902afd49c1a7..6fd55c088c6f 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/InstanceRestOperations.cs +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/InstanceRestOperations.cs @@ -32,7 +32,7 @@ public InstanceRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-11-01"; + _apiVersion = apiVersion ?? "2025-07-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/RegistryEndpointRestOperations.cs b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/RegistryEndpointRestOperations.cs new file mode 100644 index 000000000000..2171c48b7833 --- /dev/null +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/src/Generated/RestOperations/RegistryEndpointRestOperations.cs @@ -0,0 +1,513 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.IotOperations.Models; + +namespace Azure.ResourceManager.IotOperations +{ + internal partial class RegistryEndpointRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of RegistryEndpointRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// Service host. + /// The API version to use for this operation. + /// or is null. + public RegistryEndpointRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2025-07-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints/", false); + uri.AppendPath(registryEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints/", false); + uri.AppendPath(registryEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a RegistryEndpointResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, registryEndpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RegistryEndpointResourceData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RegistryEndpointResourceData.DeserializeRegistryEndpointResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RegistryEndpointResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a RegistryEndpointResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, instanceName, registryEndpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RegistryEndpointResourceData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RegistryEndpointResourceData.DeserializeRegistryEndpointResourceData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((RegistryEndpointResourceData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, RegistryEndpointResourceData data) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints/", false); + uri.AppendPath(registryEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, RegistryEndpointResourceData data) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints/", false); + uri.AppendPath(registryEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(data, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create a RegistryEndpointResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of RegistryEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, RegistryEndpointResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, registryEndpointName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create a RegistryEndpointResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of RegistryEndpoint resource. + /// Resource create parameters. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, RegistryEndpointResourceData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, instanceName, registryEndpointName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints/", false); + uri.AppendPath(registryEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints/", false); + uri.AppendPath(registryEndpointName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a RegistryEndpointResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, registryEndpointName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete a RegistryEndpointResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// Name of RegistryEndpoint resource. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string instanceName, string registryEndpointName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + Argument.AssertNotNullOrEmpty(registryEndpointName, nameof(registryEndpointName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, instanceName, registryEndpointName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceResourceRequestUri(string subscriptionId, string resourceGroupName, string instanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByInstanceResourceRequest(string subscriptionId, string resourceGroupName, string instanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.IoTOperations/instances/", false); + uri.AppendPath(instanceName, true); + uri.AppendPath("/registryEndpoints", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List RegistryEndpointResource resources by InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceResourceAsync(string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceRequest(subscriptionId, resourceGroupName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RegistryEndpointResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RegistryEndpointResourceListResult.DeserializeRegistryEndpointResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List RegistryEndpointResource resources by InstanceResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstanceResource(string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceRequest(subscriptionId, resourceGroupName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RegistryEndpointResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RegistryEndpointResourceListResult.DeserializeRegistryEndpointResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByInstanceResourceNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string instanceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByInstanceResourceNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string instanceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List RegistryEndpointResource resources by InstanceResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByInstanceResourceNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + RegistryEndpointResourceListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = RegistryEndpointResourceListResult.DeserializeRegistryEndpointResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List RegistryEndpointResource resources by InstanceResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// Name of instance. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByInstanceResourceNextPage(string nextLink, string subscriptionId, string resourceGroupName, string instanceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(instanceName, nameof(instanceName)); + + using var message = CreateListByInstanceResourceNextPageRequest(nextLink, subscriptionId, resourceGroupName, instanceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + RegistryEndpointResourceListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = RegistryEndpointResourceListResult.DeserializeRegistryEndpointResourceListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml index 25a72265e2a6..fbe5f6dabd37 100644 --- a/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml +++ b/sdk/iotoperations/Azure.ResourceManager.IotOperations/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/iotoperations/IoTOperations.Management -commit: 81f881effe41b9bdad29bc449dbf8a99ca894f2d +commit: 804678a63f4e15829793b12c133f7a2877c232b4 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..4e749e6b85b1 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -12,6 +12,8 @@ trigger: - sdk/storage/Azure.Storage.DataMovement/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ - sdk/storage/Azure.Storage.DataMovement.Files/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs.Files.Shares/ exclude: - sdk/storage/Azure.ResourceManager.Storage/