diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs index 411fa9fac51b..a46c49ec69fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.net8.0.cs @@ -27,6 +27,18 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +84,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +169,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +183,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +259,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +469,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +490,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +530,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +542,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +583,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -670,6 +703,45 @@ public static partial class SystemEventNames } namespace Azure.Messaging.EventGrid.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind 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.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind 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.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -802,6 +874,80 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public float? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1110,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1836,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1908,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2417,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs index 411fa9fac51b..a46c49ec69fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/api/Azure.Messaging.EventGrid.netstandard2.0.cs @@ -27,6 +27,18 @@ public static partial class EventGridExtensions } public static partial class EventGridModelFactory { + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties AcsCallEndedByProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? kind = default(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind?), string name = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedEventData AcsCallEndedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties endedBy = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = default(int?), int? subCode = default(int?), string phrase = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties AcsCallGroupProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties AcsCallingEventProperties(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData AcsCallParticipantEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties AcsCallParticipantProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel communicationIdentifier = null, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? role = default(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?), Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties AcsCallRoomProperties(string id = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsCallStartedEventData AcsCallStartedEventData(Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties startedBy = null, string serverCallId = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties group = null, Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties room = null, bool? isTwoParty = default(bool?), string correlationId = null, bool? isRoomsCall = default(bool?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventBaseProperties AcsChatEventBaseProperties(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } @@ -72,6 +84,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadPropertiesUpdatedPerUserEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel editedByCommunicationIdentifier = null, System.DateTimeOffset? editTime = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary metadata = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeletedEventData(Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel recipientCommunicationIdentifier = null, string transactionId = null, string threadId = null, System.DateTimeOffset? createTime = default(System.DateTimeOffset?), long? version = default(long?), Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel deletedByCommunicationIdentifier = null, System.DateTimeOffset? deleteTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, System.DateTimeOffset? composeTime = default(System.DateTimeOffset?), string type = null, long? version = default(long?), string messageBody = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public static Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportReceivedEventData AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string messageId, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatus? status, Azure.Messaging.EventGrid.SystemEvents.AcsEmailDeliveryReportStatusDetails deliveryStatusDetails, System.DateTimeOffset? deliveryAttemptTimestamp) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] @@ -156,6 +169,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseDeletedEventData ApiManagementApiReleaseDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiReleaseUpdatedEventData ApiManagementApiReleaseUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementApiUpdatedEventData ApiManagementApiUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties circuitBreaker = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(System.Collections.Generic.IReadOnlyDictionary rules = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiAddedEventData ApiManagementGatewayApiAddedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRemovedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayCertificateAuthorityCreatedEventData ApiManagementGatewayCertificateAuthorityCreatedEventData(string resourceUri = null) { throw null; } @@ -166,6 +183,10 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationCreatedEventData ApiManagementGatewayHostnameConfigurationCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationDeletedEventData ApiManagementGatewayHostnameConfigurationDeletedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayHostnameConfigurationUpdatedEventData ApiManagementGatewayHostnameConfigurationUpdatedEventData(string resourceUri = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties gateway = null, Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties token = null) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(System.DateTimeOffset? expiresOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayUpdatedEventData ApiManagementGatewayUpdatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductCreatedEventData ApiManagementProductCreatedEventData(string resourceUri = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.ApiManagementProductDeletedEventData ApiManagementProductDeletedEventData(string resourceUri = null) { throw null; } @@ -238,6 +259,7 @@ public static partial class EventGridModelFactory public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinInfoX509Thumbprint DeviceTwinInfoX509Thumbprint(string primaryThumbprint = null, string secondaryThumbprint = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata DeviceTwinMetadata(string lastUpdated = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.DeviceTwinProperties DeviceTwinProperties(Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata metadata = null, float? version = default(float?)) { throw null; } + public static Azure.Messaging.EventGrid.SystemEvents.EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, System.Uri callbackUrl = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientCreatedOrUpdatedEventData EventGridMqttClientCreatedOrUpdatedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null, Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState? state = default(Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientState?), System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? updatedOn = default(System.DateTimeOffset?), System.Collections.Generic.IReadOnlyDictionary attributes = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientDeletedEventData EventGridMqttClientDeletedEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } public static Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData EventGridMqttClientEventData(string clientAuthenticationName = null, string clientName = null, string namespaceName = null) { throw null; } @@ -447,6 +469,11 @@ public EventGridSasBuilder(System.Uri endpoint, System.DateTimeOffset expiresOn) } public static partial class SystemEventNames { + public const string AcsCallEnded = "Microsoft.Communication.CallEnded"; + public const string AcsCallParticipantAdded = "Microsoft.Communication.CallParticipantAdded"; + public const string AcsCallParticipantRemoved = "Microsoft.Communication.CallParticipantRemoved"; + public const string AcsCallStarted = "Microsoft.Communication.CallStarted"; + public const string AcsChatAzureBotCommandReceivedInThread = "Microsoft.Communication.ChatAzureBotCommandReceivedInThread"; public const string AcsChatMessageDeleted = "Microsoft.Communication.ChatMessageDeleted"; public const string AcsChatMessageDeletedInThread = "Microsoft.Communication.ChatMessageDeletedInThread"; public const string AcsChatMessageEdited = "Microsoft.Communication.ChatMessageEdited"; @@ -463,6 +490,7 @@ public static partial class SystemEventNames public const string AcsChatThreadPropertiesUpdated = "Microsoft.Communication.ChatThreadPropertiesUpdated"; public const string AcsChatThreadPropertiesUpdatedPerUser = "Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser"; public const string AcsChatThreadWithUserDeleted = "Microsoft.Communication.ChatThreadWithUserDeleted"; + public const string AcsChatTypingIndicatorReceivedInThread = "Microsoft.Communication.ChatTypingIndicatorReceivedInThread"; public const string AcsEmailDeliveryReportReceived = "Microsoft.Communication.EmailDeliveryReportReceived"; public const string AcsEmailEngagementTrackingReportReceived = "Microsoft.Communication.EmailEngagementTrackingReportReceived"; public const string AcsIncomingCall = "Microsoft.Communication.IncomingCall"; @@ -502,6 +530,8 @@ public static partial class SystemEventNames public const string ApiManagementApiReleaseDeleted = "Microsoft.ApiManagement.APIReleaseDeleted"; public const string ApiManagementApiReleaseUpdated = "Microsoft.ApiManagement.APIReleaseUpdated"; public const string ApiManagementApiUpdated = "Microsoft.ApiManagement.APIUpdated"; + public const string ApiManagementCircuitBreakerClosed = "Microsoft.ApiManagement.CircuitBreaker.Closed"; + public const string ApiManagementCircuitBreakerOpened = "Microsoft.ApiManagement.CircuitBreaker.Opened"; public const string ApiManagementGatewayApiAdded = "Microsoft.ApiManagement.GatewayAPIAdded"; public const string ApiManagementGatewayApiRemoved = "Microsoft.ApiManagement.GatewayAPIRemoved"; public const string ApiManagementGatewayCertificateAuthorityCreated = "Microsoft.ApiManagement.GatewayCertificateAuthorityCreated"; @@ -512,6 +542,8 @@ public static partial class SystemEventNames public const string ApiManagementGatewayHostnameConfigurationCreated = "Microsoft.ApiManagement.GatewayHostnameConfigurationCreated"; public const string ApiManagementGatewayHostnameConfigurationDeleted = "Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted"; public const string ApiManagementGatewayHostnameConfigurationUpdated = "Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated"; + public const string ApiManagementGatewayTokenExpired = "Microsoft.ApiManagement.GatewayTokenExpired"; + public const string ApiManagementGatewayTokenNearExpiry = "Microsoft.ApiManagement.GatewayTokenNearExpiry"; public const string ApiManagementGatewayUpdated = "Microsoft.ApiManagement.GatewayUpdated"; public const string ApiManagementProductCreated = "Microsoft.ApiManagement.ProductCreated"; public const string ApiManagementProductDeleted = "Microsoft.ApiManagement.ProductDeleted"; @@ -551,6 +583,7 @@ public static partial class SystemEventNames public const string DataBoxCopyCompleted = "Microsoft.DataBox.CopyCompleted"; public const string DataBoxCopyStarted = "Microsoft.DataBox.CopyStarted"; public const string DataBoxOrderCompleted = "Microsoft.DataBox.OrderCompleted"; + public const string EdgeSolutionVersionPublished = "Microsoft.Edge.SolutionVersionPublished"; public const string EventGridMqttClientCreatedOrUpdated = "Microsoft.EventGrid.MQTTClientCreatedOrUpdated"; public const string EventGridMqttClientDeleted = "Microsoft.EventGrid.MQTTClientDeleted"; public const string EventGridMqttClientSessionConnected = "Microsoft.EventGrid.MQTTClientSessionConnected"; @@ -670,6 +703,45 @@ public static partial class SystemEventNames } namespace Azure.Messaging.EventGrid.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallEndedByKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallEndedByKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind MicrosoftInternal { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallEndedByKind Participant { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind 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.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallEndedByKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallEndedByKind left, Azure.Messaging.EventGrid.Models.AcsCallEndedByKind right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AcsCallParticipantKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AcsCallParticipantKind(string value) { throw null; } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Attendee { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Collaborator { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Consumer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Organizer { get { throw null; } } + public static Azure.Messaging.EventGrid.Models.AcsCallParticipantKind Presenter { get { throw null; } } + public bool Equals(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind 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.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public static implicit operator Azure.Messaging.EventGrid.Models.AcsCallParticipantKind (string value) { throw null; } + public static bool operator !=(Azure.Messaging.EventGrid.Models.AcsCallParticipantKind left, Azure.Messaging.EventGrid.Models.AcsCallParticipantKind right) { throw null; } + public override string ToString() { throw null; } + } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsRouterJobStatus : System.IEquatable @@ -802,6 +874,80 @@ namespace Azure.Messaging.EventGrid.Models } namespace Azure.Messaging.EventGrid.SystemEvents { + public partial class AcsCallEndedByProperties + { + internal AcsCallEndedByProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallEndedByKind? Kind { get { throw null; } } + public string Name { get { throw null; } } + } + public partial class AcsCallEndedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallEndedEventData() { } + public float? CallDurationInSeconds { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndedByProperties EndedBy { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallEndReasonProperties Reason { get { throw null; } } + } + public partial class AcsCallEndReasonProperties + { + internal AcsCallEndReasonProperties() { } + public int? Code { get { throw null; } } + public string Phrase { get { throw null; } } + public int? SubCode { get { throw null; } } + } + public partial class AcsCallGroupProperties + { + internal AcsCallGroupProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallingEventProperties + { + internal AcsCallingEventProperties() { } + public string CorrelationId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallGroupProperties Group { get { throw null; } } + public bool? IsRoomsCall { get { throw null; } } + public bool? IsTwoParty { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallRoomProperties Room { get { throw null; } } + public string ServerCallId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties StartedBy { get { throw null; } } + } + public partial class AcsCallParticipantAddedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantAddedEventData() { } + } + public partial class AcsCallParticipantEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallParticipantEventData() { } + public string DisplayName { get { throw null; } } + public string ParticipantId { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantProperties User { get { throw null; } } + public string UserAgent { get { throw null; } } + } + public partial class AcsCallParticipantProperties + { + internal AcsCallParticipantProperties() { } + public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel CommunicationIdentifier { get { throw null; } } + public Azure.Messaging.EventGrid.Models.AcsCallParticipantKind? Role { get { throw null; } } + } + public partial class AcsCallParticipantRemovedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallParticipantEventData + { + internal AcsCallParticipantRemovedEventData() { } + } + public partial class AcsCallRoomProperties + { + internal AcsCallRoomProperties() { } + public string Id { get { throw null; } } + } + public partial class AcsCallStartedEventData : Azure.Messaging.EventGrid.SystemEvents.AcsCallingEventProperties + { + internal AcsCallStartedEventData() { } + } + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatAzureBotCommandReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } public partial class AcsChatEventBaseProperties { internal AcsChatEventBaseProperties() { } @@ -964,6 +1110,12 @@ internal AcsChatThreadWithUserDeletedEventData() { } public Azure.Messaging.EventGrid.SystemEvents.CommunicationIdentifierModel DeletedByCommunicationIdentifier { get { throw null; } } public System.DateTimeOffset? DeleteTime { get { throw null; } } } + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : Azure.Messaging.EventGrid.SystemEvents.AcsChatMessageEventInThreadBaseProperties + { + internal AcsChatTypingIndicatorReceivedInThreadEventData() { } + public string MessageBody { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AcsCommunicationIdentifierKind : System.IEquatable { @@ -1684,6 +1836,28 @@ public partial class ApiManagementApiUpdatedEventData internal ApiManagementApiUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal ApiManagementCircuitBreakerClosedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal ApiManagementCircuitBreakerOpenedEventData() { } + public string BackendName { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementCircuitBreakerProperties CircuitBreaker { get { throw null; } } + } + public partial class ApiManagementCircuitBreakerProperties + { + internal ApiManagementCircuitBreakerProperties() { } + public System.Collections.Generic.IReadOnlyDictionary Rules { get { throw null; } } + } + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal ApiManagementExpiredGatewayTokenProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayApiAddedEventData { internal ApiManagementGatewayApiAddedEventData() { } @@ -1734,6 +1908,29 @@ public partial class ApiManagementGatewayHostnameConfigurationUpdatedEventData internal ApiManagementGatewayHostnameConfigurationUpdatedEventData() { } public string ResourceUri { get { throw null; } } } + public partial class ApiManagementGatewayProperties + { + internal ApiManagementGatewayProperties() { } + public string GatewayId { get { throw null; } } + public string InstanceId { get { throw null; } } + } + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal ApiManagementGatewayTokenExpiredEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementExpiredGatewayTokenProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal ApiManagementGatewayTokenNearExpiryEventData() { } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayProperties Gateway { get { throw null; } } + public Azure.Messaging.EventGrid.SystemEvents.ApiManagementGatewayTokenNearExpiryProperties Token { get { throw null; } } + } + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal ApiManagementGatewayTokenNearExpiryProperties() { } + public System.DateTimeOffset? ExpiresOn { get { throw null; } } + } public partial class ApiManagementGatewayUpdatedEventData { internal ApiManagementGatewayUpdatedEventData() { } @@ -2220,6 +2417,17 @@ internal DeviceTwinProperties() { } public Azure.Messaging.EventGrid.SystemEvents.DeviceTwinMetadata Metadata { get { throw null; } } public float? Version { get { throw null; } } } + public partial class EdgeSolutionVersionPublishedEventData + { + internal EdgeSolutionVersionPublishedEventData() { } + public string ApiVersion { get { throw null; } } + public System.Uri CallbackUrl { get { throw null; } } + public string ExternalValidationId { get { throw null; } } + public string SolutionTemplateId { get { throw null; } } + public string SolutionTemplateVersionId { get { throw null; } } + public string SolutionVersionId { get { throw null; } } + public string TargetId { get { throw null; } } + } public partial class EventGridMqttClientCreatedOrUpdatedEventData : Azure.Messaging.EventGrid.SystemEvents.EventGridMqttClientEventData { internal EventGridMqttClientCreatedOrUpdatedEventData() { } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs index fdc005e4a49a..6757f865c152 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/EventGridModelFactory.cs @@ -8,6 +8,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Azure.Messaging.EventGrid.Models; using Azure.Messaging.EventGrid.SystemEvents; namespace Azure.Messaging.EventGrid @@ -2468,7 +2469,7 @@ public static AcsRouterJobQueuedEventData AcsRouterJobQueuedEventData(string job /// Router Job Received Scheduled Time in UTC. /// Unavailable For Matching for Router Job Received. /// A new instance for mocking. - public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, AcsRouterJobStatus? status = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) + public static AcsRouterJobReceivedEventData AcsRouterJobReceivedEventData(string jobId = null, string channelReference = null, string channelId = null, string queueId = null, IReadOnlyDictionary labels = null, IReadOnlyDictionary tags = null, SystemEvents.AcsRouterJobStatus? status = null, string classificationPolicyId = null, int? priority = null, IEnumerable requestedWorkerSelectors = null, DateTimeOffset? scheduledOn = null, bool unavailableForMatching = default) { labels ??= new Dictionary(); tags ??= new Dictionary(); @@ -2833,6 +2834,207 @@ public static AcsRouterWorkerUpdatedEventData AcsRouterWorkerUpdatedEventData(st updatedWorkerProperties?.ToList()); } + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantAddedEventData AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantEventData AcsCallParticipantEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + /// A new instance for mocking. + public static AcsCallParticipantProperties AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallParticipantKind? role = null) + { + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallingEventProperties AcsCallingEventProperties(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallGroupProperties AcsCallGroupProperties(string id = null) + { + return new AcsCallGroupProperties(id); + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + /// A new instance for mocking. + public static AcsCallRoomProperties AcsCallRoomProperties(string id = null) + { + return new AcsCallRoomProperties(id); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + /// A new instance for mocking. + public static AcsCallParticipantRemovedEventData AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallParticipantProperties user = null, string displayName = null, string participantId = null, string userAgent = null) + { + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// A new instance for mocking. + public static AcsCallStartedEventData AcsCallStartedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null) + { + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + /// A new instance for mocking. + public static AcsCallEndedEventData AcsCallEndedEventData(AcsCallParticipantProperties startedBy = null, string serverCallId = null, AcsCallGroupProperties group = null, AcsCallRoomProperties room = null, bool? isTwoParty = null, string correlationId = null, bool? isRoomsCall = null, AcsCallEndedByProperties endedBy = null, AcsCallEndReasonProperties reason = null, float? callDurationInSeconds = null) + { + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + endedBy, + reason, + callDurationInSeconds); + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + /// A new instance for mocking. + public static AcsCallEndedByProperties AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier = null, AcsCallEndedByKind? kind = null, string name = null) + { + return new AcsCallEndedByProperties(communicationIdentifier, kind, name); + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + /// A new instance for mocking. + public static AcsCallEndReasonProperties AcsCallEndReasonProperties(int? code = null, int? subCode = null, string phrase = null) + { + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -2899,7 +3101,7 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio return new AcsChatEventBaseProperties(recipientCommunicationIdentifier, transactionId, threadId); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. /// The chat message id. @@ -2910,12 +3112,21 @@ public static AcsChatEventBaseProperties AcsChatEventBaseProperties(Communicatio /// The version of the message. /// The body of the chat message. /// The chat message metadata. - /// A new instance for mocking. - public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + /// or is null. + /// A new instance for mocking. + public static AcsChatAzureBotCommandReceivedInThreadEventData AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); - return new AcsChatMessageReceivedInThreadEventData( + return new AcsChatAzureBotCommandReceivedInThreadEventData( transactionId, threadId, messageId, @@ -2937,9 +3148,19 @@ public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInTh /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThreadBaseProperties(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageEventInThreadBaseProperties( transactionId, threadId, @@ -2954,12 +3175,98 @@ public static AcsChatMessageEventInThreadBaseProperties AcsChatMessageEventInThr /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. /// A new instance for mocking. public static AcsChatEventInThreadBaseProperties AcsChatEventInThreadBaseProperties(string transactionId = null, string threadId = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatEventInThreadBaseProperties(transactionId, threadId); } + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatTypingIndicatorReceivedInThreadEventData AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + /// A new instance for mocking. + public static AcsChatMessageReceivedInThreadEventData AcsChatMessageReceivedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null) + { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + metadata ??= new Dictionary(); + + return new AcsChatMessageReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata); + } + /// Initializes a new instance of . /// The communication identifier of the target user. /// The transaction id will be used as co-relation vector. @@ -3005,9 +3312,18 @@ public static AcsChatMessageEditedEventData AcsChatMessageEditedEventData(Commun /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. /// A new instance for mocking. public static AcsChatMessageEditedInThreadEventData AcsChatMessageEditedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, string messageBody = null, IReadOnlyDictionary metadata = null, DateTimeOffset? editTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } metadata ??= new Dictionary(); return new AcsChatMessageEditedInThreadEventData( @@ -3061,9 +3377,19 @@ public static AcsChatMessageDeletedEventData AcsChatMessageDeletedEventData(Comm /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. /// A new instance for mocking. public static AcsChatMessageDeletedInThreadEventData AcsChatMessageDeletedInThreadEventData(string transactionId = null, string threadId = null, string messageId = null, CommunicationIdentifierModel senderCommunicationIdentifier = null, string senderDisplayName = null, DateTimeOffset? composeTime = null, string type = null, long? version = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatMessageDeletedInThreadEventData( transactionId, threadId, @@ -3138,9 +3464,18 @@ public static AcsChatThreadEventBaseProperties AcsChatThreadEventBaseProperties( /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel createdByCommunicationIdentifier = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null, IEnumerable participants = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); participants ??= new List(); @@ -3161,9 +3496,19 @@ public static AcsChatThreadCreatedEventData AcsChatThreadCreatedEventData(string /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadEventInThreadBaseProperties AcsChatThreadEventInThreadBaseProperties(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadEventInThreadBaseProperties(transactionId, threadId, createTime, version); } @@ -3195,9 +3540,19 @@ public static AcsChatThreadWithUserDeletedEventData AcsChatThreadWithUserDeleted /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatThreadDeletedEventData AcsChatThreadDeletedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel deletedByCommunicationIdentifier = null, DateTimeOffset? deleteTime = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatThreadDeletedEventData( transactionId, threadId, @@ -3244,9 +3599,18 @@ public static AcsChatThreadPropertiesUpdatedPerUserEventData AcsChatThreadProper /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. /// A new instance for mocking. public static AcsChatThreadPropertiesUpdatedEventData AcsChatThreadPropertiesUpdatedEventData(string transactionId = null, string threadId = null, DateTimeOffset? createTime = null, long? version = null, CommunicationIdentifierModel editedByCommunicationIdentifier = null, DateTimeOffset? editTime = null, IReadOnlyDictionary properties = null, IReadOnlyDictionary metadata = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } properties ??= new Dictionary(); metadata ??= new Dictionary(); @@ -3314,9 +3678,19 @@ public static AcsChatParticipantRemovedFromThreadWithUserEventData AcsChatPartic /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedToThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel addedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantAdded = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantAddedToThreadEventData( transactionId, threadId, @@ -3333,9 +3707,19 @@ public static AcsChatParticipantAddedToThreadEventData AcsChatParticipantAddedTo /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. /// A new instance for mocking. public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRemovedFromThreadEventData(string transactionId = null, string threadId = null, DateTimeOffset? time = null, CommunicationIdentifierModel removedByCommunicationIdentifier = null, AcsChatThreadParticipantProperties participantRemoved = null, long? version = null) { + if (transactionId == null) + { + throw new ArgumentNullException(nameof(transactionId)); + } + if (threadId == null) + { + throw new ArgumentNullException(nameof(threadId)); + } + return new AcsChatParticipantRemovedFromThreadEventData( transactionId, threadId, @@ -3354,9 +3738,22 @@ public static AcsChatParticipantRemovedFromThreadEventData AcsChatParticipantRem /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. /// A new instance for mocking. public static AcsSmsDeliveryReportReceivedEventData AcsSmsDeliveryReportReceivedEventData(string messageId = null, string @from = null, string to = null, string deliveryStatus = null, string deliveryStatusDetails = null, IEnumerable deliveryAttempts = null, DateTimeOffset? receivedTimestamp = null, string tag = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } deliveryAttempts ??= new List(); return new AcsSmsDeliveryReportReceivedEventData( @@ -3384,9 +3781,23 @@ public static AcsSmsDeliveryAttemptProperties AcsSmsDeliveryAttemptProperties(Da /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. /// A new instance for mocking. public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string messageId = null, string @from = null, string to = null) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsEventBaseProperties(messageId, @from, to); } @@ -3397,9 +3808,23 @@ public static AcsSmsEventBaseProperties AcsSmsEventBaseProperties(string message /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. /// A new instance for mocking. public static AcsSmsReceivedEventData AcsSmsReceivedEventData(string messageId = null, string @from = null, string to = null, string message = null, DateTimeOffset? receivedTimestamp = null, int segmentCount = default) { + if (messageId == null) + { + throw new ArgumentNullException(nameof(messageId)); + } + if (@from == null) + { + throw new ArgumentNullException(nameof(@from)); + } + if (to == null) + { + throw new ArgumentNullException(nameof(to)); + } + return new AcsSmsReceivedEventData( messageId, @from, @@ -3916,6 +4341,77 @@ public static ApiManagementGatewayApiRemovedEventData ApiManagementGatewayApiRem return new ApiManagementGatewayApiRemovedEventData(resourceUri); } + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerOpenedEventData ApiManagementCircuitBreakerOpenedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerProperties ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules = null) + { + rules ??= new Dictionary(); + + return new ApiManagementCircuitBreakerProperties(rules); + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + /// A new instance for mocking. + public static ApiManagementCircuitBreakerClosedEventData ApiManagementCircuitBreakerClosedEventData(string backendName = null, ApiManagementCircuitBreakerProperties circuitBreaker = null) + { + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryEventData ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway = null, ApiManagementGatewayTokenNearExpiryProperties token = null) + { + return new ApiManagementGatewayTokenNearExpiryEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + /// A new instance for mocking. + public static ApiManagementGatewayProperties ApiManagementGatewayProperties(string gatewayId = null, string instanceId = null) + { + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + /// A new instance for mocking. + public static ApiManagementGatewayTokenNearExpiryProperties ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementGatewayTokenNearExpiryProperties(expiresOn); + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + /// A new instance for mocking. + public static ApiManagementGatewayTokenExpiredEventData ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway = null, ApiManagementExpiredGatewayTokenProperties token = null) + { + return new ApiManagementGatewayTokenExpiredEventData(gateway, token); + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + /// A new instance for mocking. + public static ApiManagementExpiredGatewayTokenProperties ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn = null) + { + return new ApiManagementExpiredGatewayTokenProperties(expiresOn); + } + /// Initializes a new instance of . /// Type of HL7 FHIR resource. /// Domain name of FHIR account for this resource. @@ -4319,5 +4815,56 @@ public static ApiCenterApiDefinitionUpdatedEventData ApiCenterApiDefinitionUpdat { return new ApiCenterApiDefinitionUpdatedEventData(title, description, specification); } + + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + /// A new instance for mocking. + public static EdgeSolutionVersionPublishedEventData EdgeSolutionVersionPublishedEventData(string externalValidationId = null, string targetId = null, string solutionTemplateId = null, string solutionTemplateVersionId = null, string solutionVersionId = null, string apiVersion = null, Uri callbackUrl = null) + { + if (externalValidationId == null) + { + throw new ArgumentNullException(nameof(externalValidationId)); + } + if (targetId == null) + { + throw new ArgumentNullException(nameof(targetId)); + } + if (solutionTemplateId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateId)); + } + if (solutionTemplateVersionId == null) + { + throw new ArgumentNullException(nameof(solutionTemplateVersionId)); + } + if (solutionVersionId == null) + { + throw new ArgumentNullException(nameof(solutionVersionId)); + } + if (apiVersion == null) + { + throw new ArgumentNullException(nameof(apiVersion)); + } + if (callbackUrl == null) + { + throw new ArgumentNullException(nameof(callbackUrl)); + } + + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } } } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs new file mode 100644 index 000000000000..2ba1317a9b30 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.Serialization.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndReasonProperties + { + internal static AcsCallEndReasonProperties DeserializeAcsCallEndReasonProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? code = default; + int? subCode = default; + string phrase = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + code = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("subCode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subCode = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("phrase"u8)) + { + phrase = property.Value.GetString(); + continue; + } + } + return new AcsCallEndReasonProperties(code, subCode, phrase); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndReasonProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndReasonProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs new file mode 100644 index 000000000000..92cb79be81e5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndReasonProperties.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event reason properties. + public partial class AcsCallEndReasonProperties + { + /// Initializes a new instance of . + internal AcsCallEndReasonProperties() + { + } + + /// Initializes a new instance of . + /// Reason code for ending the call. + /// Reason subcode for ending the call. + /// Reason for ending the call. + internal AcsCallEndReasonProperties(int? code, int? subCode, string phrase) + { + Code = code; + SubCode = subCode; + Phrase = phrase; + } + + /// Reason code for ending the call. + public int? Code { get; } + /// Reason subcode for ending the call. + public int? SubCode { get; } + /// Reason for ending the call. + public string Phrase { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.cs new file mode 100644 index 000000000000..77b21fe5bb44 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByKind.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.Messaging.EventGrid.Models +{ + /// The type of the call ended by. + public readonly partial struct AcsCallEndedByKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallEndedByKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ParticipantValue = "Participant"; + private const string MicrosoftInternalValue = "MicrosoftInternal"; + + /// Call end initiator is a participant. + public static AcsCallEndedByKind Participant { get; } = new AcsCallEndedByKind(ParticipantValue); + /// Call end initiator is the local participant. + public static AcsCallEndedByKind MicrosoftInternal { get; } = new AcsCallEndedByKind(MicrosoftInternalValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallEndedByKind left, AcsCallEndedByKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallEndedByKind left, AcsCallEndedByKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallEndedByKind(string value) => new AcsCallEndedByKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallEndedByKind other && Equals(other); + /// + public bool Equals(AcsCallEndedByKind 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/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs new file mode 100644 index 000000000000..f516c5131d25 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.Serialization.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallEndedByProperties + { + internal static AcsCallEndedByProperties DeserializeAcsCallEndedByProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallEndedByKind? type = default; + string name = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new AcsCallEndedByKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + } + return new AcsCallEndedByProperties(communicationIdentifier, type, name); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallEndedByProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedByProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs new file mode 100644 index 000000000000..b65aa211f40d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedByProperties.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event endedby properties. + public partial class AcsCallEndedByProperties + { + /// Initializes a new instance of . + internal AcsCallEndedByProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The type of the call ended by. + /// The name of the call ended by. + internal AcsCallEndedByProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallEndedByKind? kind, string name) + { + CommunicationIdentifier = communicationIdentifier; + Kind = kind; + Name = name; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The type of the call ended by. + public AcsCallEndedByKind? Kind { get; } + /// The name of the call ended by. + public string Name { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs new file mode 100644 index 000000000000..b6d5e1c0fcbc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.Serialization.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallEndedEventDataConverter))] + public partial class AcsCallEndedEventData + { + internal static AcsCallEndedEventData DeserializeAcsCallEndedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallEndedByProperties endedBy = default; + AcsCallEndReasonProperties reason = default; + float? callDurationInSeconds = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("endedBy"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedBy = AcsCallEndedByProperties.DeserializeAcsCallEndedByProperties(property.Value); + continue; + } + if (property.NameEquals("reason"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + reason = AcsCallEndReasonProperties.DeserializeAcsCallEndReasonProperties(property.Value); + continue; + } + if (property.NameEquals("callDurationInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + callDurationInSeconds = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallEndedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + endedBy, + reason, + callDurationInSeconds); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallEndedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + + internal partial class AcsCallEndedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallEndedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallEndedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallEndedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs new file mode 100644 index 000000000000..fd37be43c6dc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallEndedEventData.cs @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallEnded event. + public partial class AcsCallEndedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The communication identifier of the user who was disconnected. + /// The reason for ending the call. + /// Duration of the call in seconds. + internal AcsCallEndedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallEndedByProperties endedBy, AcsCallEndReasonProperties reason, float? callDurationInSeconds) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + EndedBy = endedBy; + Reason = reason; + CallDurationInSeconds = callDurationInSeconds; + } + + /// The communication identifier of the user who was disconnected. + public AcsCallEndedByProperties EndedBy { get; } + /// The reason for ending the call. + public AcsCallEndReasonProperties Reason { get; } + /// Duration of the call in seconds. + public float? CallDurationInSeconds { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs new file mode 100644 index 000000000000..edf7179ecb8b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallGroupProperties + { + internal static AcsCallGroupProperties DeserializeAcsCallGroupProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallGroupProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallGroupProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallGroupProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs new file mode 100644 index 000000000000..9390502bb868 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallGroupProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event group properties. + public partial class AcsCallGroupProperties + { + /// Initializes a new instance of . + internal AcsCallGroupProperties() + { + } + + /// Initializes a new instance of . + /// Group Id. Format is Guid as string. + internal AcsCallGroupProperties(string id) + { + Id = id; + } + + /// Group Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs new file mode 100644 index 000000000000..f3589e20c13e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantAddedEventDataConverter))] + public partial class AcsCallParticipantAddedEventData + { + internal static AcsCallParticipantAddedEventData DeserializeAcsCallParticipantAddedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantAddedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantAddedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantAddedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantAddedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantAddedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantAddedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs new file mode 100644 index 000000000000..9e6c019ea273 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantAddedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantAdded event. + public partial class AcsCallParticipantAddedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantAddedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs new file mode 100644 index 000000000000..71fb453c9ec5 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantEventDataConverter))] + public partial class AcsCallParticipantEventData + { + internal static AcsCallParticipantEventData DeserializeAcsCallParticipantEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + + internal partial class AcsCallParticipantEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs new file mode 100644 index 000000000000..94f2021011f1 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantEventData.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of participant events. + public partial class AcsCallParticipantEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + User = user; + DisplayName = displayName; + ParticipantId = participantId; + UserAgent = userAgent; + } + + /// The user of the call participant. + public AcsCallParticipantProperties User { get; } + /// The display name of the participant. + public string DisplayName { get; } + /// The Id of the participant. + public string ParticipantId { get; } + /// The user agent of the participant. + public string UserAgent { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs new file mode 100644 index 000000000000..f7bbd1f19871 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantKind.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.Messaging.EventGrid.Models +{ + /// The role of participant user. + public readonly partial struct AcsCallParticipantKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AcsCallParticipantKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string AttendeeValue = "Attendee"; + private const string PresenterValue = "Presenter"; + private const string ConsumerValue = "Consumer"; + private const string CollaboratorValue = "Collaborator"; + private const string OrganizerValue = "Organizer"; + + /// Call participant role is an attendee. + public static AcsCallParticipantKind Attendee { get; } = new AcsCallParticipantKind(AttendeeValue); + /// Call participant role is presenter. + public static AcsCallParticipantKind Presenter { get; } = new AcsCallParticipantKind(PresenterValue); + /// Call participant role is consumer. + public static AcsCallParticipantKind Consumer { get; } = new AcsCallParticipantKind(ConsumerValue); + /// Call participant role is collaborator. + public static AcsCallParticipantKind Collaborator { get; } = new AcsCallParticipantKind(CollaboratorValue); + /// Call participant role is organizer. + public static AcsCallParticipantKind Organizer { get; } = new AcsCallParticipantKind(OrganizerValue); + /// Determines if two values are the same. + public static bool operator ==(AcsCallParticipantKind left, AcsCallParticipantKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AcsCallParticipantKind left, AcsCallParticipantKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AcsCallParticipantKind(string value) => new AcsCallParticipantKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AcsCallParticipantKind other && Equals(other); + /// + public bool Equals(AcsCallParticipantKind 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/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs new file mode 100644 index 000000000000..820f763b8960 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.Serialization.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallParticipantProperties + { + internal static AcsCallParticipantProperties DeserializeAcsCallParticipantProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CommunicationIdentifierModel communicationIdentifier = default; + AcsCallParticipantKind? role = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("communicationIdentifier"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + communicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new AcsCallParticipantKind(property.Value.GetString()); + continue; + } + } + return new AcsCallParticipantProperties(communicationIdentifier, role); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallParticipantProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs new file mode 100644 index 000000000000..f3e453cf7e5f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantProperties.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using Azure.Messaging.EventGrid.Models; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event participant user. + public partial class AcsCallParticipantProperties + { + /// Initializes a new instance of . + internal AcsCallParticipantProperties() + { + } + + /// Initializes a new instance of . + /// The communication identifier of the call ended by. + /// The role of participant user. + internal AcsCallParticipantProperties(CommunicationIdentifierModel communicationIdentifier, AcsCallParticipantKind? role) + { + CommunicationIdentifier = communicationIdentifier; + Role = role; + } + + /// The communication identifier of the call ended by. + public CommunicationIdentifierModel CommunicationIdentifier { get; } + /// The role of participant user. + public AcsCallParticipantKind? Role { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs new file mode 100644 index 000000000000..9417ceef4740 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallParticipantRemovedEventDataConverter))] + public partial class AcsCallParticipantRemovedEventData + { + internal static AcsCallParticipantRemovedEventData DeserializeAcsCallParticipantRemovedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties user = default; + string displayName = default; + string participantId = default; + string userAgent = default; + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("user"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + user = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("participantId"u8)) + { + participantId = property.Value.GetString(); + continue; + } + if (property.NameEquals("userAgent"u8)) + { + userAgent = property.Value.GetString(); + continue; + } + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallParticipantRemovedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall, + user, + displayName, + participantId, + userAgent); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallParticipantRemovedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + + internal partial class AcsCallParticipantRemovedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallParticipantRemovedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallParticipantRemovedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallParticipantRemovedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs new file mode 100644 index 000000000000..043bcaa98a10 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallParticipantRemovedEventData.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallParticipantRemoved event. + public partial class AcsCallParticipantRemovedEventData : AcsCallParticipantEventData + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + /// The user of the call participant. + /// The display name of the participant. + /// The Id of the participant. + /// The user agent of the participant. + internal AcsCallParticipantRemovedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall, AcsCallParticipantProperties user, string displayName, string participantId, string userAgent) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall, user, displayName, participantId, userAgent) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs new file mode 100644 index 000000000000..df58cdb6b727 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.Serialization.cs @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallRoomProperties + { + internal static AcsCallRoomProperties DeserializeAcsCallRoomProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + } + return new AcsCallRoomProperties(id); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallRoomProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallRoomProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs new file mode 100644 index 000000000000..e76b63b858c7 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallRoomProperties.cs @@ -0,0 +1,28 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of calling event room properties. + public partial class AcsCallRoomProperties + { + /// Initializes a new instance of . + internal AcsCallRoomProperties() + { + } + + /// Initializes a new instance of . + /// Room Id. Format is Guid as string. + internal AcsCallRoomProperties(string id) + { + Id = id; + } + + /// Room Id. Format is Guid as string. + public string Id { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs new file mode 100644 index 000000000000..fa62de8c59ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.Serialization.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsCallStartedEventDataConverter))] + public partial class AcsCallStartedEventData + { + internal static AcsCallStartedEventData DeserializeAcsCallStartedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallStartedEventData( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsCallStartedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + + internal partial class AcsCallStartedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsCallStartedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsCallStartedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsCallStartedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs new file mode 100644 index 000000000000..face68720585 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallStartedEventData.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.CallStarted event. + public partial class AcsCallStartedEventData : AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) : base(startedBy, serverCallId, correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallStartedEventData(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) : base(startedBy, serverCallId, group, room, isTwoParty, correlationId, isRoomsCall) + { + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs new file mode 100644 index 000000000000..271461263e59 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.Serialization.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class AcsCallingEventProperties + { + internal static AcsCallingEventProperties DeserializeAcsCallingEventProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AcsCallParticipantProperties startedBy = default; + string serverCallId = default; + AcsCallGroupProperties group = default; + AcsCallRoomProperties room = default; + bool? isTwoParty = default; + string correlationId = default; + bool? isRoomsCall = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("startedBy"u8)) + { + startedBy = AcsCallParticipantProperties.DeserializeAcsCallParticipantProperties(property.Value); + continue; + } + if (property.NameEquals("serverCallId"u8)) + { + serverCallId = property.Value.GetString(); + continue; + } + if (property.NameEquals("group"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + group = AcsCallGroupProperties.DeserializeAcsCallGroupProperties(property.Value); + continue; + } + if (property.NameEquals("room"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + room = AcsCallRoomProperties.DeserializeAcsCallRoomProperties(property.Value); + continue; + } + if (property.NameEquals("isTwoParty"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isTwoParty = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("correlationId"u8)) + { + correlationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isRoomsCall"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRoomsCall = property.Value.GetBoolean(); + continue; + } + } + return new AcsCallingEventProperties( + startedBy, + serverCallId, + group, + room, + isTwoParty, + correlationId, + isRoomsCall); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static AcsCallingEventProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsCallingEventProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs new file mode 100644 index 000000000000..d542dc66e407 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsCallingEventProperties.cs @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of common properties of all calling events. + public partial class AcsCallingEventProperties + { + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The correlation ID of the calling event. + /// , or is null. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, string correlationId) + { + Argument.AssertNotNull(startedBy, nameof(startedBy)); + Argument.AssertNotNull(serverCallId, nameof(serverCallId)); + Argument.AssertNotNull(correlationId, nameof(correlationId)); + + StartedBy = startedBy; + ServerCallId = serverCallId; + CorrelationId = correlationId; + } + + /// Initializes a new instance of . + /// The call participant who initiated the call. + /// The callId of the server. + /// The group metadata. + /// The group metadata. + /// Is two-party in calling event. + /// The correlation ID of the calling event. + /// Is the calling event a room call. + internal AcsCallingEventProperties(AcsCallParticipantProperties startedBy, string serverCallId, AcsCallGroupProperties group, AcsCallRoomProperties room, bool? isTwoParty, string correlationId, bool? isRoomsCall) + { + StartedBy = startedBy; + ServerCallId = serverCallId; + Group = group; + Room = room; + IsTwoParty = isTwoParty; + CorrelationId = correlationId; + IsRoomsCall = isRoomsCall; + } + + /// The call participant who initiated the call. + public AcsCallParticipantProperties StartedBy { get; } + /// The callId of the server. + public string ServerCallId { get; } + /// The group metadata. + public AcsCallGroupProperties Group { get; } + /// The group metadata. + public AcsCallRoomProperties Room { get; } + /// Is two-party in calling event. + public bool? IsTwoParty { get; } + /// The correlation ID of the calling event. + public string CorrelationId { get; } + /// Is the calling event a room call. + public bool? IsRoomsCall { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bb093e2c32ef --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatAzureBotCommandReceivedInThreadEventDataConverter))] + public partial class AcsChatAzureBotCommandReceivedInThreadEventData + { + internal static AcsChatAzureBotCommandReceivedInThreadEventData DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"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()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatAzureBotCommandReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatAzureBotCommandReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatAzureBotCommandReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatAzureBotCommandReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatAzureBotCommandReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatAzureBotCommandReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs new file mode 100644 index 000000000000..aacbe351c02d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatAzureBotCommandReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatAzureBotCommandReceivedInThread event. + public partial class AcsChatAzureBotCommandReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatAzureBotCommandReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs index 35fad4af31d7..cb705c3b2f54 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatEventInThreadBaseProperties.cs @@ -5,21 +5,22 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all thread-level chat events. public partial class AcsChatEventInThreadBaseProperties { - /// Initializes a new instance of . - internal AcsChatEventInThreadBaseProperties() - { - } - /// Initializes a new instance of . /// The transaction id will be used as co-relation vector. /// The chat thread id. + /// or is null. internal AcsChatEventInThreadBaseProperties(string transactionId, string threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + TransactionId = transactionId; ThreadId = threadId; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs index b0e34e2551c6..412ade0e5f36 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsChatMessageDeletedEventData DeserializeAcsChatMessageDeletedE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs index f887d31afeb6..d84d1c847edf 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedEventData.cs @@ -13,8 +13,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageDeletedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs index 76b39cda1b45..42a85f12161d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.Serialization.cs @@ -47,10 +47,6 @@ internal static AcsChatMessageDeletedInThreadEventData DeserializeAcsChatMessage } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs index ac131a18cea4..5de5749e3943 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageDeletedInThreadEventData.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageDeletedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageDeletedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); } /// Initializes a new instance of . @@ -27,8 +38,12 @@ internal AcsChatMessageDeletedInThreadEventData() /// The type of the message. /// The version of the message. /// The time at which the message was deleted. + /// or is null. internal AcsChatMessageDeletedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, DateTimeOffset? deleteTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs index dd9e84a70fdf..e55b47bfd35b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.Serialization.cs @@ -70,10 +70,6 @@ internal static AcsChatMessageEditedEventData DeserializeAcsChatMessageEditedEve } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs index 6c447d2cac7e..e642000a1219 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedEventData.cs @@ -14,8 +14,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , or is null. + internal AcsChatMessageEditedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs index 0eeae702b68c..9ecdd0fa22a4 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.Serialization.cs @@ -69,10 +69,6 @@ internal static AcsChatMessageEditedInThreadEventData DeserializeAcsChatMessageE } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs index 0d03146d1b26..8d24520a3858 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEditedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEditedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEditedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -31,8 +46,12 @@ internal AcsChatMessageEditedInThreadEventData() /// The body of the chat message. /// The chat message metadata. /// The time at which the message was edited. + /// or is null. internal AcsChatMessageEditedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata, DateTimeOffset? editTime) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; EditTime = editTime; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs index c82ee40114b2..9dcd1117edd8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsChatMessageEventBaseProperties DeserializeAcsChatMessageEvent } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs index 994534c4ad59..f7e62ac8af7b 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventBaseProperties.cs @@ -13,8 +13,19 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventBaseProperties : AcsChatEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventBaseProperties() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageEventBaseProperties(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs index 21fa82eb0afc..5c94e28726e9 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.Serialization.cs @@ -35,10 +35,6 @@ internal static AcsChatMessageEventInThreadBaseProperties DeserializeAcsChatMess } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs index 685b6c8f4924..e2902be335cb 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageEventInThreadBaseProperties.cs @@ -13,8 +13,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , , , or is null. + internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + + MessageId = messageId; + SenderCommunicationIdentifier = senderCommunicationIdentifier; + Type = type; } /// Initializes a new instance of . @@ -26,8 +41,12 @@ internal AcsChatMessageEventInThreadBaseProperties() /// The original compose time of the message. /// The type of the message. /// The version of the message. + /// or is null. internal AcsChatMessageEventInThreadBaseProperties(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageId = messageId; SenderCommunicationIdentifier = senderCommunicationIdentifier; SenderDisplayName = senderDisplayName; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs index 4eccff957138..9bb7e07bd654 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsChatMessageReceivedEventData DeserializeAcsChatMessageReceive } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs index d61b4a63945c..f1f2e8822ffe 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedEventData.cs @@ -14,8 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedEventData : AcsChatMessageEventBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedEventData() + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// , or is null. + internal AcsChatMessageReceivedEventData(string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type) : base(messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs index 076d2837ccef..439b59b9a542 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.Serialization.cs @@ -59,10 +59,6 @@ internal static AcsChatMessageReceivedInThreadEventData DeserializeAcsChatMessag } if (property.NameEquals("senderCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs index b4c2319c92eb..96be9775647a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatMessageReceivedInThreadEventData.cs @@ -14,8 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatMessageReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatMessageReceivedInThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; Metadata = new ChangeTrackingDictionary(); } @@ -30,8 +45,12 @@ internal AcsChatMessageReceivedInThreadEventData() /// The version of the message. /// The body of the chat message. /// The chat message metadata. + /// or is null. internal AcsChatMessageReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + MessageBody = messageBody; Metadata = metadata; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs index 01e5e5c55e5f..25c47fabb450 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantAddedToThreadEventData DeserializeAcsChatParti } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs index c205886b7b7b..4760962609c8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// , , or is null. + internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantAddedToThreadEventData() /// The communication identifier of the user who added the user. /// The details of the user who was added. /// The version of the thread. + /// or is null. internal AcsChatParticipantAddedToThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; AddedByCommunicationIdentifier = addedByCommunicationIdentifier; ParticipantAdded = participantAdded; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs index 76d4c099c082..b9e14ef1a2fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantAddedToThreadWithUserEventData DeserializeAcsC } if (property.NameEquals("addedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } addedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantAdded"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantAdded = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs index f51c22fd17ed..cbff24655e89 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantAddedToThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantAddedToThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantAddedToThreadWithUserEventData() + /// The communication identifier of the user who added the user. + /// The details of the user who was added. + /// or is null. + internal AcsChatParticipantAddedToThreadWithUserEventData(CommunicationIdentifierModel addedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantAdded) { + Argument.AssertNotNull(addedByCommunicationIdentifier, nameof(addedByCommunicationIdentifier)); + Argument.AssertNotNull(participantAdded, nameof(participantAdded)); + + AddedByCommunicationIdentifier = addedByCommunicationIdentifier; + ParticipantAdded = participantAdded; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs index b4058aaa1092..ffd8afa045fa 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.Serialization.cs @@ -39,19 +39,11 @@ internal static AcsChatParticipantRemovedFromThreadEventData DeserializeAcsChatP } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs index 5be604dc92c1..4b264f8a27f5 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadEventData.cs @@ -13,8 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadEventData : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// , , or is null. + internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . @@ -24,8 +36,12 @@ internal AcsChatParticipantRemovedFromThreadEventData() /// The communication identifier of the user who removed the user. /// The details of the user who was removed. /// The version of the thread. + /// or is null. internal AcsChatParticipantRemovedFromThreadEventData(string transactionId, string threadId, DateTimeOffset? time, CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Time = time; RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; ParticipantRemoved = participantRemoved; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs index c0e5a321610d..ca7da5e6a694 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.Serialization.cs @@ -41,19 +41,11 @@ internal static AcsChatParticipantRemovedFromThreadWithUserEventData Deserialize } if (property.NameEquals("removedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } removedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("participantRemoved"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantRemoved = AcsChatThreadParticipantProperties.DeserializeAcsChatThreadParticipantProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs index b8ef04e76ab6..6843aecfeee6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatParticipantRemovedFromThreadWithUserEventData.cs @@ -13,8 +13,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatParticipantRemovedFromThreadWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatParticipantRemovedFromThreadWithUserEventData() + /// The communication identifier of the user who removed the user. + /// The details of the user who was removed. + /// or is null. + internal AcsChatParticipantRemovedFromThreadWithUserEventData(CommunicationIdentifierModel removedByCommunicationIdentifier, AcsChatThreadParticipantProperties participantRemoved) { + Argument.AssertNotNull(removedByCommunicationIdentifier, nameof(removedByCommunicationIdentifier)); + Argument.AssertNotNull(participantRemoved, nameof(participantRemoved)); + + RemovedByCommunicationIdentifier = removedByCommunicationIdentifier; + ParticipantRemoved = participantRemoved; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs index b83032f6e45b..7dec53ad9353 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.Serialization.cs @@ -33,19 +33,11 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -77,10 +69,6 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -124,9 +112,9 @@ internal static AcsChatThreadCreatedEventData DeserializeAcsChatThreadCreatedEve createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs index 07b76bf14be2..be9e55085a84 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,24 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , , , or is null. + internal AcsChatThreadCreatedEventData(string transactionId, string threadId, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . @@ -30,8 +44,12 @@ internal AcsChatThreadCreatedEventData() /// The thread properties. /// The chat thread created metadata. /// The list of properties of participants who are part of the thread. + /// or is null. internal AcsChatThreadCreatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata, IReadOnlyList participants) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; Properties = properties; Metadata = metadata; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs index e0add658f568..b87ff68281e1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.Serialization.cs @@ -34,19 +34,11 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr { if (property.NameEquals("createdByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } createdByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -78,10 +70,6 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr } if (property.NameEquals("participants"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -135,9 +123,9 @@ internal static AcsChatThreadCreatedWithUserEventData DeserializeAcsChatThreadCr createTime, version, createdByCommunicationIdentifier, - properties ?? new ChangeTrackingDictionary(), + properties, metadata ?? new ChangeTrackingDictionary(), - participants ?? new ChangeTrackingList()); + participants); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs index 21223daaa998..211bc5b72eee 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadCreatedWithUserEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,11 +15,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadCreatedWithUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadCreatedWithUserEventData() + /// The communication identifier of the user who created the thread. + /// The thread properties. + /// The list of properties of participants who are part of the thread. + /// , or is null. + internal AcsChatThreadCreatedWithUserEventData(CommunicationIdentifierModel createdByCommunicationIdentifier, IReadOnlyDictionary properties, IEnumerable participants) { - Properties = new ChangeTrackingDictionary(); + Argument.AssertNotNull(createdByCommunicationIdentifier, nameof(createdByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(participants, nameof(participants)); + + CreatedByCommunicationIdentifier = createdByCommunicationIdentifier; + Properties = properties; Metadata = new ChangeTrackingDictionary(); - Participants = new ChangeTrackingList(); + Participants = participants.ToList(); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs index 5de0fd9805f3..810fb19a9d7f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadDeletedEventData DeserializeAcsChatThreadDeletedEve { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs index 3b9aa7a8b808..5969ce68e9b0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadDeletedEventData.cs @@ -13,8 +13,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadDeletedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadDeletedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who deleted the thread. + /// , or is null. + internal AcsChatThreadDeletedEventData(string transactionId, string threadId, CommunicationIdentifierModel deletedByCommunicationIdentifier) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . @@ -24,8 +33,12 @@ internal AcsChatThreadDeletedEventData() /// The version of the thread. /// The communication identifier of the user who deleted the thread. /// The deletion time of the thread. + /// or is null. internal AcsChatThreadDeletedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel deletedByCommunicationIdentifier, DateTimeOffset? deleteTime) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; DeleteTime = deleteTime; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs index 0583ea812be7..25b312e43764 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadEventInThreadBaseProperties.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadEventInThreadBaseProperties : AcsChatEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadEventInThreadBaseProperties() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// or is null. + internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); } /// Initializes a new instance of . @@ -22,8 +27,12 @@ internal AcsChatThreadEventInThreadBaseProperties() /// The chat thread id. /// The original creation time of the thread. /// The version of the thread. + /// or is null. internal AcsChatThreadEventInThreadBaseProperties(string transactionId, string threadId, DateTimeOffset? createTime, long? version) : base(transactionId, threadId) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + CreateTime = createTime; Version = version; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs index 65df3bd79497..76c268e870cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.Serialization.cs @@ -30,10 +30,6 @@ internal static AcsChatThreadParticipantProperties DeserializeAcsChatThreadParti } if (property.NameEquals("participantCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } participantCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs index c9abfa1a2fd4..8cd68cac7200 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadParticipantProperties.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadParticipantProperties { /// Initializes a new instance of . - internal AcsChatThreadParticipantProperties() + /// The communication identifier of the user. + /// is null. + internal AcsChatThreadParticipantProperties(CommunicationIdentifierModel participantCommunicationIdentifier) { + Argument.AssertNotNull(participantCommunicationIdentifier, nameof(participantCommunicationIdentifier)); + + ParticipantCommunicationIdentifier = participantCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs index 02475209a4cd..9513a660cb01 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.Serialization.cs @@ -33,10 +33,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -51,10 +47,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -72,10 +64,6 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread } if (property.NameEquals("metadata"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -120,8 +108,8 @@ internal static AcsChatThreadPropertiesUpdatedEventData DeserializeAcsChatThread version, editedByCommunicationIdentifier, editTime, - properties ?? new ChangeTrackingDictionary(), - metadata ?? new ChangeTrackingDictionary()); + properties, + metadata); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs index 5648d282b33e..edfc5c374b12 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedEventData.cs @@ -14,10 +14,23 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedEventData : AcsChatThreadEventInThreadBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedEventData() + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// The thread metadata. + /// , , , or is null. + internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId) { - Properties = new ChangeTrackingDictionary(); - Metadata = new ChangeTrackingDictionary(); + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + Argument.AssertNotNull(metadata, nameof(metadata)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; + Properties = properties; + Metadata = metadata; } /// Initializes a new instance of . @@ -29,8 +42,12 @@ internal AcsChatThreadPropertiesUpdatedEventData() /// The time at which the properties of the thread were updated. /// The updated thread properties. /// The thread metadata. + /// or is null. internal AcsChatThreadPropertiesUpdatedEventData(string transactionId, string threadId, DateTimeOffset? createTime, long? version, CommunicationIdentifierModel editedByCommunicationIdentifier, DateTimeOffset? editTime, IReadOnlyDictionary properties, IReadOnlyDictionary metadata) : base(transactionId, threadId, createTime, version) { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; EditTime = editTime; Properties = properties; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs index 85625ffe3d8b..83631ade6eb7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.Serialization.cs @@ -34,10 +34,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha { if (property.NameEquals("editedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } editedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } @@ -66,10 +62,6 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha } if (property.NameEquals("properties"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -132,7 +124,7 @@ internal static AcsChatThreadPropertiesUpdatedPerUserEventData DeserializeAcsCha editedByCommunicationIdentifier, editTime, metadata ?? new ChangeTrackingDictionary(), - properties ?? new ChangeTrackingDictionary()); + properties); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs index 4a892232df59..a7e3d37bab61 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadPropertiesUpdatedPerUserEventData.cs @@ -14,10 +14,17 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadPropertiesUpdatedPerUserEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadPropertiesUpdatedPerUserEventData() + /// The communication identifier of the user who updated the thread properties. + /// The updated thread properties. + /// or is null. + internal AcsChatThreadPropertiesUpdatedPerUserEventData(CommunicationIdentifierModel editedByCommunicationIdentifier, IReadOnlyDictionary properties) { + Argument.AssertNotNull(editedByCommunicationIdentifier, nameof(editedByCommunicationIdentifier)); + Argument.AssertNotNull(properties, nameof(properties)); + + EditedByCommunicationIdentifier = editedByCommunicationIdentifier; Metadata = new ChangeTrackingDictionary(); - Properties = new ChangeTrackingDictionary(); + Properties = properties; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs index 45b84ede59ed..b161b90b0960 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsChatThreadWithUserDeletedEventData DeserializeAcsChatThreadWi { if (property.NameEquals("deletedByCommunicationIdentifier"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deletedByCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs index 98ce51fb594b..53befac6b0fc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatThreadWithUserDeletedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsChatThreadWithUserDeletedEventData : AcsChatThreadEventBaseProperties { /// Initializes a new instance of . - internal AcsChatThreadWithUserDeletedEventData() + /// The communication identifier of the user who deleted the thread. + /// is null. + internal AcsChatThreadWithUserDeletedEventData(CommunicationIdentifierModel deletedByCommunicationIdentifier) { + Argument.AssertNotNull(deletedByCommunicationIdentifier, nameof(deletedByCommunicationIdentifier)); + + DeletedByCommunicationIdentifier = deletedByCommunicationIdentifier; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs new file mode 100644 index 000000000000..bea560b58f4e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.Serialization.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(AcsChatTypingIndicatorReceivedInThreadEventDataConverter))] + public partial class AcsChatTypingIndicatorReceivedInThreadEventData + { + internal static AcsChatTypingIndicatorReceivedInThreadEventData DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string messageBody = default; + IReadOnlyDictionary metadata = default; + string messageId = default; + CommunicationIdentifierModel senderCommunicationIdentifier = default; + string senderDisplayName = default; + DateTimeOffset? composeTime = default; + string type = default; + long? version = default; + string transactionId = default; + string threadId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("messageBody"u8)) + { + messageBody = property.Value.GetString(); + continue; + } + if (property.NameEquals("metadata"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()); + } + metadata = dictionary; + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("senderCommunicationIdentifier"u8)) + { + senderCommunicationIdentifier = CommunicationIdentifierModel.DeserializeCommunicationIdentifierModel(property.Value); + continue; + } + if (property.NameEquals("senderDisplayName"u8)) + { + senderDisplayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("composeTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + composeTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + if (property.NameEquals("version"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + version = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("transactionId"u8)) + { + transactionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("threadId"u8)) + { + threadId = property.Value.GetString(); + continue; + } + } + return new AcsChatTypingIndicatorReceivedInThreadEventData( + transactionId, + threadId, + messageId, + senderCommunicationIdentifier, + senderDisplayName, + composeTime, + type, + version, + messageBody, + metadata ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new AcsChatTypingIndicatorReceivedInThreadEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + + internal partial class AcsChatTypingIndicatorReceivedInThreadEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, AcsChatTypingIndicatorReceivedInThreadEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override AcsChatTypingIndicatorReceivedInThreadEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeAcsChatTypingIndicatorReceivedInThreadEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs new file mode 100644 index 000000000000..a425e3938e91 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsChatTypingIndicatorReceivedInThreadEventData.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Communication.ChatTypingIndicatorReceivedInThread event. + public partial class AcsChatTypingIndicatorReceivedInThreadEventData : AcsChatMessageEventInThreadBaseProperties + { + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The type of the message. + /// The body of the chat message. + /// , , , , or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string type, string messageBody) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, type) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(senderCommunicationIdentifier, nameof(senderCommunicationIdentifier)); + Argument.AssertNotNull(type, nameof(type)); + Argument.AssertNotNull(messageBody, nameof(messageBody)); + + MessageBody = messageBody; + Metadata = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The transaction id will be used as co-relation vector. + /// The chat thread id. + /// The chat message id. + /// The communication identifier of the sender. + /// The display name of the sender. + /// The original compose time of the message. + /// The type of the message. + /// The version of the message. + /// The body of the chat message. + /// The chat message metadata. + /// or is null. + internal AcsChatTypingIndicatorReceivedInThreadEventData(string transactionId, string threadId, string messageId, CommunicationIdentifierModel senderCommunicationIdentifier, string senderDisplayName, DateTimeOffset? composeTime, string type, long? version, string messageBody, IReadOnlyDictionary metadata) : base(transactionId, threadId, messageId, senderCommunicationIdentifier, senderDisplayName, composeTime, type, version) + { + Argument.AssertNotNull(transactionId, nameof(transactionId)); + Argument.AssertNotNull(threadId, nameof(threadId)); + + MessageBody = messageBody; + Metadata = metadata; + } + + /// The body of the chat message. + public string MessageBody { get; } + /// The chat message metadata. + public IReadOnlyDictionary Metadata { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs index 699d625ddc06..614519d65a8e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.Serialization.cs @@ -60,10 +60,6 @@ internal static AcsEmailDeliveryReportReceivedEventData DeserializeAcsEmailDeliv } if (property.NameEquals("deliveryStatusDetails"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } deliveryStatusDetails = AcsEmailDeliveryReportStatusDetails.DeserializeAcsEmailDeliveryReportStatusDetails(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs index 35a4b18f2f05..76ee86c48a15 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsEmailDeliveryReportReceivedEventData.cs @@ -13,8 +13,22 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsEmailDeliveryReportReceivedEventData { /// Initializes a new instance of . - internal AcsEmailDeliveryReportReceivedEventData() + /// The Sender Email Address. + /// The recipient Email Address. + /// The Internet Message Id of the email been sent. + /// Detailed information about the status if any. + /// , , or is null. + internal AcsEmailDeliveryReportReceivedEventData(string sender, string recipient, string internetMessageId, AcsEmailDeliveryReportStatusDetails deliveryStatusDetails) { + Argument.AssertNotNull(sender, nameof(sender)); + Argument.AssertNotNull(recipient, nameof(recipient)); + Argument.AssertNotNull(internetMessageId, nameof(internetMessageId)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + + Sender = sender; + Recipient = recipient; + InternetMessageId = internetMessageId; + DeliveryStatusDetails = deliveryStatusDetails; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs index a73e40942035..526a2be14367 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.Serialization.cs @@ -31,10 +31,6 @@ internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFi { if (property.NameEquals("recordingStorageInfo"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } recordingStorageInfo = AcsRecordingStorageInfoProperties.DeserializeAcsRecordingStorageInfoProperties(property.Value); continue; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs index 99097128a203..9539b2cc74f8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRecordingFileStatusUpdatedEventData.cs @@ -13,8 +13,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRecordingFileStatusUpdatedEventData { /// Initializes a new instance of . - internal AcsRecordingFileStatusUpdatedEventData() + /// The details of recording storage information. + /// is null. + internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo) { + Argument.AssertNotNull(recordingStorageInfo, nameof(recordingStorageInfo)); + + RecordingStorageInfo = recordingStorageInfo; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs index f550f0cdb19d..3d50fc0ed7a8 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCancelledEventData DeserializeAcsRouterJobCancelledE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, note, dispositionCode); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs index d1a3f1dbc0e6..0127944158f3 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCancelledEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCancelledEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCancelledEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCancelledEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs index da6e88a040d1..5495126ab9be 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.Serialization.cs @@ -57,10 +57,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -71,10 +67,6 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -104,8 +96,8 @@ internal static AcsRouterJobClassificationFailedEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, classificationPolicyId, errors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs index e5808f84949b..6a3d32115007 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassificationFailedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassificationFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassificationFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassificationFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ErrorsInternal = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs index e5f641386a5d..8f3a9227820d 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.Serialization.cs @@ -77,10 +77,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -91,10 +87,6 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -124,8 +116,8 @@ internal static AcsRouterJobClassifiedEventData DeserializeAcsRouterJobClassifie channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, queueDetails, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs index 68edb7286203..f1f5f1bc63ca 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClassifiedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClassifiedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClassifiedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClassifiedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs index 6ee0f8a829f1..c15de98e74a1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.Serialization.cs @@ -54,10 +54,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -68,10 +64,6 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -101,8 +93,8 @@ internal static AcsRouterJobClosedEventData DeserializeAcsRouterJobClosedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId, dispositionCode); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs index 7c07a79c1fa6..abaf8cab7d6e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobClosedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobClosedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobClosedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobClosedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs index 039f0fc7d09e..200b985e7f32 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobCompletedEventData DeserializeAcsRouterJobCompletedE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs index c8f62735ce18..9df18d40daf0 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobCompletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobCompletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobCompletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobCompletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs index 8d513a015823..eba6896d3464 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobDeletedEventData DeserializeAcsRouterJobDeletedEvent channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs index 4958b5deb302..d276890907b1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobDeletedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobDeletedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobDeletedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobDeletedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs index 95ed38702f2e..bd699d9e86cc 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.Serialization.cs @@ -36,10 +36,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -50,10 +46,6 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -83,8 +75,8 @@ internal static AcsRouterJobEventData DeserializeAcsRouterJobEventData(JsonEleme channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary()); + labels, + tags); } /// Deserializes the model from a raw response. diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs index 225f5c98e994..a8212cc2cf97 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,10 +14,16 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobEventData : AcsRouterEventData { /// Initializes a new instance of . - internal AcsRouterJobEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) { - Labels = new ChangeTrackingDictionary(); - Tags = new ChangeTrackingDictionary(); + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + + Labels = labels; + Tags = tags; } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs index 060ec74483a1..6afc0e609cbd 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobExceptionTriggeredEventData DeserializeAcsRouterJobE channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, ruleKey, exceptionRuleId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs index 0da91a332506..f8bc69ebbb53 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobExceptionTriggeredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobExceptionTriggeredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobExceptionTriggeredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobExceptionTriggeredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs index e998b5b551a5..9bbc4f9ae55e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.Serialization.cs @@ -76,10 +76,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -90,10 +86,6 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -123,8 +115,8 @@ internal static AcsRouterJobQueuedEventData DeserializeAcsRouterJobQueuedEventDa channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, attachedWorkerSelectors ?? new ChangeTrackingList(), requestedWorkerSelectors ?? new ChangeTrackingList()); diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs index 044eb47870f2..797c4cfd8d4e 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobQueuedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobQueuedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobQueuedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobQueuedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + AttachedWorkerSelectors = new ChangeTrackingList(); RequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs index a4f23d4ec7dc..f8fa64a54129 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.Serialization.cs @@ -93,10 +93,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -107,10 +103,6 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -140,8 +132,8 @@ internal static AcsRouterJobReceivedEventData DeserializeAcsRouterJobReceivedEve channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, jobStatus, classificationPolicyId, priority, diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs index 13c6c91c8c64..c712d537cfe2 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobReceivedEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobReceivedEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Unavailable For Matching for Router Job Received. - internal AcsRouterJobReceivedEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobReceivedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + RequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs index c8b8e96f4057..7d7c5e07956f 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobSchedulingFailedEventData DeserializeAcsRouterJobSch channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs index 4d8112a29709..5f400a1c0355 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobSchedulingFailedEventData.cs @@ -14,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobSchedulingFailedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobSchedulingFailedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobSchedulingFailedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs index 43af7a79bfdd..bce0dba3c9e6 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.Serialization.cs @@ -48,10 +48,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -62,10 +58,6 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -95,8 +87,8 @@ internal static AcsRouterJobUnassignedEventData DeserializeAcsRouterJobUnassigne channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, assignmentId, workerId); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs index bffd65c3cbda..bcfc3db88d4a 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobUnassignedEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,13 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobUnassignedEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobUnassignedEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobUnassignedEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); } /// Initializes a new instance of . diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs index ac76ef097876..2ca035d25d96 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.Serialization.cs @@ -92,10 +92,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -106,10 +102,6 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -139,8 +131,8 @@ internal static AcsRouterJobWaitingForActivationEventData DeserializeAcsRouterJo channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, priority, expiredAttachedWorkerSelectors ?? new ChangeTrackingList(), expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs index 63560d33256a..436bde258fb1 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWaitingForActivationEventData.cs @@ -14,9 +14,15 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWaitingForActivationEventData : AcsRouterJobEventData { /// Initializes a new instance of . + /// Router Job events Labels. + /// Router Jobs events Tags. /// Router Job Waiting For Activation Unavailable For Matching. - internal AcsRouterJobWaitingForActivationEventData(bool unavailableForMatching) + /// or is null. + internal AcsRouterJobWaitingForActivationEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags, bool unavailableForMatching) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); UnavailableForMatching = unavailableForMatching; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs index 6fcb3dd32ab7..e778ac9ae112 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.Serialization.cs @@ -66,10 +66,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("labels"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -80,10 +76,6 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter } if (property.NameEquals("tags"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } Dictionary dictionary = new Dictionary(); foreach (var property0 in property.Value.EnumerateObject()) { @@ -113,8 +105,8 @@ internal static AcsRouterJobWorkerSelectorsExpiredEventData DeserializeAcsRouter channelReference, channelId, queueId, - labels ?? new ChangeTrackingDictionary(), - tags ?? new ChangeTrackingDictionary(), + labels, + tags, expiredRequestedWorkerSelectors ?? new ChangeTrackingList(), expiredAttachedWorkerSelectors ?? new ChangeTrackingList()); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs index 386be9d0060b..3f0bc7c56977 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsRouterJobWorkerSelectorsExpiredEventData.cs @@ -5,6 +5,7 @@ #nullable disable +using System; using System.Collections.Generic; namespace Azure.Messaging.EventGrid.SystemEvents @@ -13,8 +14,14 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsRouterJobWorkerSelectorsExpiredEventData : AcsRouterJobEventData { /// Initializes a new instance of . - internal AcsRouterJobWorkerSelectorsExpiredEventData() + /// Router Job events Labels. + /// Router Jobs events Tags. + /// or is null. + internal AcsRouterJobWorkerSelectorsExpiredEventData(IReadOnlyDictionary labels, IReadOnlyDictionary tags) : base(labels, tags) { + Argument.AssertNotNull(labels, nameof(labels)); + Argument.AssertNotNull(tags, nameof(tags)); + ExpiredRequestedWorkerSelectors = new ChangeTrackingList(); ExpiredAttachedWorkerSelectors = new ChangeTrackingList(); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs index 21c072e6265f..19f4af830866 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.Serialization.cs @@ -43,10 +43,6 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR } if (property.NameEquals("deliveryAttempts"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -91,7 +87,7 @@ internal static AcsSmsDeliveryReportReceivedEventData DeserializeAcsSmsDeliveryR to, deliveryStatus, deliveryStatusDetails, - deliveryAttempts ?? new ChangeTrackingList(), + deliveryAttempts, receivedTimestamp, tag); } diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs index ed1420496297..9f1914c177d7 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsDeliveryReportReceivedEventData.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.Messaging.EventGrid.SystemEvents { @@ -14,9 +15,25 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsDeliveryReportReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . - internal AcsSmsDeliveryReportReceivedEventData() + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// Status of Delivery. + /// Details about Delivery Status. + /// List of details of delivery attempts made. + /// , , , , or is null. + internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IEnumerable deliveryAttempts) : base(messageId, @from, to) { - DeliveryAttempts = new ChangeTrackingList(); + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(deliveryStatus, nameof(deliveryStatus)); + Argument.AssertNotNull(deliveryStatusDetails, nameof(deliveryStatusDetails)); + Argument.AssertNotNull(deliveryAttempts, nameof(deliveryAttempts)); + + DeliveryStatus = deliveryStatus; + DeliveryStatusDetails = deliveryStatusDetails; + DeliveryAttempts = deliveryAttempts.ToList(); } /// Initializes a new instance of . @@ -28,8 +45,13 @@ internal AcsSmsDeliveryReportReceivedEventData() /// List of details of delivery attempts made. /// The time at which the SMS delivery report was received. /// Customer Content. + /// , or is null. internal AcsSmsDeliveryReportReceivedEventData(string messageId, string @from, string to, string deliveryStatus, string deliveryStatusDetails, IReadOnlyList deliveryAttempts, DateTimeOffset? receivedTimestamp, string tag) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + DeliveryStatus = deliveryStatus; DeliveryStatusDetails = deliveryStatusDetails; DeliveryAttempts = deliveryAttempts; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs index 8608591a1983..db2f1cd35bac 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsEventBaseProperties.cs @@ -5,22 +5,24 @@ #nullable disable +using System; + namespace Azure.Messaging.EventGrid.SystemEvents { /// Schema of common properties of all SMS events. public partial class AcsSmsEventBaseProperties { - /// Initializes a new instance of . - internal AcsSmsEventBaseProperties() - { - } - /// Initializes a new instance of . /// The identity of the SMS message. /// The identity of SMS message sender. /// The identity of SMS message receiver. + /// , or is null. internal AcsSmsEventBaseProperties(string messageId, string @from, string to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + MessageId = messageId; From = @from; To = to; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs index 5cb9b0a642af..99c42b1b4626 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/AcsSmsReceivedEventData.cs @@ -13,9 +13,20 @@ namespace Azure.Messaging.EventGrid.SystemEvents public partial class AcsSmsReceivedEventData : AcsSmsEventBaseProperties { /// Initializes a new instance of . + /// The identity of the SMS message. + /// The identity of SMS message sender. + /// The identity of SMS message receiver. + /// The SMS content. /// Number of segments in the message. - internal AcsSmsReceivedEventData(int segmentCount) + /// , , or is null. + internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(message, nameof(message)); + + Message = message; SegmentCount = segmentCount; } @@ -26,8 +37,13 @@ internal AcsSmsReceivedEventData(int segmentCount) /// The SMS content. /// The time at which the SMS was received. /// Number of segments in the message. + /// , or is null. internal AcsSmsReceivedEventData(string messageId, string @from, string to, string message, DateTimeOffset? receivedTimestamp, int segmentCount) : base(messageId, @from, to) { + Argument.AssertNotNull(messageId, nameof(messageId)); + Argument.AssertNotNull(@from, nameof(@from)); + Argument.AssertNotNull(to, nameof(to)); + Message = message; ReceivedTimestamp = receivedTimestamp; SegmentCount = segmentCount; diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs new file mode 100644 index 000000000000..a58e224054df --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerClosedEventDataConverter))] + public partial class ApiManagementCircuitBreakerClosedEventData + { + internal static ApiManagementCircuitBreakerClosedEventData DeserializeApiManagementCircuitBreakerClosedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerClosedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerClosedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerClosedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerClosedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerClosedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerClosedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs new file mode 100644 index 000000000000..897cfa437c87 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerClosedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Closed event. + public partial class ApiManagementCircuitBreakerClosedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerClosedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has closed. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerClosedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has closed. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs new file mode 100644 index 000000000000..c8f409d55e6f --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.Serialization.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementCircuitBreakerOpenedEventDataConverter))] + public partial class ApiManagementCircuitBreakerOpenedEventData + { + internal static ApiManagementCircuitBreakerOpenedEventData DeserializeApiManagementCircuitBreakerOpenedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string backendName = default; + ApiManagementCircuitBreakerProperties circuitBreaker = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("backendName"u8)) + { + backendName = property.Value.GetString(); + continue; + } + if (property.NameEquals("circuitBreaker"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + circuitBreaker = ApiManagementCircuitBreakerProperties.DeserializeApiManagementCircuitBreakerProperties(property.Value); + continue; + } + } + return new ApiManagementCircuitBreakerOpenedEventData(backendName, circuitBreaker); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerOpenedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + + internal partial class ApiManagementCircuitBreakerOpenedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementCircuitBreakerOpenedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementCircuitBreakerOpenedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementCircuitBreakerOpenedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs new file mode 100644 index 000000000000..a2e73568a90b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerOpenedEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.CircuitBreaker.Opened event. + public partial class ApiManagementCircuitBreakerOpenedEventData + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerOpenedEventData() + { + } + + /// Initializes a new instance of . + /// Name of the backend for which the circuit has opened. + /// Information related to the circuit breaker configured on the backend. + internal ApiManagementCircuitBreakerOpenedEventData(string backendName, ApiManagementCircuitBreakerProperties circuitBreaker) + { + BackendName = backendName; + CircuitBreaker = circuitBreaker; + } + + /// Name of the backend for which the circuit has opened. + public string BackendName { get; } + /// Information related to the circuit breaker configured on the backend. + public ApiManagementCircuitBreakerProperties CircuitBreaker { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs new file mode 100644 index 000000000000..78f35106bf1d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.Serialization.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementCircuitBreakerProperties + { + internal static ApiManagementCircuitBreakerProperties DeserializeApiManagementCircuitBreakerProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyDictionary rules = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("rules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + 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, property0.Value.GetObject()); + } + } + rules = dictionary; + continue; + } + } + return new ApiManagementCircuitBreakerProperties(rules ?? new ChangeTrackingDictionary()); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementCircuitBreakerProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementCircuitBreakerProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs new file mode 100644 index 000000000000..0aebae96e81b --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementCircuitBreakerProperties.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Collections.Generic; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to the circuit breaker configured on the backend. + public partial class ApiManagementCircuitBreakerProperties + { + /// Initializes a new instance of . + internal ApiManagementCircuitBreakerProperties() + { + Rules = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Overview of all configured rules and respective details. + internal ApiManagementCircuitBreakerProperties(IReadOnlyDictionary rules) + { + Rules = rules; + } + + /// Overview of all configured rules and respective details. + public IReadOnlyDictionary Rules { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs new file mode 100644 index 000000000000..2845e4321078 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementExpiredGatewayTokenProperties + { + internal static ApiManagementExpiredGatewayTokenProperties DeserializeApiManagementExpiredGatewayTokenProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiredAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiredAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiredAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementExpiredGatewayTokenProperties(expiredAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementExpiredGatewayTokenProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementExpiredGatewayTokenProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs new file mode 100644 index 000000000000..d6a2f1a4f92e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementExpiredGatewayTokenProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public partial class ApiManagementExpiredGatewayTokenProperties + { + /// Initializes a new instance of . + internal ApiManagementExpiredGatewayTokenProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token has expired. + internal ApiManagementExpiredGatewayTokenProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token has expired. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs new file mode 100644 index 000000000000..514405425e94 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.Serialization.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayProperties + { + internal static ApiManagementGatewayProperties DeserializeApiManagementGatewayProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string gatewayId = default; + string instanceId = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayId"u8)) + { + gatewayId = property.Value.GetString(); + continue; + } + if (property.NameEquals("instanceId"u8)) + { + instanceId = property.Value.GetString(); + continue; + } + } + return new ApiManagementGatewayProperties(gatewayId, instanceId); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs new file mode 100644 index 000000000000..2dda56e1690e --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayProperties.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a given self-hosted gateway deployment. + public partial class ApiManagementGatewayProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayProperties() + { + } + + /// Initializes a new instance of . + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + /// Unique instance ID of the deployed gateway. + internal ApiManagementGatewayProperties(string gatewayId, string instanceId) + { + GatewayId = gatewayId; + InstanceId = instanceId; + } + + /// Id of Gateway that is used to deploy the gateway to get the configuration for. This is the ARM resource ID referenced in the Azure API Management instance. + public string GatewayId { get; } + /// Unique instance ID of the deployed gateway. + public string InstanceId { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs new file mode 100644 index 000000000000..0ed20221e377 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenExpiredEventDataConverter))] + public partial class ApiManagementGatewayTokenExpiredEventData + { + internal static ApiManagementGatewayTokenExpiredEventData DeserializeApiManagementGatewayTokenExpiredEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementExpiredGatewayTokenProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementExpiredGatewayTokenProperties.DeserializeApiManagementExpiredGatewayTokenProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenExpiredEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenExpiredEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenExpiredEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenExpiredEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenExpiredEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenExpiredEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs new file mode 100644 index 000000000000..99ce9f9f3bfc --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenExpiredEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenExpired event. + public partial class ApiManagementGatewayTokenExpiredEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenExpiredEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenExpiredEventData(ApiManagementGatewayProperties gateway, ApiManagementExpiredGatewayTokenProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a an expired gateway token for a self-hosted gateway deployment. + public ApiManagementExpiredGatewayTokenProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs new file mode 100644 index 000000000000..842e50b94cde --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.Serialization.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(ApiManagementGatewayTokenNearExpiryEventDataConverter))] + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + internal static ApiManagementGatewayTokenNearExpiryEventData DeserializeApiManagementGatewayTokenNearExpiryEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ApiManagementGatewayProperties gatewayInfo = default; + ApiManagementGatewayTokenNearExpiryProperties tokenInfo = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("gatewayInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gatewayInfo = ApiManagementGatewayProperties.DeserializeApiManagementGatewayProperties(property.Value); + continue; + } + if (property.NameEquals("tokenInfo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenInfo = ApiManagementGatewayTokenNearExpiryProperties.DeserializeApiManagementGatewayTokenNearExpiryProperties(property.Value); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryEventData(gatewayInfo, tokenInfo); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + + internal partial class ApiManagementGatewayTokenNearExpiryEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, ApiManagementGatewayTokenNearExpiryEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override ApiManagementGatewayTokenNearExpiryEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeApiManagementGatewayTokenNearExpiryEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs new file mode 100644 index 000000000000..abc56161ade8 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryEventData.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.GatewayTokenNearExpiry event. + public partial class ApiManagementGatewayTokenNearExpiryEventData + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryEventData() + { + } + + /// Initializes a new instance of . + /// Information related to a given self-hosted gateway deployment. + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + internal ApiManagementGatewayTokenNearExpiryEventData(ApiManagementGatewayProperties gateway, ApiManagementGatewayTokenNearExpiryProperties token) + { + Gateway = gateway; + Token = token; + } + + /// Information related to a given self-hosted gateway deployment. + public ApiManagementGatewayProperties Gateway { get; } + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public ApiManagementGatewayTokenNearExpiryProperties Token { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs new file mode 100644 index 000000000000..5169abd95612 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.Serialization.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + internal static ApiManagementGatewayTokenNearExpiryProperties DeserializeApiManagementGatewayTokenNearExpiryProperties(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expiresAtUtc = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expiresAtUtc"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expiresAtUtc = property.Value.GetDateTimeOffset("O"); + continue; + } + } + return new ApiManagementGatewayTokenNearExpiryProperties(expiresAtUtc); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static ApiManagementGatewayTokenNearExpiryProperties FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeApiManagementGatewayTokenNearExpiryProperties(document.RootElement); + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs new file mode 100644 index 000000000000..7c6084b3a12d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/ApiManagementGatewayTokenNearExpiryProperties.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Information related to a gateway token that is near expiry for a self-hosted gateway deployment. + public partial class ApiManagementGatewayTokenNearExpiryProperties + { + /// Initializes a new instance of . + internal ApiManagementGatewayTokenNearExpiryProperties() + { + } + + /// Initializes a new instance of . + /// Timestamp when the gateway token will expire. + internal ApiManagementGatewayTokenNearExpiryProperties(DateTimeOffset? expiresOn) + { + ExpiresOn = expiresOn; + } + + /// Timestamp when the gateway token will expire. + public DateTimeOffset? ExpiresOn { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs new file mode 100644 index 000000000000..c553e1b9cf6d --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.Serialization.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + [JsonConverter(typeof(EdgeSolutionVersionPublishedEventDataConverter))] + public partial class EdgeSolutionVersionPublishedEventData + { + internal static EdgeSolutionVersionPublishedEventData DeserializeEdgeSolutionVersionPublishedEventData(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string externalValidationId = default; + string targetId = default; + string solutionTemplateId = default; + string solutionTemplateVersionId = default; + string solutionVersionId = default; + string apiVersion = default; + Uri callbackUrl = default; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("externalValidationId"u8)) + { + externalValidationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("targetId"u8)) + { + targetId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateId"u8)) + { + solutionTemplateId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionTemplateVersionId"u8)) + { + solutionTemplateVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("solutionVersionId"u8)) + { + solutionVersionId = property.Value.GetString(); + continue; + } + if (property.NameEquals("apiVersion"u8)) + { + apiVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("callbackUrl"u8)) + { + callbackUrl = new Uri(property.Value.GetString()); + continue; + } + } + return new EdgeSolutionVersionPublishedEventData( + externalValidationId, + targetId, + solutionTemplateId, + solutionTemplateVersionId, + solutionVersionId, + apiVersion, + callbackUrl); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static EdgeSolutionVersionPublishedEventData FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + + internal partial class EdgeSolutionVersionPublishedEventDataConverter : JsonConverter + { + public override void Write(Utf8JsonWriter writer, EdgeSolutionVersionPublishedEventData model, JsonSerializerOptions options) + { + throw new NotImplementedException(); + } + + public override EdgeSolutionVersionPublishedEventData Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + using var document = JsonDocument.ParseValue(ref reader); + return DeserializeEdgeSolutionVersionPublishedEventData(document.RootElement); + } + } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs new file mode 100644 index 000000000000..12a8779da578 --- /dev/null +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/Generated/Models/EdgeSolutionVersionPublishedEventData.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; + +namespace Azure.Messaging.EventGrid.SystemEvents +{ + /// Schema of the Data property of an EventGridEvent for a Microsoft.Edge.SolutionVersionPublished event. + public partial class EdgeSolutionVersionPublishedEventData + { + /// Initializes a new instance of . + /// A GUID to uniquely track External Solution Validation. + /// ARM ID of the Target resource. + /// ARM ID of the Solution Template resource. + /// ARM ID of the Solution Template Version resource. + /// ARM ID of the Solution Version resource. + /// API Version supported for the resources. + /// Direct URL to callback for updating validation status. + /// , , , , , or is null. + internal EdgeSolutionVersionPublishedEventData(string externalValidationId, string targetId, string solutionTemplateId, string solutionTemplateVersionId, string solutionVersionId, string apiVersion, Uri callbackUrl) + { + Argument.AssertNotNull(externalValidationId, nameof(externalValidationId)); + Argument.AssertNotNull(targetId, nameof(targetId)); + Argument.AssertNotNull(solutionTemplateId, nameof(solutionTemplateId)); + Argument.AssertNotNull(solutionTemplateVersionId, nameof(solutionTemplateVersionId)); + Argument.AssertNotNull(solutionVersionId, nameof(solutionVersionId)); + Argument.AssertNotNull(apiVersion, nameof(apiVersion)); + Argument.AssertNotNull(callbackUrl, nameof(callbackUrl)); + + ExternalValidationId = externalValidationId; + TargetId = targetId; + SolutionTemplateId = solutionTemplateId; + SolutionTemplateVersionId = solutionTemplateVersionId; + SolutionVersionId = solutionVersionId; + ApiVersion = apiVersion; + CallbackUrl = callbackUrl; + } + + /// A GUID to uniquely track External Solution Validation. + public string ExternalValidationId { get; } + /// ARM ID of the Target resource. + public string TargetId { get; } + /// ARM ID of the Solution Template resource. + public string SolutionTemplateId { get; } + /// ARM ID of the Solution Template Version resource. + public string SolutionTemplateVersionId { get; } + /// ARM ID of the Solution Version resource. + public string SolutionVersionId { get; } + /// API Version supported for the resources. + public string ApiVersion { get; } + /// Direct URL to callback for updating validation status. + public Uri CallbackUrl { get; } + } +} diff --git a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md index b12e339e22f2..b6eb004c3cce 100644 --- a/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md +++ b/sdk/eventgrid/Azure.Messaging.EventGrid/src/autorest.md @@ -4,7 +4,9 @@ Run `dotnet build /t:GenerateCode` to generate code. ``` yaml title: EventGridClient -require: https://github.com/Azure/azure-rest-api-specs/blob/8af03db33a90581edffb8a32fea562f36b7c61a8/specification/eventgrid/data-plane/readme.md +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/eventgrid/data-plane/readme.md + generation1-convenience-client: true model-factory-for-hlc: - MediaJobOutputAsset @@ -209,3 +211,4 @@ directive: $.MediaLiveEventIngestHeartbeatEventData["properties"]["ingestDriftValue"]["x-ms-client-name"] = "IngestDriftValueInternal"; $.MediaLiveEventIngestHeartbeatEventData["properties"]["lastFragmentArrivalTime"]["format"] = "date-time"; ``` + diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs index f765476dabd8..760db8079dda 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.net8.0.cs @@ -78,6 +78,8 @@ public static partial class FabricExtensions public static Azure.ResourceManager.Fabric.FabricCapacityResource GetFabricCapacityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetSkusFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSkusFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetUsagesFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Mocking @@ -103,6 +105,8 @@ protected MockableFabricSubscriptionResource() { } public virtual Azure.AsyncPageable GetFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusFabricCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSkusFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetUsagesFabricCapacities(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Models @@ -112,8 +116,10 @@ public static partial class ArmFabricModelFactory public static Azure.ResourceManager.Fabric.FabricCapacityData FabricCapacityData(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.Fabric.Models.FabricCapacityProperties properties = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricCapacityProperties FabricCapacityProperties(Azure.ResourceManager.Fabric.Models.FabricProvisioningState? provisioningState = default(Azure.ResourceManager.Fabric.Models.FabricProvisioningState?), Azure.ResourceManager.Fabric.Models.FabricResourceState? state = default(Azure.ResourceManager.Fabric.Models.FabricResourceState?), System.Collections.Generic.IEnumerable administrationMembers = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityResult FabricNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason? reason = default(Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.FabricQuota FabricQuota(Azure.ResourceManager.Fabric.Models.QuotaName name = null, string unit = null, long currentValue = (long)0, long limit = (long)0) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForExistingCapacity FabricSkuDetailsForExistingCapacity(string resourceType = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(string resourceType = null, string name = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.QuotaName QuotaName(string value = null, string localizedValue = null) { throw null; } } public partial class FabricCapacityAdministration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -217,6 +223,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricProvisioningState left, Azure.ResourceManager.Fabric.Models.FabricProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricQuota : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FabricQuota() { } + public long CurrentValue { get { throw null; } } + public long Limit { get { throw null; } } + public Azure.ResourceManager.Fabric.Models.QuotaName Name { get { throw null; } } + public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota 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.Fabric.Models.FabricQuota 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 FabricResourceState : System.IEquatable { @@ -299,4 +319,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricSkuTier left, Azure.ResourceManager.Fabric.Models.FabricSkuTier right) { throw null; } public override string ToString() { throw null; } } + public partial class QuotaName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QuotaName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName 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.Fabric.Models.QuotaName 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; } + } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs index f765476dabd8..760db8079dda 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/api/Azure.ResourceManager.Fabric.netstandard2.0.cs @@ -78,6 +78,8 @@ public static partial class FabricExtensions public static Azure.ResourceManager.Fabric.FabricCapacityResource GetFabricCapacityResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Pageable GetSkusFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetSkusFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetUsagesFabricCapacities(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Mocking @@ -103,6 +105,8 @@ protected MockableFabricSubscriptionResource() { } public virtual Azure.AsyncPageable GetFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetSkusFabricCapacities(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetSkusFabricCapacitiesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetUsagesFabricCapacities(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetUsagesFabricCapacitiesAsync(string location, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Fabric.Models @@ -112,8 +116,10 @@ public static partial class ArmFabricModelFactory public static Azure.ResourceManager.Fabric.FabricCapacityData FabricCapacityData(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.Fabric.Models.FabricCapacityProperties properties = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricCapacityProperties FabricCapacityProperties(Azure.ResourceManager.Fabric.Models.FabricProvisioningState? provisioningState = default(Azure.ResourceManager.Fabric.Models.FabricProvisioningState?), Azure.ResourceManager.Fabric.Models.FabricResourceState? state = default(Azure.ResourceManager.Fabric.Models.FabricResourceState?), System.Collections.Generic.IEnumerable administrationMembers = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricNameAvailabilityResult FabricNameAvailabilityResult(bool? isNameAvailable = default(bool?), Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason? reason = default(Azure.ResourceManager.Fabric.Models.FabricNameUnavailableReason?), string message = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.FabricQuota FabricQuota(Azure.ResourceManager.Fabric.Models.QuotaName name = null, string unit = null, long currentValue = (long)0, long limit = (long)0) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForExistingCapacity FabricSkuDetailsForExistingCapacity(string resourceType = null, Azure.ResourceManager.Fabric.Models.FabricSku sku = null) { throw null; } public static Azure.ResourceManager.Fabric.Models.FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(string resourceType = null, string name = null, System.Collections.Generic.IEnumerable locations = null) { throw null; } + public static Azure.ResourceManager.Fabric.Models.QuotaName QuotaName(string value = null, string localizedValue = null) { throw null; } } public partial class FabricCapacityAdministration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -217,6 +223,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricProvisioningState left, Azure.ResourceManager.Fabric.Models.FabricProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class FabricQuota : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FabricQuota() { } + public long CurrentValue { get { throw null; } } + public long Limit { get { throw null; } } + public Azure.ResourceManager.Fabric.Models.QuotaName Name { get { throw null; } } + public string Unit { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.FabricQuota 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.Fabric.Models.FabricQuota 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 FabricResourceState : System.IEquatable { @@ -299,4 +319,16 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.ResourceManager.Fabric.Models.FabricSkuTier left, Azure.ResourceManager.Fabric.Models.FabricSkuTier right) { throw null; } public override string ToString() { throw null; } } + public partial class QuotaName : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal QuotaName() { } + public string LocalizedValue { get { throw null; } } + public string Value { get { throw null; } } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Fabric.Models.QuotaName 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.Fabric.Models.QuotaName 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; } + } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs index b1c27d0f1b41..46bd90876462 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_FabricCapacityCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_CreateOrUpdate.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_CreateOrUpdate.json // this example is just showing the usage of "FabricCapacity_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 @@ -56,7 +56,7 @@ public async Task CreateOrUpdate_CreateOrUpdateACapacity() [Ignore("Only validating compilation of examples")] public async Task Get_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_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 @@ -89,7 +89,7 @@ public async Task Get_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListCapacitiesByResourceGroup() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListByResourceGroup.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListByResourceGroup.json // this example is just showing the usage of "FabricCapacity_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 @@ -124,7 +124,7 @@ public async Task GetAll_ListCapacitiesByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_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 @@ -153,7 +153,7 @@ public async Task Exists_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_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/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs index 5e2c7ab6aeea..e009f1dc7148 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_FabricCapacityResource.cs @@ -20,7 +20,7 @@ public partial class Sample_FabricCapacityResource [Ignore("Only validating compilation of examples")] public async Task Get_GetACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Get.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Get.json // this example is just showing the usage of "FabricCapacity_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 @@ -50,7 +50,7 @@ public async Task Get_GetACapacity() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Delete.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Delete.json // this example is just showing the usage of "FabricCapacity_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 @@ -76,7 +76,7 @@ public async Task Delete_DeleteACapacity() [Ignore("Only validating compilation of examples")] public async Task Update_UpdateCapacityProperties() { - // Generated from example definition: 2023-11-01/FabricCapacities_Update.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Update.json // this example is just showing the usage of "FabricCapacity_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 @@ -116,7 +116,7 @@ public async Task Update_UpdateCapacityProperties() [Ignore("Only validating compilation of examples")] public async Task Resume_ResumeCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Resume.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Resume.json // this example is just showing the usage of "FabricCapacities_Resume" 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 @@ -142,7 +142,7 @@ public async Task Resume_ResumeCapacity() [Ignore("Only validating compilation of examples")] public async Task Suspend_SuspendCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_Suspend.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_Suspend.json // this example is just showing the usage of "FabricCapacities_Suspend" 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 @@ -168,7 +168,7 @@ public async Task Suspend_SuspendCapacity() [Ignore("Only validating compilation of examples")] public async Task GetSkusForCapacity_ListEligibleSKUsForAnExistingCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListSkusForCapacity.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListSkusForCapacity.json // this example is just showing the usage of "FabricCapacities_ListSkusForCapacity" 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/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index e7a09ad2cfea..98d5e5225e06 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetFabricCapacities_ListCapacitiesBySubscription() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListBySubscription.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListBySubscription.json // this example is just showing the usage of "FabricCapacity_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 @@ -52,7 +52,7 @@ public async Task GetFabricCapacities_ListCapacitiesBySubscription() [Ignore("Only validating compilation of examples")] public async Task CheckFabricCapacityNameAvailability_CheckNameAvailabilityOfACapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_CheckNameAvailability.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_CheckNameAvailability.json // this example is just showing the usage of "FabricCapacities_CheckFabricCapacityNameAvailability" 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 @@ -82,7 +82,7 @@ public async Task CheckFabricCapacityNameAvailability_CheckNameAvailabilityOfACa [Ignore("Only validating compilation of examples")] public async Task GetSkusFabricCapacities_ListEligibleSKUsForANewCapacity() { - // Generated from example definition: 2023-11-01/FabricCapacities_ListSkus.json + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListSkus.json // this example is just showing the usage of "FabricCapacities_ListSkus" 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 @@ -104,5 +104,33 @@ public async Task GetSkusFabricCapacities_ListEligibleSKUsForANewCapacity() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetUsagesFabricCapacities_ListQuotaUsagesForASubscription() + { + // Generated from example definition: 2025-01-15-preview/FabricCapacities_ListUsagesBySubscription.json + // this example is just showing the usage of "FabricCapacities_ListUsages" 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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "548B7FB7-3B2A-4F46-BB02-66473F1FC22C"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + string location = "centraluseuap"; + await foreach (FabricQuota item in subscriptionResource.GetUsagesFabricCapacitiesAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs index 8941166c4928..814f361c9cea 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/ArmFabricModelFactory.cs @@ -84,5 +84,25 @@ public static FabricSkuDetailsForNewCapacity FabricSkuDetailsForNewCapacity(stri return new FabricSkuDetailsForNewCapacity(resourceType, name, locations?.ToList(), serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The name of the quota. + /// The unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// A new instance for mocking. + public static FabricQuota FabricQuota(QuotaName name = null, string unit = null, long currentValue = default, long limit = default) + { + return new FabricQuota(name, unit, currentValue, limit, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// A new instance for mocking. + public static QuotaName QuotaName(string value = null, string localizedValue = null) + { + return new QuotaName(value, localizedValue, serializedAdditionalRawData: null); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs index ed974a30caaf..89f3f3fa3879 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/FabricExtensions.cs @@ -82,7 +82,7 @@ public static FabricCapacityCollection GetFabricCapacities(this ResourceGroupRes /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -120,7 +120,7 @@ public static async Task> GetFabricCapacityAsyn /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -158,7 +158,7 @@ public static Response GetFabricCapacity(this ResourceGr /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -194,7 +194,7 @@ public static AsyncPageable GetFabricCapacitiesAsync(thi /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -230,7 +230,7 @@ public static Pageable GetFabricCapacities(this Subscrip /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -267,7 +267,7 @@ public static async Task> CheckFabricCapa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -304,7 +304,7 @@ public static Response CheckFabricCapacityNameAvai /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -340,7 +340,7 @@ public static AsyncPageable GetSkusFabricCapacit /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -362,5 +362,81 @@ public static Pageable GetSkusFabricCapacities(t return GetMockableFabricSubscriptionResource(subscriptionResource).GetSkusFabricCapacities(cancellationToken); } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetUsagesFabricCapacitiesAsync(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableFabricSubscriptionResource(subscriptionResource).GetUsagesFabricCapacitiesAsync(location, cancellationToken); + } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetUsagesFabricCapacities(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableFabricSubscriptionResource(subscriptionResource).GetUsagesFabricCapacities(location, cancellationToken); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs index 889c9fd5efe8..3b568590ab79 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual FabricCapacityCollection GetFabricCapacities() /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetFabricCapacityAsy /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs index 713a6f250fc9..4acb11840856 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Extensions/MockableFabricSubscriptionResource.cs @@ -55,7 +55,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -85,7 +85,7 @@ public virtual AsyncPageable GetFabricCapacitiesAsync(Ca /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual Pageable GetFabricCapacities(Cancellation /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -158,7 +158,7 @@ public virtual async Task> CheckFabricCap /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -201,7 +201,7 @@ public virtual Response CheckFabricCapacityNameAva /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -231,7 +231,7 @@ public virtual AsyncPageable GetSkusFabricCapaci /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -247,5 +247,75 @@ public virtual Pageable GetSkusFabricCapacities( HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListSkusNextPageRequest(nextLink, Id.SubscriptionId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FabricSkuDetailsForNewCapacity.DeserializeFabricSkuDetailsForNewCapacity(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetSkusFabricCapacities", "value", "nextLink", cancellationToken); } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetUsagesFabricCapacitiesAsync(string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricCapacityRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FabricQuota.DeserializeFabricQuota(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetUsagesFabricCapacities", "value", "nextLink", cancellationToken); + } + + /// + /// List the current consumption and limit in this location for the provided subscription + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Fabric/locations/{location}/usages + /// + /// + /// Operation Id + /// FabricCapacities_ListUsages + /// + /// + /// Default Api Version + /// 2025-01-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The location name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetUsagesFabricCapacities(string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => FabricCapacityRestClient.CreateListUsagesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => FabricCapacityRestClient.CreateListUsagesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FabricQuota.DeserializeFabricQuota(e), FabricCapacityClientDiagnostics, Pipeline, "MockableFabricSubscriptionResource.GetUsagesFabricCapacities", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs index db3ef094894a..a26c2e3dcae7 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string capa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string capacityName, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string capacityName, Cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string capacityName, CancellationToken canc /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs index 646a5cf80b01..721decb55e7d 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/FabricCapacityResource.cs @@ -104,7 +104,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -268,7 +268,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task ResumeAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -444,7 +444,7 @@ public virtual ArmOperation Resume(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -486,7 +486,7 @@ public virtual async Task SuspendAsync(WaitUntil waitUntil, Cancel /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -528,7 +528,7 @@ public virtual ArmOperation Suspend(WaitUntil waitUntil, CancellationToken cance /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -558,7 +558,7 @@ public virtual AsyncPageable GetSkusForCapa /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -588,7 +588,7 @@ public virtual Pageable GetSkusForCapacity( /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -650,7 +650,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -712,7 +712,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -769,7 +769,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -826,7 +826,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource @@ -886,7 +886,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-11-01 + /// 2025-01-15-preview /// /// /// Resource diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs new file mode 100644 index 000000000000..11b013261ca7 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.Serialization.cs @@ -0,0 +1,157 @@ +// 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.Fabric.Models +{ + public partial class FabricQuota : 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(FabricQuota)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteObjectValue(Name, options); + } + writer.WritePropertyName("unit"u8); + writer.WriteStringValue(Unit); + writer.WritePropertyName("currentValue"u8); + writer.WriteNumberValue(CurrentValue); + writer.WritePropertyName("limit"u8); + writer.WriteNumberValue(Limit); + 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 + } + } + } + + FabricQuota 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(FabricQuota)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFabricQuota(document.RootElement, options); + } + + internal static FabricQuota DeserializeFabricQuota(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + QuotaName name = default; + string unit = default; + long currentValue = default; + long limit = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + name = QuotaName.DeserializeQuotaName(property.Value, options); + continue; + } + if (property.NameEquals("unit"u8)) + { + unit = property.Value.GetString(); + continue; + } + if (property.NameEquals("currentValue"u8)) + { + currentValue = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("limit"u8)) + { + limit = property.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FabricQuota(name, unit, currentValue, limit, 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, AzureResourceManagerFabricContext.Default); + default: + throw new FormatException($"The model {nameof(FabricQuota)} does not support writing '{options.Format}' format."); + } + } + + FabricQuota 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 DeserializeFabricQuota(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FabricQuota)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs new file mode 100644 index 000000000000..44b2e23c9f80 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/FabricQuota.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Fabric.Models +{ + /// Describes Resource Quota. + public partial class FabricQuota + { + /// + /// 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 unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// is null. + internal FabricQuota(string unit, long currentValue, long limit) + { + Argument.AssertNotNull(unit, nameof(unit)); + + Unit = unit; + CurrentValue = currentValue; + Limit = limit; + } + + /// Initializes a new instance of . + /// The name of the quota. + /// The unit of usage measurement. + /// The current usage of the resource. + /// The maximum permitted usage of the resource. + /// Keeps track of any properties unknown to the library. + internal FabricQuota(QuotaName name, string unit, long currentValue, long limit, IDictionary serializedAdditionalRawData) + { + Name = name; + Unit = unit; + CurrentValue = currentValue; + Limit = limit; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FabricQuota() + { + } + + /// The name of the quota. + public QuotaName Name { get; } + /// The unit of usage measurement. + public string Unit { get; } + /// The current usage of the resource. + public long CurrentValue { get; } + /// The maximum permitted usage of the resource. + public long Limit { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.Serialization.cs new file mode 100644 index 000000000000..3b485069a682 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.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.Fabric.Models +{ + internal partial class PagedQuota : 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(PagedQuota)} 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 + } + } + } + + PagedQuota 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(PagedQuota)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePagedQuota(document.RootElement, options); + } + + internal static PagedQuota DeserializePagedQuota(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(FabricQuota.DeserializeFabricQuota(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 PagedQuota(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, AzureResourceManagerFabricContext.Default); + default: + throw new FormatException($"The model {nameof(PagedQuota)} does not support writing '{options.Format}' format."); + } + } + + PagedQuota 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 DeserializePagedQuota(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PagedQuota)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.cs new file mode 100644 index 000000000000..9126a94eba10 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/PagedQuota.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.Fabric.Models +{ + /// Paged collection of Quota items. + internal partial class PagedQuota + { + /// + /// 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 Quota items on this page. + /// is null. + internal PagedQuota(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The Quota items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal PagedQuota(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal PagedQuota() + { + } + + /// The Quota items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.Serialization.cs new file mode 100644 index 000000000000..2f107b18382a --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.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.Fabric.Models +{ + public partial class QuotaName : 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(QuotaName)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStringValue(Value); + } + if (Optional.IsDefined(LocalizedValue)) + { + writer.WritePropertyName("localizedValue"u8); + writer.WriteStringValue(LocalizedValue); + } + 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 + } + } + } + + QuotaName 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(QuotaName)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeQuotaName(document.RootElement, options); + } + + internal static QuotaName DeserializeQuotaName(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string value = default; + string localizedValue = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + value = property.Value.GetString(); + continue; + } + if (property.NameEquals("localizedValue"u8)) + { + localizedValue = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new QuotaName(value, localizedValue, 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, AzureResourceManagerFabricContext.Default); + default: + throw new FormatException($"The model {nameof(QuotaName)} does not support writing '{options.Format}' format."); + } + } + + QuotaName 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 DeserializeQuotaName(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(QuotaName)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.cs new file mode 100644 index 000000000000..2cc074030df6 --- /dev/null +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/Models/QuotaName.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.Fabric.Models +{ + /// The Quota Names. + public partial class QuotaName + { + /// + /// 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 . + internal QuotaName() + { + } + + /// Initializes a new instance of . + /// The name of the resource. + /// The localized name of the resource. + /// Keeps track of any properties unknown to the library. + internal QuotaName(string value, string localizedValue, IDictionary serializedAdditionalRawData) + { + Value = value; + LocalizedValue = localizedValue; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the resource. + public string Value { get; } + /// The localized name of the resource. + public string LocalizedValue { get; } + } +} diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs index b51c46a4686a..1f6ede6ea9e0 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs +++ b/sdk/fabric/Azure.ResourceManager.Fabric/src/Generated/RestOperations/FabricCapacitiesRestOperations.cs @@ -32,7 +32,7 @@ public FabricCapacitiesRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-11-01"; + _apiVersion = apiVersion ?? "2025-01-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -1000,6 +1000,92 @@ public Response ListSkus(string subscripti } } + internal RequestUriBuilder CreateListUsagesRequestUri(string subscriptionId, string location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Fabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListUsagesRequest(string subscriptionId, string location) + { + 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("/providers/Microsoft.Fabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/usages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesAsync(string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesRequest(subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListUsages(string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesRequest(subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); @@ -1315,5 +1401,85 @@ public Response ListSkusNextPage(string ne throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListUsagesNextPageRequestUri(string nextLink, string subscriptionId, string location) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListUsagesNextPageRequest(string nextLink, string subscriptionId, string location) + { + 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 the current consumption and limit in this location for the provided subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListUsagesNextPageAsync(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesNextPageRequest(nextLink, subscriptionId, location); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List the current consumption and limit in this location for the provided subscription. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The location name. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListUsagesNextPage(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + using var message = CreateListUsagesNextPageRequest(nextLink, subscriptionId, location); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + PagedQuota value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = PagedQuota.DeserializePagedQuota(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml b/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml index f38d63b37a0c..72deb27a0de5 100644 --- a/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml +++ b/sdk/fabric/Azure.ResourceManager.Fabric/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/fabric/Microsoft.Fabric.Management -commit: d055a09b43410be13ea7ba81d6e1c64d7b10043c +commit: b9a8c9e8eb8998a222f126a005d1ab633f1daad9 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml index 12a34944ad25..dc4575aaefe2 100644 --- a/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml +++ b/sdk/hybridconnectivity/Azure.ResourceManager.HybridConnectivity/tsp-location.yaml @@ -1,3 +1,4 @@ directory: specification/hybridconnectivity/HybridConnectivity.Management -commit: 7b93673aa21d915108429c2e625f6424cdb326e8 -repo: Azure/azure-rest-api-specs \ No newline at end of file +commit: b9a8c9e8eb8998a222f126a005d1ab633f1daad9 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs index df91b65929ec..0a50b1f47a8a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDBVersionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_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_GetAnAutonomousVersion() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAnAutonomousVersionsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseVersion_listByLocation.json // this example is just showing the usage of "AutonomousDatabaseVersions_ListByLocation" 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,7 +88,7 @@ public async Task GetAll_ListAnAutonomousVersionsByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_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 @@ -117,7 +117,7 @@ public async Task Exists_GetAnAutonomousVersion() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs index 93d42fbf71b9..811be4f5e220 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDBVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AutonomousDBVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnAutonomousVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseVersion_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseVersion_get.json // this example is just showing the usage of "AutonomousDatabaseVersions_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs index e432c8e9a7b7..2ccff4c82fde 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseBackupCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AutonomousDatabaseBackupsCreateOrUpdate() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_create.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_AutonomousDatabaseBackupsCreateOrUpdate() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_create.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -106,7 +106,7 @@ public async Task CreateOrUpdate_CreateAutonomousDatabaseBackup() [Ignore("Only validating compilation of examples")] public async Task Get_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -140,7 +140,7 @@ public async Task Get_AutonomousDatabaseBackupsGet() [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -170,48 +170,12 @@ public async Task Get_GetAutonomousDatabaseBackup() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - [Test] - [Ignore("Only validating compilation of examples")] - public async Task GetAll_AutonomousDatabaseBackupsListByAutonomousDatabase() - { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_listByParent.json - // this example is just showing the usage of "AutonomousDatabaseBackups_ListByAutonomousDatabase" 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 AutonomousDatabaseResource created on azure - // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource - string subscriptionId = "00000000-0000-0000-0000-000000000000"; - string resourceGroupName = "rg000"; - string autonomousdatabasename = "databasedb1"; - ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); - AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); - - // get the collection of this AutonomousDatabaseBackupResource - AutonomousDatabaseBackupCollection collection = autonomousDatabase.GetAutonomousDatabaseBackups(); - - // invoke the operation and iterate over the result - await foreach (AutonomousDatabaseBackupResource 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 - AutonomousDatabaseBackupData 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 GetAll_ListAutonomousDatabaseBackupsByAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_listByParent.json - // this example is just showing the usage of "AutonomousDatabaseBackups_ListByAutonomousDatabase" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_listByParent.json + // this example is just showing the usage of "AutonomousDatabaseBackups_ListByParent" 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(); @@ -246,7 +210,7 @@ public async Task GetAll_ListAutonomousDatabaseBackupsByAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task Exists_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -276,7 +240,7 @@ public async Task Exists_AutonomousDatabaseBackupsGet() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -306,7 +270,7 @@ public async Task Exists_GetAutonomousDatabaseBackup() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -348,7 +312,7 @@ public async Task GetIfExists_AutonomousDatabaseBackupsGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs index 7c8abf776248..e8cfc1a78e21 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseBackupResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseBackupResource [Ignore("Only validating compilation of examples")] public async Task Get_AutonomousDatabaseBackupsGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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_AutonomousDatabaseBackupsGet() [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_get.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -82,7 +82,7 @@ public async Task Get_GetAutonomousDatabaseBackup() [Ignore("Only validating compilation of examples")] public async Task Delete_AutonomousDatabaseBackupsDelete() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_delete.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -109,7 +109,7 @@ public async Task Delete_AutonomousDatabaseBackupsDelete() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_delete.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -136,7 +136,7 @@ public async Task Delete_DeleteAutonomousDatabaseBackup() [Ignore("Only validating compilation of examples")] public async Task Update_AutonomousDatabaseBackupsUpdate() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_patch.json // this example is just showing the usage of "AutonomousDatabaseBackups_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 @@ -169,7 +169,7 @@ public async Task Update_AutonomousDatabaseBackupsUpdate() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAutonomousDatabaseBackup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseBackup_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseBackup_patch.json // this example is just showing the usage of "AutonomousDatabaseBackups_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs index 1a919c543c08..af3d60022657 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseCharacterSetCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_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_GetAutonomousDbCharacterSet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAutonomousDbCharacterSetsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseCharacterSet_listByLocation.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_ListByLocation" 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,7 +88,7 @@ public async Task GetAll_ListAutonomousDbCharacterSetsByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_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 @@ -117,7 +117,7 @@ public async Task Exists_GetAutonomousDbCharacterSet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs index 6aab022ca5e2..201c4080dede 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCharacterSetResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AutonomousDatabaseCharacterSetResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDbCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseCharacterSets_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs index 1f2c1fd27351..89ccecc9d916 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_AutonomousDatabaseCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdate() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_create.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -71,11 +71,60 @@ public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdate() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdateCrossRegionPeer() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseCrossRegionPeer_create.json + // this example is just showing the usage of "AutonomousDatabases_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this AutonomousDatabaseResource + AutonomousDatabaseCollection collection = resourceGroupResource.GetAutonomousDatabases(); + + // invoke the operation + string autonomousdatabasename = "databasedb1"; + AutonomousDatabaseData data = new AutonomousDatabaseData(new AzureLocation("eastus")) + { + Properties = new AutonomousDatabaseCrossRegionDisasterRecoveryProperties(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Oracle.Database/autonomousDatabases/databasedb1"), DisasterRecoveryType.Adg) + { + SourceLocation = "germanywestcentral", + SourceOcid = "ocid1..aaaaa", + IsReplicateAutomaticBackups = false, + SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), + VnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1"), + }, + Tags = +{ +["tagK1"] = "tagV1" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, autonomousdatabasename, data); + AutonomousDatabaseResource 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 + AutonomousDatabaseData 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 CreateOrUpdate_AutonomousDatabasesCreateOrUpdateClone() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseClone_create.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -128,7 +177,7 @@ public async Task CreateOrUpdate_AutonomousDatabasesCreateOrUpdateClone() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_create.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -182,7 +231,7 @@ public async Task CreateOrUpdate_CreateAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateCloneAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseClone_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseClone_create.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -235,7 +284,7 @@ public async Task CreateOrUpdate_CreateCloneAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task Get_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -268,7 +317,7 @@ public async Task Get_AutonomousDatabasesGet() [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -301,7 +350,7 @@ public async Task Get_GetAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAutonomousDatabaseByResourceGroup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_listByResourceGroup.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_listByResourceGroup.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -336,7 +385,7 @@ public async Task GetAll_ListAutonomousDatabaseByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -365,7 +414,7 @@ public async Task Exists_AutonomousDatabasesGet() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -394,7 +443,7 @@ public async Task Exists_GetAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -435,7 +484,7 @@ public async Task GetIfExists_AutonomousDatabasesGet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs index 1af02f84b336..8bed2768b4fb 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseNationalCharacterSetCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_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_GetAutonomousDbNationalCharacterSet() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListAutonomousDbNationalCharacterSetsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseNationalCharacterSet_listByLocation.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_ListByLocation" 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,7 +88,7 @@ public async Task GetAll_ListAutonomousDbNationalCharacterSetsByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_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 @@ -117,7 +117,7 @@ public async Task Exists_GetAutonomousDbNationalCharacterSet() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs index 94f4b756aa34..52f30630e9a0 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseNationalCharacterSetResource.cs @@ -19,7 +19,7 @@ public partial class Sample_AutonomousDatabaseNationalCharacterSetResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDbNationalCharacterSet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabaseNationalCharacterSet_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabaseNationalCharacterSet_get.json // this example is just showing the usage of "AutonomousDatabaseNationalCharacterSets_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs index 35c1cdf0dc91..feadd8207b20 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_AutonomousDatabaseResource.cs @@ -20,7 +20,7 @@ public partial class Sample_AutonomousDatabaseResource [Ignore("Only validating compilation of examples")] public async Task Get_AutonomousDatabasesGet() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -50,7 +50,7 @@ public async Task Get_AutonomousDatabasesGet() [Ignore("Only validating compilation of examples")] public async Task Get_GetAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_get.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -80,7 +80,7 @@ public async Task Get_GetAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_delete.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -106,7 +106,7 @@ public async Task Delete_DeleteAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_patch.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -134,11 +134,83 @@ public async Task Update_PatchAutonomousDatabase() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task ChangeDisasterRecoveryConfiguration_AutonomousDatabasesChangeDisasterRecoveryConfiguration() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_changeDisasterRecoveryConfiguration.json + // this example is just showing the usage of "AutonomousDatabases_ChangeDisasterRecoveryConfiguration" 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 AutonomousDatabaseResource created on azure + // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); + AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); + + // invoke the operation + DisasterRecoveryConfigurationDetails details = new DisasterRecoveryConfigurationDetails + { + DisasterRecoveryType = DisasterRecoveryType.Adg, + IsReplicateAutomaticBackups = false, + }; + ArmOperation lro = await autonomousDatabase.ChangeDisasterRecoveryConfigurationAsync(WaitUntil.Completed, details); + AutonomousDatabaseResource 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 + AutonomousDatabaseData 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 ChangeDisasterRecoveryConfiguration_PerformChangeDisasterRecoveryConfigurationActionOnAutonomousDatabase() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_changeDisasterRecoveryConfiguration.json + // this example is just showing the usage of "AutonomousDatabases_ChangeDisasterRecoveryConfiguration" 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 AutonomousDatabaseResource created on azure + // for more information of creating AutonomousDatabaseResource, please refer to the document of AutonomousDatabaseResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rg000"; + string autonomousdatabasename = "databasedb1"; + ResourceIdentifier autonomousDatabaseResourceId = AutonomousDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, autonomousdatabasename); + AutonomousDatabaseResource autonomousDatabase = client.GetAutonomousDatabaseResource(autonomousDatabaseResourceId); + + // invoke the operation + DisasterRecoveryConfigurationDetails details = new DisasterRecoveryConfigurationDetails + { + DisasterRecoveryType = DisasterRecoveryType.Adg, + IsReplicateAutomaticBackups = false, + }; + ArmOperation lro = await autonomousDatabase.ChangeDisasterRecoveryConfigurationAsync(WaitUntil.Completed, details); + AutonomousDatabaseResource 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 + AutonomousDatabaseData 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 Failover_AutonomousDatabasesFailover() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_failover.json // this example is just showing the usage of "AutonomousDatabases_Failover" 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 @@ -173,7 +245,7 @@ public async Task Failover_AutonomousDatabasesFailover() [Ignore("Only validating compilation of examples")] public async Task Failover_PerformFailoverActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_failover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_failover.json // this example is just showing the usage of "AutonomousDatabases_Failover" 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 @@ -208,7 +280,7 @@ public async Task Failover_PerformFailoverActionOnAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task GenerateWallet_GenerateWalletActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_generateWallet.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_generateWallet.json // this example is just showing the usage of "AutonomousDatabases_GenerateWallet" 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 @@ -239,7 +311,7 @@ public async Task GenerateWallet_GenerateWalletActionOnAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task Restore_AutonomousDatabasesRestore() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_restore.json // this example is just showing the usage of "AutonomousDatabases_Restore" 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 +343,7 @@ public async Task Restore_AutonomousDatabasesRestore() [Ignore("Only validating compilation of examples")] public async Task Restore_PerformRestoreActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_restore.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_restore.json // this example is just showing the usage of "AutonomousDatabases_Restore" 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 +375,7 @@ public async Task Restore_PerformRestoreActionOnAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task Shrink_PerformShrinkActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_shrink.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_shrink.json // this example is just showing the usage of "AutonomousDatabases_Shrink" 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 @@ -334,7 +406,7 @@ public async Task Shrink_PerformShrinkActionOnAutonomousDatabase() [Ignore("Only validating compilation of examples")] public async Task Switchover_AutonomousDatabasesSwitchover() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_switchover.json // this example is just showing the usage of "AutonomousDatabases_Switchover" 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 @@ -369,7 +441,7 @@ public async Task Switchover_AutonomousDatabasesSwitchover() [Ignore("Only validating compilation of examples")] public async Task Switchover_PerformSwitchoverActionOnAutonomousDatabase() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_switchover.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_switchover.json // this example is just showing the usage of "AutonomousDatabases_Switchover" 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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs index 0b49b074b022..9085c97e9280 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudExadataInfrastructureCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_create.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -67,7 +67,7 @@ public async Task CreateOrUpdate_CreateExadataInfrastructure() [Ignore("Only validating compilation of examples")] public async Task Get_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -100,7 +100,7 @@ public async Task Get_GetExadataInfrastructure() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExadataInfrastructureByResourceGroup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listByResourceGroup.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_listByResourceGroup.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -135,7 +135,7 @@ public async Task GetAll_ListExadataInfrastructureByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -164,7 +164,7 @@ public async Task Exists_GetExadataInfrastructure() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs index 6d729811d7a6..9204ffec9ea9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudExadataInfrastructureResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudExadataInfrastructureResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_get.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -50,7 +50,7 @@ public async Task Get_GetExadataInfrastructure() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_delete.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -76,7 +76,7 @@ public async Task Delete_DeleteExadataInfrastructure() [Ignore("Only validating compilation of examples")] public async Task Update_PatchExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_patch.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -108,7 +108,7 @@ public async Task Update_PatchExadataInfrastructure() [Ignore("Only validating compilation of examples")] public async Task AddStorageCapacity_PerformAddStorageCapacityOnExadataInfra() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_addStorageCapacity.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_addStorageCapacity.json // this example is just showing the usage of "CloudExadataInfrastructures_AddStorageCapacity" 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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs index ecdf28d949a1..0eee5734b043 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_CloudVmClusterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_create.json // this example is just showing the usage of "CloudVmClusters_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 @@ -98,7 +98,7 @@ public async Task CreateOrUpdate_CreateVMCluster() [Ignore("Only validating compilation of examples")] public async Task Get_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_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 @@ -131,7 +131,7 @@ public async Task Get_GetVMCluster() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVMClustersByResourceGroup() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listByResourceGroup.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_listByResourceGroup.json // this example is just showing the usage of "CloudVmClusters_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 @@ -166,7 +166,7 @@ public async Task GetAll_ListVMClustersByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_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 @@ -195,7 +195,7 @@ public async Task Exists_GetVMCluster() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs index e5e5c24a0e90..af03fcfa0a52 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_CloudVmClusterDBNodeCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_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,8 +53,8 @@ public async Task Get_GetDbNode() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDbNodesByVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_listByParent.json - // this example is just showing the usage of "DbNodes_ListByCloudVmCluster" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_listByParent.json + // this example is just showing the usage of "DbNodes_ListByParent" 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(); @@ -89,7 +89,7 @@ public async Task GetAll_ListDbNodesByVMCluster() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_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 @@ -119,7 +119,7 @@ public async Task Exists_GetDbNode() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs index 81ca799f3a6c..ffe8ca4d0b5e 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterDBNodeResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudVmClusterDBNodeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDbNode() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_get.json // this example is just showing the usage of "DbNodes_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_GetDbNode() [Ignore("Only validating compilation of examples")] public async Task Action_DbNodesAction() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_action.json // this example is just showing the usage of "DbNodes_Action" 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 @@ -84,7 +84,7 @@ public async Task Action_DbNodesAction() [Ignore("Only validating compilation of examples")] public async Task Action_VMActionsOnDbNodesOfVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbNodes_action.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbNodes_action.json // this example is just showing the usage of "DbNodes_Action" 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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs index 607731f20e28..e228bbb7c401 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudVmClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_get.json // this example is just showing the usage of "CloudVmClusters_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 @@ -50,7 +50,7 @@ public async Task Get_GetVMCluster() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_delete.json // this example is just showing the usage of "CloudVmClusters_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 @@ -76,7 +76,7 @@ public async Task Delete_DeleteVMCluster() [Ignore("Only validating compilation of examples")] public async Task Update_PatchVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_patch.json // this example is just showing the usage of "CloudVmClusters_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 @@ -108,7 +108,7 @@ public async Task Update_PatchVMCluster() [Ignore("Only validating compilation of examples")] public async Task AddVms_AddVMsToVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_addVms.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_addVms.json // this example is just showing the usage of "CloudVmClusters_AddVms" 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,7 +140,7 @@ public async Task AddVms_AddVMsToVMCluster() [Ignore("Only validating compilation of examples")] public async Task GetPrivateIPAddresses_ListPrivateIPAddressesForVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listPrivateIpAddresses.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_listPrivateIpAddresses.json // this example is just showing the usage of "CloudVmClusters_ListPrivateIPAddresses" 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 @@ -170,7 +170,7 @@ public async Task GetPrivateIPAddresses_ListPrivateIPAddressesForVMCluster() [Ignore("Only validating compilation of examples")] public async Task RemoveVms_RemoveVMsFromVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_removeVms.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_removeVms.json // this example is just showing the usage of "CloudVmClusters_RemoveVms" 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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs index 181e2a5cfa36..c832df9a315a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudVmClusterVirtualNetworkAddressCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_create.json // this example is just showing the usage of "VirtualNetworkAddresses_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 @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_CreateVirtualNetworkAddress() [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_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 @@ -97,8 +97,8 @@ public async Task Get_GetVirtualNetworkAddress() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListVirtualNetworkAddressesByVMCluster() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_listByParent.json - // this example is just showing the usage of "VirtualNetworkAddresses_ListByCloudVmCluster" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_listByParent.json + // this example is just showing the usage of "VirtualNetworkAddresses_ListByParent" 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(); @@ -133,7 +133,7 @@ public async Task GetAll_ListVirtualNetworkAddressesByVMCluster() [Ignore("Only validating compilation of examples")] public async Task Exists_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_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 @@ -163,7 +163,7 @@ public async Task Exists_GetVirtualNetworkAddress() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs index 9a1722e7c902..48b63c393c71 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_CloudVmClusterVirtualNetworkAddressResource.cs @@ -20,7 +20,7 @@ public partial class Sample_CloudVmClusterVirtualNetworkAddressResource [Ignore("Only validating compilation of examples")] public async Task Get_GetVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_get.json // this example is just showing the usage of "VirtualNetworkAddresses_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_GetVirtualNetworkAddress() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_delete.json // this example is just showing the usage of "VirtualNetworkAddresses_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_DeleteVirtualNetworkAddress() [Ignore("Only validating compilation of examples")] public async Task Update_CreateVirtualNetworkAddress() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/virtualNetworkAddresses_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/virtualNetworkAddresses_create.json // this example is just showing the usage of "VirtualNetworkAddresses_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 diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterCollection.cs new file mode 100644 index 000000000000..6ff690602467 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterCollection.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.OracleDatabase.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExadbVmClusterCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ExadbVmClustersCreateOrUpdateMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_CreateOrUpdate_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExadbVmClusterResource + ExadbVmClusterCollection collection = resourceGroupResource.GetExadbVmClusters(); + + // invoke the operation + string exadbVmClusterName = "clusterName"; + ExadbVmClusterData data = new ExadbVmClusterData(new AzureLocation("xojp")) + { + Properties = new ExadbVmClusterProperties( + new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1"), + new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg000/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), + "dyhkncxzzgcwlfkfygvqlvqbxekvkbhjprmuxtaukewjnfrrnfqgrqsjfgsayrezkspqplrduuomuvtpkqurcoqjdnadlvedgfngglcgafbxtcewxlgckvehhqgfwkokbjoqftunjsgfjwbdaftxoytsphydwogtlnfxxuzzjvqcrin", + 0, + new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/providers/Oracle.Database/exascaleDbStorageVaults/storageVaultName"), + "tdn", + 8, + "evenjblxxfsztdxlcr", + new string[] { "wiseakllkohemfmnoyteg" }, + 56, + new ExadbVmClusterStorageDetails(10)) + { + ClusterName = "hssswln", + BackupSubnetCidr = "fr", + DataCollectionOptions = new DiagnosticCollectionConfig + { + IsDiagnosticsEventsEnabled = true, + IsHealthMonitoringEnabled = true, + IsIncidentLogsEnabled = true, + }, + Domain = "vzfak", + GridImageOcid = new ResourceIdentifier("ocid1.dbpatch.oc1..aaaaa3klq"), + LicenseModel = OracleLicenseModel.LicenseIncluded, + NsgCidrs = {new CloudVmClusterNsgCidr("10.0.0.0/16") +{ +DestinationPortRange = new CloudVmClusterPortRange(1520, 1522), +}}, + PrivateZoneOcid = new ResourceIdentifier("ocid1.autonomousdatabase.oc1..aaaaa3klq"), + ScanListenerPortTcp = 9, + ScanListenerPortTcpSsl = 18, + SystemVersion = "udwsykstqawwjrvzebfyyccnjzhxtijvywlgnrkqxnboibyppistnbvqqsnsxmjnzeumgnatmarzfnjhglmtrknszthrxtwewwqjbkwytbhtjbgondtktkpvjmxdcuyjupr", + TimeZone = "ayuqnpfkasdzmxlfnkjzrenyogbvcysdbkstjhyjdgxygitlykihtwdiktilukyplgxovaonrqcqaviyaqgyrqfrklqvqyobnxgmzpqbgjhdtjdquhyqnvhavnqpfupaqhdedgdvfomeueeuwjjfiqiyxspybpyj", + }, + Zones = { "iupjvcfsbvfhrebwf" }, + Tags = +{ +["key9683"] = "umnfswbmhxzsomcluslxhnxxika" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, exadbVmClusterName, data); + ExadbVmClusterResource 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 + ExadbVmClusterData 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_ExadbVmClustersGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExadbVmClusterResource + ExadbVmClusterCollection collection = resourceGroupResource.GetExadbVmClusters(); + + // invoke the operation + string exadbVmClusterName = "vmClusterName"; + ExadbVmClusterResource result = await collection.GetAsync(exadbVmClusterName); + + // 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 + ExadbVmClusterData 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_ExadbVmClustersListByResourceGroupMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExadbVmClusterResource + ExadbVmClusterCollection collection = resourceGroupResource.GetExadbVmClusters(); + + // invoke the operation and iterate over the result + await foreach (ExadbVmClusterResource 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 + ExadbVmClusterData 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_ExadbVmClustersGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExadbVmClusterResource + ExadbVmClusterCollection collection = resourceGroupResource.GetExadbVmClusters(); + + // invoke the operation + string exadbVmClusterName = "vmClusterName"; + bool result = await collection.ExistsAsync(exadbVmClusterName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ExadbVmClustersGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExadbVmClusterResource + ExadbVmClusterCollection collection = resourceGroupResource.GetExadbVmClusters(); + + // invoke the operation + string exadbVmClusterName = "vmClusterName"; + NullableResponse response = await collection.GetIfExistsAsync(exadbVmClusterName); + ExadbVmClusterResource 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 + ExadbVmClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs new file mode 100644 index 000000000000..3846f62b5249 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExadbVmClusterResource.cs @@ -0,0 +1,150 @@ +// 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.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExadbVmClusterResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ExadbVmClustersGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // invoke the operation + ExadbVmClusterResource result = await exadbVmCluster.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 + ExadbVmClusterData 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_ExadbVmClustersDeleteMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // invoke the operation + await exadbVmCluster.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ExadbVmClustersUpdateMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_Update_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // invoke the operation + ExadbVmClusterPatch patch = new ExadbVmClusterPatch + { + Zones = { "zcqfxmpauiqjphmhwwt" }, + Tags = +{ +["key6027"] = "kesrhztqxwjjsexr" +}, + ExadbVmClusterUpdateNodeCount = 9, + }; + ArmOperation lro = await exadbVmCluster.UpdateAsync(WaitUntil.Completed, patch); + ExadbVmClusterResource 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 + ExadbVmClusterData 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 RemoveVms_ExadbVmClustersRemoveVmsMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_RemoveVms_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_RemoveVms" 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 ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // invoke the operation + RemoveVirtualMachineFromExadbVmClusterDetails details = new RemoveVirtualMachineFromExadbVmClusterDetails(new DBNodeDetails[] + { +new DBNodeDetails(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Oracle.Database/exadbVmClusters/vmCluster/dbNodes/dbNodeName")) + }); + ArmOperation lro = await exadbVmCluster.RemoveVmsAsync(WaitUntil.Completed, details); + ExadbVmClusterResource 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 + ExadbVmClusterData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeCollection.cs new file mode 100644 index 000000000000..e31eb6003620 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeCollection.cs @@ -0,0 +1,160 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDBNodeCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ExascaleDbNodesGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbNodes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNodes_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 ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // get the collection of this ExascaleDBNodeResource + ExascaleDBNodeCollection collection = exadbVmCluster.GetExascaleDBNodes(); + + // invoke the operation + string exascaleDBNodeName = "dbNodeName"; + ExascaleDBNodeResource result = await collection.GetAsync(exascaleDBNodeName); + + // 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 + ExascaleDBNodeData 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_ExascaleDbNodesListByParentMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbNodes_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNodes_ListByParent" 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 ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // get the collection of this ExascaleDBNodeResource + ExascaleDBNodeCollection collection = exadbVmCluster.GetExascaleDBNodes(); + + // invoke the operation and iterate over the result + await foreach (ExascaleDBNodeResource 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 + ExascaleDBNodeData 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_ExascaleDbNodesGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbNodes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNodes_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 ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // get the collection of this ExascaleDBNodeResource + ExascaleDBNodeCollection collection = exadbVmCluster.GetExascaleDBNodes(); + + // invoke the operation + string exascaleDBNodeName = "dbNodeName"; + bool result = await collection.ExistsAsync(exascaleDBNodeName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ExascaleDbNodesGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbNodes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNodes_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 ExadbVmClusterResource created on azure + // for more information of creating ExadbVmClusterResource, please refer to the document of ExadbVmClusterResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + ResourceIdentifier exadbVmClusterResourceId = ExadbVmClusterResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName); + ExadbVmClusterResource exadbVmCluster = client.GetExadbVmClusterResource(exadbVmClusterResourceId); + + // get the collection of this ExascaleDBNodeResource + ExascaleDBNodeCollection collection = exadbVmCluster.GetExascaleDBNodes(); + + // invoke the operation + string exascaleDBNodeName = "dbNodeName"; + NullableResponse response = await collection.GetIfExistsAsync(exascaleDBNodeName); + ExascaleDBNodeResource 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 + ExascaleDBNodeData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeResource.cs new file mode 100644 index 000000000000..54f8db174550 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBNodeResource.cs @@ -0,0 +1,79 @@ +// 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.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDBNodeResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ExascaleDbNodesGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbNodes_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNodes_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 ExascaleDBNodeResource created on azure + // for more information of creating ExascaleDBNodeResource, please refer to the document of ExascaleDBNodeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + string exascaleDBNodeName = "dbNodeName"; + ResourceIdentifier exascaleDBNodeResourceId = ExascaleDBNodeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDBNodeName); + ExascaleDBNodeResource exascaleDBNode = client.GetExascaleDBNodeResource(exascaleDBNodeResourceId); + + // invoke the operation + ExascaleDBNodeResource result = await exascaleDBNode.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 + ExascaleDBNodeData 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 Action_ExascaleDbNodesActionMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbNodes_Action_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbNodes_Action" 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 ExascaleDBNodeResource created on azure + // for more information of creating ExascaleDBNodeResource, please refer to the document of ExascaleDBNodeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exadbVmClusterName = "vmClusterName"; + string exascaleDBNodeName = "dbNodeName"; + ResourceIdentifier exascaleDBNodeResourceId = ExascaleDBNodeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDBNodeName); + ExascaleDBNodeResource exascaleDBNode = client.GetExascaleDBNodeResource(exascaleDBNodeResourceId); + + // invoke the operation + DBNodeAction body = new DBNodeAction(DBNodeActionType.Start); + ArmOperation lro = await exascaleDBNode.ActionAsync(WaitUntil.Completed, body); + DBActionResponse result = lro.Value; + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultCollection.cs new file mode 100644 index 000000000000..842a5154c05b --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultCollection.cs @@ -0,0 +1,206 @@ +// 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.OracleDatabase.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDBStorageVaultCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task CreateOrUpdate_ExascaleDbStorageVaultsCreateMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_Create_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_Create" 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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDBStorageVaultResource + ExascaleDBStorageVaultCollection collection = resourceGroupResource.GetExascaleDBStorageVaults(); + + // invoke the operation + string exascaleDBStorageVaultName = "vmClusterName"; + ExascaleDBStorageVaultData data = new ExascaleDBStorageVaultData(new AzureLocation("ltguhzffucaytqg")) + { + Properties = new ExascaleDBStorageVaultProperties("hbsybtelyvhpalemszcvartlhwvskrnpiveqfblvkdihoytqaotdgsgauvgivzaftfgeiwlyeqzssicwrrnlxtsmeakbcsxabjlt", new ExascaleDBStorageInputDetails(21)) + { + AdditionalFlashCacheInPercent = 0, + Description = "dmnvnnduldfmrmkkvvsdtuvmsmruxzzpsfdydgytlckutfozephjygjetrauvbdfcwmti", + TimeZone = "ltrbozwxjunncicrtzjrpqnqrcjgghohztrdlbfjrbkpenopyldwolslwgrgumjfkyovvkzcuxjujuxtjjzubvqvnhrswnbdgcbslopeofmtepbrrlymqwwszvsglmyuvlcuejshtpokirwklnwpcykhyinjmlqvxtyixlthtdishhmtipbygsayvgqzfrprgppylydlcskbmvwctxifdltippfvsxiughqbojqpqrekxsotnqsk", + }, + Zones = { "qk" }, + Tags = +{ +["key7827"] = "xqi" +}, + }; + ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, exascaleDBStorageVaultName, data); + ExascaleDBStorageVaultResource 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 + ExascaleDBStorageVaultData 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_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDBStorageVaultResource + ExascaleDBStorageVaultCollection collection = resourceGroupResource.GetExascaleDBStorageVaults(); + + // invoke the operation + string exascaleDBStorageVaultName = "vmClusterName"; + ExascaleDBStorageVaultResource result = await collection.GetAsync(exascaleDBStorageVaultName); + + // 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 + ExascaleDBStorageVaultData 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_ExascaleDbStorageVaultsListByResourceGroupMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_ListByResourceGroup_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDBStorageVaultResource + ExascaleDBStorageVaultCollection collection = resourceGroupResource.GetExascaleDBStorageVaults(); + + // invoke the operation and iterate over the result + await foreach (ExascaleDBStorageVaultResource 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 + ExascaleDBStorageVaultData 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_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDBStorageVaultResource + ExascaleDBStorageVaultCollection collection = resourceGroupResource.GetExascaleDBStorageVaults(); + + // invoke the operation + string exascaleDBStorageVaultName = "vmClusterName"; + bool result = await collection.ExistsAsync(exascaleDBStorageVaultName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 ResourceGroupResource created on azure + // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); + ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); + + // get the collection of this ExascaleDBStorageVaultResource + ExascaleDBStorageVaultCollection collection = resourceGroupResource.GetExascaleDBStorageVaults(); + + // invoke the operation + string exascaleDBStorageVaultName = "vmClusterName"; + NullableResponse response = await collection.GetIfExistsAsync(exascaleDBStorageVaultName); + ExascaleDBStorageVaultResource 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 + ExascaleDBStorageVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultResource.cs new file mode 100644 index 000000000000..d1d0002dc0a1 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_ExascaleDBStorageVaultResource.cs @@ -0,0 +1,113 @@ +// 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.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_ExascaleDBStorageVaultResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_ExascaleDbStorageVaultsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_Get_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 ExascaleDBStorageVaultResource created on azure + // for more information of creating ExascaleDBStorageVaultResource, please refer to the document of ExascaleDBStorageVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exascaleDBStorageVaultName = "vmClusterName"; + ResourceIdentifier exascaleDBStorageVaultResourceId = ExascaleDBStorageVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exascaleDBStorageVaultName); + ExascaleDBStorageVaultResource exascaleDBStorageVault = client.GetExascaleDBStorageVaultResource(exascaleDBStorageVaultResourceId); + + // invoke the operation + ExascaleDBStorageVaultResource result = await exascaleDBStorageVault.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 + ExascaleDBStorageVaultData 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_ExascaleDbStorageVaultsDeleteMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_Delete_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 ExascaleDBStorageVaultResource created on azure + // for more information of creating ExascaleDBStorageVaultResource, please refer to the document of ExascaleDBStorageVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exascaleDBStorageVaultName = "vmClusterName"; + ResourceIdentifier exascaleDBStorageVaultResourceId = ExascaleDBStorageVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exascaleDBStorageVaultName); + ExascaleDBStorageVaultResource exascaleDBStorageVault = client.GetExascaleDBStorageVaultResource(exascaleDBStorageVaultResourceId); + + // invoke the operation + await exascaleDBStorageVault.DeleteAsync(WaitUntil.Completed); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Update_ExascaleDbStorageVaultsUpdateMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_Update_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this ExascaleDBStorageVaultResource created on azure + // for more information of creating ExascaleDBStorageVaultResource, please refer to the document of ExascaleDBStorageVaultResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "rgopenapi"; + string exascaleDBStorageVaultName = "vmClusterName"; + ResourceIdentifier exascaleDBStorageVaultResourceId = ExascaleDBStorageVaultResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, exascaleDBStorageVaultName); + ExascaleDBStorageVaultResource exascaleDBStorageVault = client.GetExascaleDBStorageVaultResource(exascaleDBStorageVaultResourceId); + + // invoke the operation + ExascaleDBStorageVaultPatch patch = new ExascaleDBStorageVaultPatch + { + Tags = +{ +["key6179"] = "ouj" +}, + }; + ArmOperation lro = await exascaleDBStorageVault.UpdateAsync(WaitUntil.Completed, patch); + ExascaleDBStorageVaultResource 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 + ExascaleDBStorageVaultData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentCollection.cs new file mode 100644 index 000000000000..a7f9b03c6785 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentCollection.cs @@ -0,0 +1,159 @@ +// 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.OracleDatabase.Models; +using Azure.ResourceManager.Resources; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_FlexComponentCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FlexComponentsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponents_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation + string flexComponentName = "flexComponent"; + FlexComponentResource result = await collection.GetAsync(flexComponentName); + + // 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 + FlexComponentData 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_FlexComponentsListByParentMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/FlexComponents_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponents_ListByParent" 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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation and iterate over the result + SystemShape? shape = SystemShape.ExadataX11M; + await foreach (FlexComponentResource item in collection.GetAllAsync(shape: shape)) + { + // 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 + FlexComponentData 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_FlexComponentsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponents_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation + string flexComponentName = "flexComponent"; + bool result = await collection.ExistsAsync(flexComponentName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_FlexComponentsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponents_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this FlexComponentResource + AzureLocation location = new AzureLocation("eastus"); + FlexComponentCollection collection = subscriptionResource.GetFlexComponents(location); + + // invoke the operation + string flexComponentName = "flexComponent"; + NullableResponse response = await collection.GetIfExistsAsync(flexComponentName); + FlexComponentResource 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 + FlexComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentResource.cs new file mode 100644 index 000000000000..b28f0f616471 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_FlexComponentResource.cs @@ -0,0 +1,48 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_FlexComponentResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_FlexComponentsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/FlexComponents_Get_MaximumSet_Gen.json + // this example is just showing the usage of "FlexComponents_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 FlexComponentResource created on azure + // for more information of creating FlexComponentResource, please refer to the document of FlexComponentResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string flexComponentName = "flexComponent"; + ResourceIdentifier flexComponentResourceId = FlexComponentResource.CreateResourceIdentifier(subscriptionId, location, flexComponentName); + FlexComponentResource flexComponent = client.GetFlexComponentResource(flexComponentResourceId); + + // invoke the operation + FlexComponentResource result = await flexComponent.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 + FlexComponentData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionCollection.cs new file mode 100644 index 000000000000..c225342ccdc7 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionCollection.cs @@ -0,0 +1,162 @@ +// 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.OracleDatabase.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_GiMinorVersionCollection + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersions_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 OracleGIVersionResource created on azure + // for more information of creating OracleGIVersionResource, please refer to the document of OracleGIVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier oracleGIVersionResourceId = OracleGIVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + OracleGIVersionResource oracleGIVersion = client.GetOracleGIVersionResource(oracleGIVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = oracleGIVersion.GetGiMinorVersions(); + + // invoke the operation + string giMinorVersionName = "giMinorVersionName"; + GiMinorVersionResource result = await collection.GetAsync(giMinorVersionName); + + // 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 + GiMinorVersionData 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_GiMinorVersionsListByParentMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiMinorVersions_ListByParent_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersions_ListByParent" 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 OracleGIVersionResource created on azure + // for more information of creating OracleGIVersionResource, please refer to the document of OracleGIVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier oracleGIVersionResourceId = OracleGIVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + OracleGIVersionResource oracleGIVersion = client.GetOracleGIVersionResource(oracleGIVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = oracleGIVersion.GetGiMinorVersions(); + + // invoke the operation and iterate over the result + ShapeFamily? shapeFamily = new ShapeFamily("rtfcosvtlpeeqoicsjqggtgc"); + await foreach (GiMinorVersionResource item in collection.GetAllAsync(shapeFamily: shapeFamily)) + { + // 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 + GiMinorVersionData 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_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersions_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 OracleGIVersionResource created on azure + // for more information of creating OracleGIVersionResource, please refer to the document of OracleGIVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier oracleGIVersionResourceId = OracleGIVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + OracleGIVersionResource oracleGIVersion = client.GetOracleGIVersionResource(oracleGIVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = oracleGIVersion.GetGiMinorVersions(); + + // invoke the operation + string giMinorVersionName = "giMinorVersionName"; + bool result = await collection.ExistsAsync(giMinorVersionName); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersions_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 OracleGIVersionResource created on azure + // for more information of creating OracleGIVersionResource, please refer to the document of OracleGIVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier oracleGIVersionResourceId = OracleGIVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + OracleGIVersionResource oracleGIVersion = client.GetOracleGIVersionResource(oracleGIVersionResourceId); + + // get the collection of this GiMinorVersionResource + GiMinorVersionCollection collection = oracleGIVersion.GetGiMinorVersions(); + + // invoke the operation + string giMinorVersionName = "giMinorVersionName"; + NullableResponse response = await collection.GetIfExistsAsync(giMinorVersionName); + GiMinorVersionResource 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 + GiMinorVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionResource.cs new file mode 100644 index 000000000000..890080f5fcbe --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_GiMinorVersionResource.cs @@ -0,0 +1,49 @@ +// 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 NUnit.Framework; + +namespace Azure.ResourceManager.OracleDatabase.Samples +{ + public partial class Sample_GiMinorVersionResource + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Get_GiMinorVersionsGetMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiMinorVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiMinorVersions_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 GiMinorVersionResource created on azure + // for more information of creating GiMinorVersionResource, please refer to the document of GiMinorVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + string giMinorVersionName = "giMinorVersionName"; + ResourceIdentifier giMinorVersionResourceId = GiMinorVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname, giMinorVersionName); + GiMinorVersionResource giMinorVersion = client.GetGiMinorVersionResource(giMinorVersionResourceId); + + // invoke the operation + GiMinorVersionResource result = await giMinorVersion.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 + GiMinorVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs index 9117d4574f23..24bfe3adfe17 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDBServerCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_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,8 +53,8 @@ public async Task Get_GetDbServerByParent() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDbServersByExadataInfrastructure() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_listByParent.json - // this example is just showing the usage of "DbServers_ListByCloudExadataInfrastructure" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_listByParent.json + // this example is just showing the usage of "DbServers_ListByParent" 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(); @@ -89,7 +89,7 @@ public async Task GetAll_ListDbServersByExadataInfrastructure() [Ignore("Only validating compilation of examples")] public async Task Exists_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_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 @@ -119,7 +119,7 @@ public async Task Exists_GetDbServerByParent() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs index f48d07468acf..89db6f82f8a0 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBServerResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDBServerResource [Ignore("Only validating compilation of examples")] public async Task Get_GetDbServerByParent() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbServers_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbServers_get.json // this example is just showing the usage of "DbServers_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs index 877072caccda..f34b897851ff 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleDBSystemShapeCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_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_GetADbSystemShapeByName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDbSystemShapesByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_listByLocation.json // this example is just showing the usage of "DbSystemShapes_ListByLocation" 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,7 +88,7 @@ public async Task GetAll_ListDbSystemShapesByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_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 @@ -117,7 +117,7 @@ public async Task Exists_GetADbSystemShapeByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs index 36e5e73449f8..ffeaadde8479 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDBSystemShapeResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDBSystemShapeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADbSystemShapeByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dbSystemShapes_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dbSystemShapes_get.json // this example is just showing the usage of "DbSystemShapes_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs index fa29a753d3f1..f977a91058bc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleDnsPrivateViewCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_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_GetADnsPrivateViewByName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDnsPrivateViewsByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_listByLocation.json // this example is just showing the usage of "DnsPrivateViews_ListByLocation" 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,7 +88,7 @@ public async Task GetAll_ListDnsPrivateViewsByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_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 @@ -117,7 +117,7 @@ public async Task Exists_GetADnsPrivateViewByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs index 126e764a58f3..e55298d3f17b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateViewResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDnsPrivateViewResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADnsPrivateViewByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateViews_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateViews_get.json // this example is just showing the usage of "DnsPrivateViews_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs index 930b452fb00a..57c678a5f44f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleDnsPrivateZoneCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_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_GetADnsPrivateZoneByName() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListDnsPrivateZonesByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_listByLocation.json // this example is just showing the usage of "DnsPrivateZones_ListByLocation" 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,7 +88,7 @@ public async Task GetAll_ListDnsPrivateZonesByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_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 @@ -117,7 +117,7 @@ public async Task Exists_GetADnsPrivateZoneByName() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs index b3f7b790f24b..c222d07fffa7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleDnsPrivateZoneResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleDnsPrivateZoneResource [Ignore("Only validating compilation of examples")] public async Task Get_GetADnsPrivateZoneByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/dnsPrivateZones_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/dnsPrivateZones_get.json // this example is just showing the usage of "DnsPrivateZones_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs index fd8eb969d731..96ac279a34a7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionCollection.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.OracleDatabase.Models; using Azure.ResourceManager.Resources; using NUnit.Framework; @@ -20,7 +21,7 @@ public partial class Sample_OracleGIVersionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_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,9 +52,111 @@ public async Task Get_GetAGiVersionByName() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetAll_ListGiVersionsByLocation() + public async Task Get_GetAGiVersionByNameGeneratedByMaximumSetRule() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this OracleGIVersionResource + AzureLocation location = new AzureLocation("eastus"); + OracleGIVersionCollection collection = subscriptionResource.GetOracleGIVersions(location); + + // invoke the operation + string giversionname = "giVersionName"; + OracleGIVersionResource result = await collection.GetAsync(giversionname); + + // 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 + OracleGIVersionData 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_GetAGiVersionByNameGeneratedByMinimumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MinimumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this OracleGIVersionResource + AzureLocation location = new AzureLocation("eastus"); + OracleGIVersionCollection collection = subscriptionResource.GetOracleGIVersions(location); + + // invoke the operation + string giversionname = "giVersionName"; + OracleGIVersionResource result = await collection.GetAsync(giversionname); + + // 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 + OracleGIVersionData 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_ListGiVersionsByLocationGeneratedByMaximumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_ListByLocation_MaximumSet_Gen.json + // this example is just showing the usage of "GiVersions_ListByLocation" 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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this OracleGIVersionResource + AzureLocation location = new AzureLocation("eastus"); + OracleGIVersionCollection collection = subscriptionResource.GetOracleGIVersions(location); + + // invoke the operation and iterate over the result + SystemShape? shape = new SystemShape("osixsklyaauhoqnkxvnvsqeqenhzogntqnpubldrrfvqncwetdtwqwjjcvspwhgecbimdlulwcubikebrdzmidrucgtsuqvytkqutmbyrvvyioxpocpmuwiivyanjzucaegihztluuvpznzaoakfsselumhhsvrtrbzwpjhcihsvyouonlxdluwhqfxoqvgthkaxppbydtqjntscgzbivfdcaobbkthrbdjwpejirqmbly"); + await foreach (OracleGIVersionResource item in collection.GetAllAsync(shape: shape)) + { + // 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 + OracleGIVersionData 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 GetAll_ListGiVersionsByLocationGeneratedByMinimumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_ListByLocation_MinimumSet_Gen.json // this example is just showing the usage of "GiVersions_ListByLocation" 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,7 +191,7 @@ public async Task GetAll_ListGiVersionsByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_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 @@ -113,11 +216,69 @@ public async Task Exists_GetAGiVersionByName() Console.WriteLine($"Succeeded: {result}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetAGiVersionByNameGeneratedByMaximumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this OracleGIVersionResource + AzureLocation location = new AzureLocation("eastus"); + OracleGIVersionCollection collection = subscriptionResource.GetOracleGIVersions(location); + + // invoke the operation + string giversionname = "giVersionName"; + bool result = await collection.ExistsAsync(giversionname); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Exists_GetAGiVersionByNameGeneratedByMinimumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MinimumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this OracleGIVersionResource + AzureLocation location = new AzureLocation("eastus"); + OracleGIVersionCollection collection = subscriptionResource.GetOracleGIVersions(location); + + // invoke the operation + string giversionname = "giVersionName"; + bool result = await collection.ExistsAsync(giversionname); + + Console.WriteLine($"Succeeded: {result}"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_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 @@ -153,5 +314,87 @@ public async Task GetIfExists_GetAGiVersionByName() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetIfExists_GetAGiVersionByNameGeneratedByMaximumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this OracleGIVersionResource + AzureLocation location = new AzureLocation("eastus"); + OracleGIVersionCollection collection = subscriptionResource.GetOracleGIVersions(location); + + // invoke the operation + string giversionname = "giVersionName"; + NullableResponse response = await collection.GetIfExistsAsync(giversionname); + OracleGIVersionResource 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 + OracleGIVersionData 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 GetIfExists_GetAGiVersionByNameGeneratedByMinimumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MinimumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // get the collection of this OracleGIVersionResource + AzureLocation location = new AzureLocation("eastus"); + OracleGIVersionCollection collection = subscriptionResource.GetOracleGIVersions(location); + + // invoke the operation + string giversionname = "giVersionName"; + NullableResponse response = await collection.GetIfExistsAsync(giversionname); + OracleGIVersionResource 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 + OracleGIVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs index 94f2c9198e3b..bbddda10483f 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleGIVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleGIVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAGiVersionByName() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/giVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/giVersions_get.json // this example is just showing the usage of "GiVersions_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 @@ -44,5 +44,65 @@ public async Task Get_GetAGiVersionByName() // 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_GetAGiVersionByNameGeneratedByMaximumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MaximumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 OracleGIVersionResource created on azure + // for more information of creating OracleGIVersionResource, please refer to the document of OracleGIVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier oracleGIVersionResourceId = OracleGIVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + OracleGIVersionResource oracleGIVersion = client.GetOracleGIVersionResource(oracleGIVersionResourceId); + + // invoke the operation + OracleGIVersionResource result = await oracleGIVersion.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 + OracleGIVersionData 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_GetAGiVersionByNameGeneratedByMinimumSetRule() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/GiVersions_Get_MinimumSet_Gen.json + // this example is just showing the usage of "GiVersions_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 OracleGIVersionResource created on azure + // for more information of creating OracleGIVersionResource, please refer to the document of OracleGIVersionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + AzureLocation location = new AzureLocation("eastus"); + string giversionname = "giVersionName"; + ResourceIdentifier oracleGIVersionResourceId = OracleGIVersionResource.CreateResourceIdentifier(subscriptionId, location, giversionname); + OracleGIVersionResource oracleGIVersion = client.GetOracleGIVersionResource(oracleGIVersionResourceId); + + // invoke the operation + OracleGIVersionResource result = await oracleGIVersion.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 + OracleGIVersionData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs index 60bc41c70b99..50dd5b7e2fbe 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSubscriptionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_OracleSubscriptionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_get.json // this example is just showing the usage of "OracleSubscriptions_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 @@ -49,7 +49,7 @@ public async Task Get_GetOracleSubscription() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_delete.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_delete.json // this example is just showing the usage of "OracleSubscriptions_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 @@ -73,7 +73,7 @@ public async Task Delete_DeleteOracleSubscription() [Ignore("Only validating compilation of examples")] public async Task Update_PatchOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_patch.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_patch.json // this example is just showing the usage of "OracleSubscriptions_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 @@ -103,7 +103,7 @@ public async Task Update_PatchOracleSubscription() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_CreateOrUpdateOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_create.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_create.json // this example is just showing the usage of "OracleSubscriptions_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 @@ -137,11 +137,36 @@ public async Task CreateOrUpdate_CreateOrUpdateOracleSubscription() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + [Test] + [Ignore("Only validating compilation of examples")] + public async Task AddAzureSubscriptions_AddAzureSubscriptionsToTheOracleSubscription() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_addAzureSubscriptions.json + // this example is just showing the usage of "OracleSubscriptions_AddAzureSubscriptions" 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 OracleSubscriptionResource created on azure + // for more information of creating OracleSubscriptionResource, please refer to the document of OracleSubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier oracleSubscriptionResourceId = OracleSubscriptionResource.CreateResourceIdentifier(subscriptionId); + OracleSubscriptionResource oracleSubscription = client.GetOracleSubscriptionResource(oracleSubscriptionResourceId); + + // invoke the operation + AzureSubscriptions body = new AzureSubscriptions(new string[] { "00000000-0000-0000-0000-000000000001" }); + await oracleSubscription.AddAzureSubscriptionsAsync(WaitUntil.Completed, body); + + Console.WriteLine("Succeeded"); + } + [Test] [Ignore("Only validating compilation of examples")] public async Task GetActivationLinks_ListActivationLinksForTheOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_listActivationLinks.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_listActivationLinks.json // this example is just showing the usage of "OracleSubscriptions_ListActivationLinks" 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 +191,7 @@ public async Task GetActivationLinks_ListActivationLinksForTheOracleSubscription [Ignore("Only validating compilation of examples")] public async Task GetCloudAccountDetails_ListCloudAccountDetailsForTheOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_listCloudAccountDetails.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_listCloudAccountDetails.json // this example is just showing the usage of "OracleSubscriptions_ListCloudAccountDetails" 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 +216,7 @@ public async Task GetCloudAccountDetails_ListCloudAccountDetailsForTheOracleSubs [Ignore("Only validating compilation of examples")] public async Task GetSaasSubscriptionDetails_ListSaasSubscriptionDetailsForTheOracleSubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/oracleSubscriptions_listSaasSubscriptionDetails.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/oracleSubscriptions_listSaasSubscriptionDetails.json // this example is just showing the usage of "OracleSubscriptions_ListSaasSubscriptionDetails" 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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs index 60f08ead9fd3..bafddc62b079 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_OracleSystemVersionCollection [Ignore("Only validating compilation of examples")] public async Task Get_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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_GetExadataSystemVersion() [Ignore("Only validating compilation of examples")] public async Task Get_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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 @@ -86,7 +86,7 @@ public async Task Get_SystemVersionsListSystemVersions() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListExadataSystemVersionsByTheProvidedFilter() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_listByLocation.json // this example is just showing the usage of "SystemVersions_ListByLocation" 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 @@ -121,7 +121,7 @@ public async Task GetAll_ListExadataSystemVersionsByTheProvidedFilter() [Ignore("Only validating compilation of examples")] public async Task GetAll_SystemVersionsListByLocation() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_listByLocation.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_listByLocation.json // this example is just showing the usage of "SystemVersions_ListByLocation" 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 @@ -156,7 +156,7 @@ public async Task GetAll_SystemVersionsListByLocation() [Ignore("Only validating compilation of examples")] public async Task Exists_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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 +185,7 @@ public async Task Exists_GetExadataSystemVersion() [Ignore("Only validating compilation of examples")] public async Task Exists_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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 @@ -214,7 +214,7 @@ public async Task Exists_SystemVersionsListSystemVersions() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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 @@ -255,7 +255,7 @@ public async Task GetIfExists_GetExadataSystemVersion() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs index 7dd004f8ea51..b43f3c493809 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_OracleSystemVersionResource.cs @@ -19,7 +19,7 @@ public partial class Sample_OracleSystemVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetExadataSystemVersion() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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 @@ -49,7 +49,7 @@ public async Task Get_GetExadataSystemVersion() [Ignore("Only validating compilation of examples")] public async Task Get_SystemVersionsListSystemVersions() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/systemVersions_get.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/systemVersions_get.json // this example is just showing the usage of "SystemVersions_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/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 1db88b434f91..83d19b3d99a9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionResourceExtensions [Ignore("Only validating compilation of examples")] public async Task GetAutonomousDatabases_ListAutonomousDatabaseBySubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/autonomousDatabase_listBySubscription.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/autonomousDatabase_listBySubscription.json // this example is just showing the usage of "AutonomousDatabases_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 @@ -51,7 +51,7 @@ public async Task GetAutonomousDatabases_ListAutonomousDatabaseBySubscription() [Ignore("Only validating compilation of examples")] public async Task GetCloudExadataInfrastructures_ListExadataInfrastructureBySubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/exaInfra_listBySubscription.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/exaInfra_listBySubscription.json // this example is just showing the usage of "CloudExadataInfrastructures_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 @@ -82,7 +82,7 @@ public async Task GetCloudExadataInfrastructures_ListExadataInfrastructureBySubs [Ignore("Only validating compilation of examples")] public async Task GetCloudVmClusters_ListVMClustersBySubscription() { - // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2023-09-01/examples/vmClusters_listBySubscription.json + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/vmClusters_listBySubscription.json // this example is just showing the usage of "CloudVmClusters_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 @@ -108,5 +108,67 @@ public async Task GetCloudVmClusters_ListVMClustersBySubscription() Console.WriteLine("Succeeded"); } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetExadbVmClusters_ExadbVmClustersListBySubscriptionMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExadbVmClusters_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "ExadbVmClusters_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ExadbVmClusterResource item in subscriptionResource.GetExadbVmClustersAsync()) + { + // 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 + ExadbVmClusterData 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 GetExascaleDBStorageVaults_ExascaleDbStorageVaultsListBySubscriptionMaximumSet() + { + // Generated from example definition: specification/oracle/resource-manager/Oracle.Database/stable/2025-03-01/examples/ExascaleDbStorageVaults_ListBySubscription_MaximumSet_Gen.json + // this example is just showing the usage of "ExascaleDbStorageVaults_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 + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation and iterate over the result + await foreach (ExascaleDBStorageVaultResource item in subscriptionResource.GetExascaleDBStorageVaultsAsync()) + { + // 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 + ExascaleDBStorageVaultData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine("Succeeded"); + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs index bfd7327b51ae..aa05b0ebf762 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ArmOracleDatabaseModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -26,7 +27,7 @@ public static partial class ArmOracleDatabaseModelFactory /// /// The resource-specific properties for this resource. /// 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 available derived classes include , , and . /// /// A new instance for mocking. public static AutonomousDatabaseData AutonomousDatabaseData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, AutonomousDatabaseBaseProperties properties = null) @@ -60,11 +61,13 @@ public static AutonomousDatabaseData AutonomousDatabaseData(ResourceIdentifier i /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. /// Local Autonomous Disaster Recovery standby database details. /// Indicates the number of seconds of data loss for a Data Guard failover. /// Specifies if the Autonomous Database requires mTLS connections. @@ -121,7 +124,7 @@ public static AutonomousDatabaseData AutonomousDatabaseData(ResourceIdentifier i /// Retention period, in days, for long-term backups. /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. /// A new instance for mocking. - public static AutonomousDatabaseBaseProperties AutonomousDatabaseBaseProperties(string adminPassword = null, string dataBaseType = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null) + public static AutonomousDatabaseBaseProperties AutonomousDatabaseBaseProperties(string adminPassword = null, string dataBaseType = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null) { customerContacts ??= new List(); peerDBIds ??= new List(); @@ -151,6 +154,8 @@ public static AutonomousDatabaseBaseProperties AutonomousDatabaseBaseProperties( isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, @@ -344,6 +349,7 @@ public static CloudExadataInfrastructureData CloudExadataInfrastructureData(Reso } /// Initializes a new instance of . + /// Defined file system configurations. /// Exadata infra ocid. /// The number of compute servers for the cloud Exadata infrastructure. /// The number of storage servers for the cloud Exadata infrastructure. @@ -375,12 +381,17 @@ public static CloudExadataInfrastructureData CloudExadataInfrastructureData(Reso /// The OCID of the next maintenance run. /// Monthly Db Server version. /// Monthly Storage Server version. + /// The database server model type of the cloud Exadata infrastructure resource. + /// The storage server model type of the cloud Exadata infrastructure resource. + /// The compute model of the Exadata Infrastructure. /// A new instance for mocking. - public static CloudExadataInfrastructureProperties CloudExadataInfrastructureProperties(ResourceIdentifier ocid = null, int? computeCount = null, int? storageCount = null, int? totalStorageSizeInGbs = null, int? availableStorageSizeInGbs = null, DateTimeOffset? createdOn = null, string lifecycleDetails = null, OracleDatabaseMaintenanceWindow maintenanceWindow = null, EstimatedPatchingTime estimatedPatchingTime = null, IEnumerable customerContacts = null, OracleDatabaseProvisioningState? provisioningState = null, CloudExadataInfrastructureLifecycleState? lifecycleState = null, string shape = null, Uri ociUri = null, int? cpuCount = null, int? maxCpuCount = null, int? memorySizeInGbs = null, int? maxMemoryInGbs = null, int? dbNodeStorageSizeInGbs = null, int? maxDBNodeStorageSizeInGbs = null, double? dataStorageSizeInTbs = null, double? maxDataStorageInTbs = null, string dbServerVersion = null, string storageServerVersion = null, int? activatedStorageCount = null, int? additionalStorageCount = null, string displayName = null, ResourceIdentifier lastMaintenanceRunId = null, ResourceIdentifier nextMaintenanceRunId = null, string monthlyDBServerVersion = null, string monthlyStorageServerVersion = null) + public static CloudExadataInfrastructureProperties CloudExadataInfrastructureProperties(IEnumerable definedFileSystemConfiguration = null, ResourceIdentifier ocid = null, int? computeCount = null, int? storageCount = null, int? totalStorageSizeInGbs = null, int? availableStorageSizeInGbs = null, DateTimeOffset? createdOn = null, string lifecycleDetails = null, OracleDatabaseMaintenanceWindow maintenanceWindow = null, EstimatedPatchingTime estimatedPatchingTime = null, IEnumerable customerContacts = null, OracleDatabaseProvisioningState? provisioningState = null, CloudExadataInfrastructureLifecycleState? lifecycleState = null, string shape = null, Uri ociUri = null, int? cpuCount = null, int? maxCpuCount = null, int? memorySizeInGbs = null, int? maxMemoryInGbs = null, int? dbNodeStorageSizeInGbs = null, int? maxDBNodeStorageSizeInGbs = null, double? dataStorageSizeInTbs = null, double? maxDataStorageInTbs = null, string dbServerVersion = null, string storageServerVersion = null, int? activatedStorageCount = null, int? additionalStorageCount = null, string displayName = null, ResourceIdentifier lastMaintenanceRunId = null, ResourceIdentifier nextMaintenanceRunId = null, string monthlyDBServerVersion = null, string monthlyStorageServerVersion = null, string databaseServerType = null, string storageServerType = null, AutonomousDatabaseComputeModel? computeModel = null) { + definedFileSystemConfiguration ??= new List(); customerContacts ??= new List(); return new CloudExadataInfrastructureProperties( + definedFileSystemConfiguration?.ToList(), ocid, computeCount, storageCount, @@ -412,9 +423,23 @@ public static CloudExadataInfrastructureProperties CloudExadataInfrastructurePro nextMaintenanceRunId, monthlyDBServerVersion, monthlyStorageServerVersion, + databaseServerType, + storageServerType, + computeModel, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// Checks if the data can be backed up. + /// Checks if the mount path is resizable. + /// Minimum size of mount path in Gb. + /// Mount path for the file system. + /// A new instance for mocking. + public static DefinedFileSystemConfiguration DefinedFileSystemConfiguration(bool? isBackupPartition = null, bool? isResizable = null, int? minSizeGb = null, string mountPoint = null) + { + return new DefinedFileSystemConfiguration(isBackupPartition, isResizable, minSizeGb, mountPoint, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The estimated time required in minutes for database server patching. /// The estimated time required in minutes for network switch patching. @@ -455,6 +480,7 @@ public static CloudVmClusterData CloudVmClusterData(ResourceIdentifier id = null /// The port number configured for the listener on the cloud VM cluster. /// The number of nodes in the cloud VM cluster. /// The data disk group size to be allocated in GBs per VM. + /// Array of mount path and size. /// The data disk group size to be allocated in TBs. /// The local node storage to be allocated in GBs. /// The memory to be allocated in GBs. @@ -499,9 +525,11 @@ public static CloudVmClusterData CloudVmClusterData(ResourceIdentifier id = null /// The list of DB servers. /// Cluster compartmentId. /// Cluster subnet ocid. + /// The compute model of the VM Cluster. /// A new instance for mocking. - public static CloudVmClusterProperties CloudVmClusterProperties(ResourceIdentifier ocid = null, long? listenerPort = null, int? nodeCount = null, int? storageSizeInGbs = null, double? dataStorageSizeInTbs = null, int? dbNodeStorageSizeInGbs = null, int? memorySizeInGbs = null, DateTimeOffset? createdOn = null, string lifecycleDetails = null, string timeZone = null, ResourceIdentifier zoneId = null, string hostname = null, string domain = null, int cpuCoreCount = default, float? ocpuCount = null, string clusterName = null, int? dataStoragePercentage = null, bool? isLocalBackupEnabled = null, ResourceIdentifier cloudExadataInfrastructureId = null, bool? isSparseDiskgroupEnabled = null, string systemVersion = null, IEnumerable sshPublicKeys = null, OracleLicenseModel? licenseModel = null, CloudVmClusterDiskRedundancy? diskRedundancy = null, IEnumerable scanIPIds = null, IEnumerable vipIds = null, string scanDnsName = null, int? scanListenerPortTcp = null, int? scanListenerPortTcpSsl = null, ResourceIdentifier scanDnsRecordId = null, string shape = null, OracleDatabaseProvisioningState? provisioningState = null, CloudVmClusterLifecycleState? lifecycleState = null, ResourceIdentifier vnetId = null, string giVersion = null, Uri ociUri = null, Uri nsgUri = null, ResourceIdentifier subnetId = null, string backupSubnetCidr = null, IEnumerable nsgCidrs = null, DiagnosticCollectionConfig dataCollectionOptions = null, string displayName = null, IEnumerable computeNodes = null, ExadataIormConfig iormConfigCache = null, ResourceIdentifier lastUpdateHistoryEntryId = null, IEnumerable dbServers = null, ResourceIdentifier compartmentId = null, ResourceIdentifier subnetOcid = null) + public static CloudVmClusterProperties CloudVmClusterProperties(ResourceIdentifier ocid = null, long? listenerPort = null, int? nodeCount = null, int? storageSizeInGbs = null, IEnumerable fileSystemConfigurationDetails = null, double? dataStorageSizeInTbs = null, int? dbNodeStorageSizeInGbs = null, int? memorySizeInGbs = null, DateTimeOffset? createdOn = null, string lifecycleDetails = null, string timeZone = null, ResourceIdentifier zoneId = null, string hostname = null, string domain = null, int cpuCoreCount = default, float? ocpuCount = null, string clusterName = null, int? dataStoragePercentage = null, bool? isLocalBackupEnabled = null, ResourceIdentifier cloudExadataInfrastructureId = null, bool? isSparseDiskgroupEnabled = null, string systemVersion = null, IEnumerable sshPublicKeys = null, OracleLicenseModel? licenseModel = null, CloudVmClusterDiskRedundancy? diskRedundancy = null, IEnumerable scanIPIds = null, IEnumerable vipIds = null, string scanDnsName = null, int? scanListenerPortTcp = null, int? scanListenerPortTcpSsl = null, ResourceIdentifier scanDnsRecordId = null, string shape = null, OracleDatabaseProvisioningState? provisioningState = null, CloudVmClusterLifecycleState? lifecycleState = null, ResourceIdentifier vnetId = null, string giVersion = null, Uri ociUri = null, Uri nsgUri = null, ResourceIdentifier subnetId = null, string backupSubnetCidr = null, IEnumerable nsgCidrs = null, DiagnosticCollectionConfig dataCollectionOptions = null, string displayName = null, IEnumerable computeNodes = null, ExadataIormConfig iormConfigCache = null, ResourceIdentifier lastUpdateHistoryEntryId = null, IEnumerable dbServers = null, ResourceIdentifier compartmentId = null, ResourceIdentifier subnetOcid = null, AutonomousDatabaseComputeModel? computeModel = null) { + fileSystemConfigurationDetails ??= new List(); sshPublicKeys ??= new List(); scanIPIds ??= new List(); vipIds ??= new List(); @@ -514,6 +542,7 @@ public static CloudVmClusterProperties CloudVmClusterProperties(ResourceIdentifi listenerPort, nodeCount, storageSizeInGbs, + fileSystemConfigurationDetails?.ToList(), dataStorageSizeInTbs, dbNodeStorageSizeInGbs, memorySizeInGbs, @@ -558,6 +587,7 @@ public static CloudVmClusterProperties CloudVmClusterProperties(ResourceIdentifi dbServers?.ToList(), compartmentId, subnetOcid, + computeModel, serializedAdditionalRawData: null); } @@ -584,6 +614,200 @@ public static DBIormConfig DBIormConfig(string dbName = null, string flashCacheL return new DBIormConfig(dbName, flashCacheLimit, share, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// A new instance for mocking. + public static ExadbVmClusterData ExadbVmClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExadbVmClusterProperties properties = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new ExadbVmClusterData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// ExadbVmCluster ocid. + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// Exadata VM cluster on Exascale Infrastructure provisioning state. + /// CloudVmCluster lifecycle state. + /// VNET for network connectivity. + /// Client subnet. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure. + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// The Azure Resource ID of the Exadata Database Storage Vault. + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API. + /// The type of Grid Image. + /// Oracle Grid Infrastructure (GI) software version. + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// Operating system version of the image. + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + /// Filesystem storage details. + /// Additional information about the current lifecycle state. + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// Snapshot filesystem storage details. + /// Total file system storage details. + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + /// Cluster backup subnet ocid. + /// Cluster subnet ocid. + /// A new instance for mocking. + public static ExadbVmClusterProperties ExadbVmClusterProperties(ResourceIdentifier ocid = null, string clusterName = null, string backupSubnetCidr = null, Uri nsgUri = null, OracleDatabaseProvisioningState? provisioningState = null, ExadbVmClusterLifecycleState? lifecycleState = null, ResourceIdentifier vnetId = null, ResourceIdentifier subnetId = null, DiagnosticCollectionConfig dataCollectionOptions = null, string displayName = null, string domain = null, int enabledEcpuCount = default, ResourceIdentifier exascaleDBStorageVaultId = null, ResourceIdentifier gridImageOcid = null, GridImageType? gridImageType = null, string giVersion = null, string hostname = null, OracleLicenseModel? licenseModel = null, int? memorySizeInGbs = null, int nodeCount = default, IEnumerable nsgCidrs = null, ResourceIdentifier zoneOcid = null, ResourceIdentifier privateZoneOcid = null, int? scanListenerPortTcp = null, int? scanListenerPortTcpSsl = null, int? listenerPort = null, string shape = null, IEnumerable sshPublicKeys = null, string systemVersion = null, string timeZone = null, int totalEcpuCount = default, int? vmFileSystemStorageTotalSizeInGbs = null, string lifecycleDetails = null, string scanDnsName = null, IEnumerable scanIPIds = null, ResourceIdentifier scanDnsRecordId = null, int? snapshotFileSystemStorageTotalSizeInGbs = null, int? totalSizeInGbs = null, IEnumerable vipIds = null, Uri ociUri = null, ExadataIormConfig iormConfigCache = null, ResourceIdentifier backupSubnetOcid = null, ResourceIdentifier subnetOcid = null) + { + nsgCidrs ??= new List(); + sshPublicKeys ??= new List(); + scanIPIds ??= new List(); + vipIds ??= new List(); + + return new ExadbVmClusterProperties( + ocid, + clusterName, + backupSubnetCidr, + nsgUri, + provisioningState, + lifecycleState, + vnetId, + subnetId, + dataCollectionOptions, + displayName, + domain, + enabledEcpuCount, + exascaleDBStorageVaultId, + gridImageOcid, + gridImageType, + giVersion, + hostname, + licenseModel, + memorySizeInGbs, + nodeCount, + nsgCidrs?.ToList(), + zoneOcid, + privateZoneOcid, + scanListenerPortTcp, + scanListenerPortTcpSsl, + listenerPort, + shape, + sshPublicKeys?.ToList(), + systemVersion, + timeZone, + totalEcpuCount, + vmFileSystemStorageTotalSizeInGbs.HasValue ? new ExadbVmClusterStorageDetails(vmFileSystemStorageTotalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + lifecycleDetails, + scanDnsName, + scanIPIds?.ToList(), + scanDnsRecordId, + snapshotFileSystemStorageTotalSizeInGbs.HasValue ? new ExadbVmClusterStorageDetails(snapshotFileSystemStorageTotalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + totalSizeInGbs.HasValue ? new ExadbVmClusterStorageDetails(totalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + vipIds?.ToList(), + ociUri, + iormConfigCache, + backupSubnetOcid, + subnetOcid, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// A new instance for mocking. + public static ExascaleDBStorageVaultData ExascaleDBStorageVaultData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ExascaleDBStorageVaultProperties properties = null, IEnumerable zones = null) + { + tags ??= new Dictionary(); + zones ??= new List(); + + return new ExascaleDBStorageVaultData( + id, + name, + resourceType, + systemData, + tags, + location, + properties, + zones?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// Exadata Database Storage Vault description. + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// Create exadata Database Storage Details. + /// Response exadata Database Storage Details. + /// The time zone that you want to use for the Exadata Database Storage Vault. + /// Exadata Database Storage Vault provisioning state. + /// Exadata Database Storage Vault lifecycle state. + /// Additional information about the current lifecycle state. + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + /// The OCID of the Exadata Database Storage Vault. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// A new instance for mocking. + public static ExascaleDBStorageVaultProperties ExascaleDBStorageVaultProperties(int? additionalFlashCacheInPercent = null, string description = null, string displayName = null, int? highCapacityDatabaseStorageInputTotalSizeInGbs = null, ExascaleDBStorageDetails highCapacityDatabaseStorage = null, string timeZone = null, OracleDatabaseProvisioningState? provisioningState = null, ExascaleDBStorageVaultLifecycleState? lifecycleState = null, string lifecycleDetails = null, int? vmClusterCount = null, ResourceIdentifier ocid = null, Uri ociUri = null) + { + return new ExascaleDBStorageVaultProperties( + additionalFlashCacheInPercent, + description, + displayName, + highCapacityDatabaseStorageInputTotalSizeInGbs.HasValue ? new ExascaleDBStorageInputDetails(highCapacityDatabaseStorageInputTotalSizeInGbs.Value, serializedAdditionalRawData: null) : null, + highCapacityDatabaseStorage, + timeZone, + provisioningState, + lifecycleState, + lifecycleDetails, + vmClusterCount, + ocid, + ociUri, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Available Capacity. + /// Total Capacity. + /// A new instance for mocking. + public static ExascaleDBStorageDetails ExascaleDBStorageDetails(int? availableSizeInGbs = null, int? totalSizeInGbs = null) + { + return new ExascaleDBStorageDetails(availableSizeInGbs, totalSizeInGbs, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -638,26 +862,6 @@ public static AutonomousDBVersionData AutonomousDBVersionData(ResourceIdentifier serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// Supported Autonomous Db versions. - /// The Autonomous Database workload type. - /// True if this version of the Oracle Database software's default is free. - /// True if this version of the Oracle Database software's default is paid. - /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. - /// True if this version of the Oracle Database software has payments enabled. - /// A new instance for mocking. - public static AutonomousDBVersionProperties AutonomousDBVersionProperties(string version = null, AutonomousDatabaseWorkloadType? dbWorkload = null, bool? isDefaultForFree = null, bool? isDefaultForPaid = null, bool? isFreeTierEnabled = null, bool? isPaidEnabled = null) - { - return new AutonomousDBVersionProperties( - version, - dbWorkload, - isDefaultForFree, - isDefaultForPaid, - isFreeTierEnabled, - isPaidEnabled, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -676,54 +880,6 @@ public static OracleDBSystemShapeData OracleDBSystemShapeData(ResourceIdentifier serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The family of the shape used for the DB system. - /// The maximum number of CPU cores that can be enabled on the DB system for this shape. - /// The minimum number of CPU cores that can be enabled on the DB system for this shape. - /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. - /// The discrete number by which the CPU core count for this shape can be increased or decreased. - /// The minimum number of Exadata storage servers available for the Exadata infrastructure. - /// The maximum number of Exadata storage servers available for the Exadata infrastructure. - /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. - /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. - /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. - /// The minimum number of CPU cores that can be enabled per node for this shape. - /// The maximum memory that can be enabled for this shape. - /// The minimum memory that need be allocated per node for this shape. - /// The maximum Db Node storage that can be enabled for this shape. - /// The minimum Db Node storage that need be allocated per node for this shape. - /// The maximum DATA storage that can be enabled for this shape. - /// The minimum data storage that need be allocated for this shape. - /// The minimum number of database nodes available for this shape. - /// The maximum number of database nodes available for this shape. - /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. - /// A new instance for mocking. - public static OracleDBSystemShapeProperties OracleDBSystemShapeProperties(string shapeFamily = null, int availableCoreCount = default, int? minimumCoreCount = null, int? runtimeMinimumCoreCount = null, int? coreCountIncrement = null, int? minStorageCount = null, int? maxStorageCount = null, double? availableDataStoragePerServerInTbs = null, int? availableMemoryPerNodeInGbs = null, int? availableDBNodePerNodeInGbs = null, int? minCoreCountPerNode = null, int? availableMemoryInGbs = null, int? minMemoryPerNodeInGbs = null, int? availableDBNodeStorageInGbs = null, int? minDBNodeStoragePerNodeInGbs = null, int? availableDataStorageInTbs = null, int? minDataStorageInTbs = null, int? minimumNodeCount = null, int? maximumNodeCount = null, int? availableCoreCountPerNode = null) - { - return new OracleDBSystemShapeProperties( - shapeFamily, - availableCoreCount, - minimumCoreCount, - runtimeMinimumCoreCount, - coreCountIncrement, - minStorageCount, - maxStorageCount, - availableDataStoragePerServerInTbs, - availableMemoryPerNodeInGbs, - availableDBNodePerNodeInGbs, - minCoreCountPerNode, - availableMemoryInGbs, - minMemoryPerNodeInGbs, - availableDBNodeStorageInGbs, - minDBNodeStoragePerNodeInGbs, - availableDataStorageInTbs, - minDataStorageInTbs, - minimumNodeCount, - maximumNodeCount, - availableCoreCountPerNode, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. @@ -752,7 +908,7 @@ public static OracleDnsPrivateViewData OracleDnsPrivateViewData(ResourceIdentifi /// views timeCreated. /// Azure resource provisioning state. /// A new instance for mocking. - public static OracleDnsPrivateViewProperties OracleDnsPrivateViewProperties(ResourceIdentifier ocid = null, string displayName = null, bool isProtected = default, DnsPrivateViewsLifecycleState? lifecycleState = null, string self = null, DateTimeOffset createdOn = default, DateTimeOffset updatedOn = default, OracleDatabaseResourceProvisioningState? provisioningState = null) + public static OracleDnsPrivateViewProperties OracleDnsPrivateViewProperties(ResourceIdentifier ocid = null, string displayName = null, bool isProtected = default, DnsPrivateViewsLifecycleState lifecycleState = default, string self = null, DateTimeOffset createdOn = default, DateTimeOffset updatedOn = default, OracleDatabaseResourceProvisioningState? provisioningState = null) { return new OracleDnsPrivateViewProperties( ocid, @@ -796,7 +952,7 @@ public static OracleDnsPrivateZoneData OracleDnsPrivateZoneData(ResourceIdentifi /// Zones timeCreated. /// Azure resource provisioning state. /// A new instance for mocking. - public static OracleDnsPrivateZoneProperties OracleDnsPrivateZoneProperties(ResourceIdentifier ocid = null, bool isProtected = default, DnsPrivateZonesLifecycleState? lifecycleState = null, string self = null, int serial = default, string version = null, ResourceIdentifier viewId = null, OracleDnsPrivateZoneType zoneType = default, DateTimeOffset createdOn = default, OracleDatabaseResourceProvisioningState? provisioningState = null) + public static OracleDnsPrivateZoneProperties OracleDnsPrivateZoneProperties(ResourceIdentifier ocid = null, bool isProtected = default, DnsPrivateZonesLifecycleState lifecycleState = default, string self = null, int serial = default, string version = null, ResourceIdentifier viewId = null, OracleDnsPrivateZoneType zoneType = default, DateTimeOffset createdOn = default, OracleDatabaseResourceProvisioningState? provisioningState = null) { return new OracleDnsPrivateZoneProperties( ocid, @@ -812,6 +968,52 @@ public static OracleDnsPrivateZoneProperties OracleDnsPrivateZoneProperties(Reso serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static FlexComponentData FlexComponentData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, FlexComponentProperties properties = null) + { + return new FlexComponentData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// The name of the DB system shape for this Flex Component. + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// The compute model of the DB Server for this Flex Component. + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// The description summary for this Flex Component. + /// A new instance for mocking. + public static FlexComponentProperties FlexComponentProperties(int? minimumCoreCount = null, int? availableCoreCount = null, int? availableDBStorageInGbs = null, int? runtimeMinimumCoreCount = null, string shape = null, int? availableMemoryInGbs = null, int? availableLocalStorageInGbs = null, string computeModel = null, HardwareType? hardwareType = null, string descriptionSummary = null) + { + return new FlexComponentProperties( + minimumCoreCount, + availableCoreCount, + availableDBStorageInGbs, + runtimeMinimumCoreCount, + shape, + availableMemoryInGbs, + availableLocalStorageInGbs, + computeModel, + hardwareType, + descriptionSummary, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -830,6 +1032,24 @@ public static OracleGIVersionData OracleGIVersionData(ResourceIdentifier id = nu serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static GiMinorVersionData GiMinorVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, GiMinorVersionProperties properties = null) + { + return new GiMinorVersionData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -876,9 +1096,14 @@ public static OracleSubscriptionData OracleSubscriptionData(ResourceIdentifier i /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. /// Product code for the term unit. /// Intent for the update operation. + /// Azure subscriptions to be added. + /// State of the add Azure subscription operation on Oracle subscription. + /// Status details of the last operation on Oracle subscription. /// A new instance for mocking. - public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState = null, string saasSubscriptionId = null, ResourceIdentifier cloudAccountId = null, CloudAccountProvisioningState? cloudAccountState = null, string termUnit = null, string productCode = null, OracleSubscriptionUpdateIntent? intent = null) + public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState = null, string saasSubscriptionId = null, ResourceIdentifier cloudAccountId = null, CloudAccountProvisioningState? cloudAccountState = null, string termUnit = null, string productCode = null, OracleSubscriptionUpdateIntent? intent = null, IEnumerable azureSubscriptionIds = null, AddSubscriptionOperationState? addSubscriptionOperationState = null, string lastOperationStatusDetail = null) { + azureSubscriptionIds ??= new List(); + return new OracleSubscriptionProperties( provisioningState, saasSubscriptionId, @@ -887,6 +1112,9 @@ public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSu termUnit, productCode, intent, + azureSubscriptionIds?.ToList(), + addSubscriptionOperationState, + lastOperationStatusDetail, serializedAdditionalRawData: null); } @@ -968,7 +1196,7 @@ public static AutonomousDatabaseBackupData AutonomousDatabaseBackupData(Resource /// Indicates whether the backup can be used to restore the associated Autonomous Database. /// Additional information about the current lifecycle state. /// The current state of the backup. - /// Retention period, in days, for long-term backups. + /// Retention period, in days. /// The backup size in terabytes (TB). /// Timestamp until when the backup will be available. /// The date and time the backup started. @@ -998,6 +1226,24 @@ public static AutonomousDatabaseBackupProperties AutonomousDatabaseBackupPropert serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static AutonomousDatabaseBackupPatch AutonomousDatabaseBackupPatch(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, AutonomousDatabaseBackupProperties properties = null) + { + return new AutonomousDatabaseBackupPatch( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The type of wallet to generate. /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. @@ -1055,8 +1301,9 @@ public static OracleDBServerData OracleDBServerData(ResourceIdentifier id = null /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. /// The date and time that the Db Server was created. /// Azure resource provisioning state. + /// The compute model of the Exadata Infrastructure. /// A new instance for mocking. - public static OracleDBServerProperties OracleDBServerProperties(ResourceIdentifier ocid = null, string displayName = null, ResourceIdentifier compartmentId = null, ResourceIdentifier exadataInfrastructureId = null, int? cpuCoreCount = null, DBServerPatchingDetails dbServerPatchingDetails = null, int? maxMemoryInGbs = null, int? dbNodeStorageSizeInGbs = null, IEnumerable vmClusterIds = null, IEnumerable dbNodeIds = null, string lifecycleDetails = null, DBServerProvisioningState? lifecycleState = null, int? maxCpuCount = null, IEnumerable autonomousVmClusterIds = null, IEnumerable autonomousVirtualMachineIds = null, int? maxDBNodeStorageInGbs = null, int? memorySizeInGbs = null, string shape = null, DateTimeOffset? createdOn = null, OracleDatabaseResourceProvisioningState? provisioningState = null) + public static OracleDBServerProperties OracleDBServerProperties(ResourceIdentifier ocid = null, string displayName = null, ResourceIdentifier compartmentId = null, ResourceIdentifier exadataInfrastructureId = null, int? cpuCoreCount = null, DBServerPatchingDetails dbServerPatchingDetails = null, int? maxMemoryInGbs = null, int? dbNodeStorageSizeInGbs = null, IEnumerable vmClusterIds = null, IEnumerable dbNodeIds = null, string lifecycleDetails = null, DBServerProvisioningState? lifecycleState = null, int? maxCpuCount = null, IEnumerable autonomousVmClusterIds = null, IEnumerable autonomousVirtualMachineIds = null, int? maxDBNodeStorageInGbs = null, int? memorySizeInGbs = null, string shape = null, DateTimeOffset? createdOn = null, OracleDatabaseResourceProvisioningState? provisioningState = null, AutonomousDatabaseComputeModel? computeModel = null) { vmClusterIds ??= new List(); dbNodeIds ??= new List(); @@ -1084,6 +1331,7 @@ public static OracleDBServerProperties OracleDBServerProperties(ResourceIdentifi shape, createdOn, provisioningState, + computeModel, serializedAdditionalRawData: null); } @@ -1141,7 +1389,7 @@ public static CloudVmClusterDBNodeData CloudVmClusterDBNodeData(ResourceIdentifi /// The OCID of the VNIC. /// Azure resource provisioning state. /// A new instance for mocking. - public static CloudVmClusterDBNodeProperties CloudVmClusterDBNodeProperties(ResourceIdentifier ocid = null, string additionalDetails = null, ResourceIdentifier backupIPId = null, ResourceIdentifier backupVnic2Id = null, ResourceIdentifier backupVnicId = null, int? cpuCoreCount = null, int? dbNodeStorageSizeInGbs = null, ResourceIdentifier dbServerId = null, ResourceIdentifier dbSystemId = null, string faultDomain = null, ResourceIdentifier hostIPId = null, string hostname = null, DBNodeProvisioningState? lifecycleState = null, string lifecycleDetails = null, DBNodeMaintenanceType? maintenanceType = null, int? memorySizeInGbs = null, int? softwareStorageSizeInGb = null, DateTimeOffset? timeCreated = null, DateTimeOffset? timeMaintenanceWindowEnd = null, DateTimeOffset? timeMaintenanceWindowStart = null, ResourceIdentifier vnic2Id = null, ResourceIdentifier vnicId = null, OracleDatabaseResourceProvisioningState? provisioningState = null) + public static CloudVmClusterDBNodeProperties CloudVmClusterDBNodeProperties(ResourceIdentifier ocid = null, string additionalDetails = null, ResourceIdentifier backupIPId = null, ResourceIdentifier backupVnic2Id = null, ResourceIdentifier backupVnicId = null, int? cpuCoreCount = null, int? dbNodeStorageSizeInGbs = null, ResourceIdentifier dbServerId = null, ResourceIdentifier dbSystemId = null, string faultDomain = null, ResourceIdentifier hostIPId = null, string hostname = null, DBNodeProvisioningState lifecycleState = default, string lifecycleDetails = null, DBNodeMaintenanceType? maintenanceType = null, int? memorySizeInGbs = null, int? softwareStorageSizeInGb = null, DateTimeOffset timeCreated = default, DateTimeOffset? timeMaintenanceWindowEnd = null, DateTimeOffset? timeMaintenanceWindowStart = null, ResourceIdentifier vnic2Id = null, ResourceIdentifier vnicId = null, OracleDatabaseResourceProvisioningState? provisioningState = null) { return new CloudVmClusterDBNodeProperties( ocid, @@ -1230,6 +1478,32 @@ public static CloudVmClusterVirtualNetworkAddressProperties CloudVmClusterVirtua serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// A new instance for mocking. + public static ExascaleDBNodeData ExascaleDBNodeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, ExascaleDBNodeProperties properties = null) + { + return new ExascaleDBNodeData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// ExascaleDbNode provisioning state. + /// A new instance for mocking. + public static DBActionResponse DBActionResponse(OracleDatabaseProvisioningState? provisioningState = null) + { + return new DBActionResponse(provisioningState, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// Admin password. /// The maintenance schedule type of the Autonomous Database Serverless. @@ -1245,11 +1519,13 @@ public static CloudVmClusterVirtualNetworkAddressProperties CloudVmClusterVirtua /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. /// Local Autonomous Disaster Recovery standby database details. /// Indicates the number of seconds of data loss for a Data Guard failover. /// Specifies if the Autonomous Database requires mTLS connections. @@ -1306,7 +1582,7 @@ public static CloudVmClusterVirtualNetworkAddressProperties CloudVmClusterVirtua /// Retention period, in days, for long-term backups. /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. /// The source of the database. - /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. /// The Autonomous Database clone type. /// Indicates if the refreshable clone can be reconnected to its source database. /// Indicates if the Autonomous Database is a refreshable clone. @@ -1314,7 +1590,7 @@ public static CloudVmClusterVirtualNetworkAddressProperties CloudVmClusterVirtua /// The refresh status of the clone. /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. /// A new instance for mocking. - public static AutonomousDatabaseCloneProperties AutonomousDatabaseCloneProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null, AutonomousDatabaseSourceType? source = null, ResourceIdentifier sourceId = null, AutonomousDatabaseCloneType cloneType = default, bool? isReconnectCloneEnabled = null, bool? isRefreshableClone = null, RefreshableModelType? refreshableModel = null, RefreshableStatusType? refreshableStatus = null, DateTimeOffset? reconnectCloneEnabledOn = null) + public static AutonomousDatabaseCloneProperties AutonomousDatabaseCloneProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null, AutonomousDatabaseSourceType? source = null, ResourceIdentifier sourceId = null, AutonomousDatabaseCloneType cloneType = default, bool? isReconnectCloneEnabled = null, bool? isRefreshableClone = null, RefreshableModelType? refreshableModel = null, RefreshableStatusType? refreshableStatus = null, DateTimeOffset? reconnectCloneEnabledOn = null) { customerContacts ??= new List(); peerDBIds ??= new List(); @@ -1344,6 +1620,8 @@ public static AutonomousDatabaseCloneProperties AutonomousDatabaseClonePropertie isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, @@ -1410,7 +1688,7 @@ public static AutonomousDatabaseCloneProperties AutonomousDatabaseClonePropertie reconnectCloneEnabledOn); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// Admin password. /// The maintenance schedule type of the Autonomous Database Serverless. /// The character set for the autonomous database. @@ -1425,11 +1703,13 @@ public static AutonomousDatabaseCloneProperties AutonomousDatabaseClonePropertie /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. /// Local Autonomous Disaster Recovery standby database details. /// Indicates the number of seconds of data loss for a Data Guard failover. /// Specifies if the Autonomous Database requires mTLS connections. @@ -1485,8 +1765,14 @@ public static AutonomousDatabaseCloneProperties AutonomousDatabaseClonePropertie /// Database ocid. /// Retention period, in days, for long-term backups. /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. - /// A new instance for mocking. - public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null) + /// The source of the database. + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// The name of the region where source Autonomous Database exists. + /// The source database ocid. + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// A new instance for mocking. + public static AutonomousDatabaseCrossRegionDisasterRecoveryProperties AutonomousDatabaseCrossRegionDisasterRecoveryProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null, AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource source = default, ResourceIdentifier sourceId = null, string sourceLocation = null, string sourceOcid = null, DisasterRecoveryType remoteDisasterRecoveryType = default, bool? isReplicateAutomaticBackups = null) { customerContacts ??= new List(); peerDBIds ??= new List(); @@ -1495,9 +1781,9 @@ public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string a supportedRegionsToCloneTo ??= new List(); whitelistedIPs ??= new List(); - return new AutonomousDatabaseProperties( + return new AutonomousDatabaseCrossRegionDisasterRecoveryProperties( adminPassword, - OracleDataBaseType.Regular, + OracleDataBaseType.CrossRegionDisasterRecovery, autonomousMaintenanceScheduleType, characterSet, computeCount, @@ -1516,6 +1802,8 @@ public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string a isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, @@ -1571,7 +1859,752 @@ public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string a ocid, backupRetentionPeriodInDays, whitelistedIPs?.ToList(), - serializedAdditionalRawData: null); + serializedAdditionalRawData: null, + source, + sourceId, + sourceLocation, + sourceOcid, + remoteDisasterRecoveryType, + isReplicateAutomaticBackups); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// The source of the database. + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// The Autonomous Database clone type. + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + /// Clone from latest available backup timestamp. + /// A new instance for mocking. + public static AutonomousDatabaseFromBackupTimestampProperties AutonomousDatabaseFromBackupTimestampProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null, AutonomousDatabaseFromBackupTimestampPropertiesSource source = default, ResourceIdentifier sourceId = null, AutonomousDatabaseCloneType cloneType = default, DateTimeOffset? timestamp = null, bool? useLatestAvailableBackupTimeStamp = null) + { + customerContacts ??= new List(); + peerDBIds ??= new List(); + availableUpgradeVersions ??= new List(); + provisionableCpus ??= new List(); + supportedRegionsToCloneTo ??= new List(); + whitelistedIPs ??= new List(); + + return new AutonomousDatabaseFromBackupTimestampProperties( + adminPassword, + OracleDataBaseType.CloneFromBackupTimestamp, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts?.ToList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDBIds?.ToList(), + peerDBId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDB, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUri, + subnetId, + vnetId, + createdOn, + maintenanceBeginOn, + maintenanceEndOn, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions?.ToList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupCreatedOn, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus?.ToList(), + role, + serviceConsoleUri, + sqlWebDeveloperUri, + supportedRegionsToCloneTo?.ToList(), + dataGuardRoleChangedOn, + freeAutonomousDatabaseDeletedOn, + timeLocalDataGuardEnabled, + lastFailoverHappenedOn, + lastRefreshHappenedOn, + lastRefreshPointTimestamp, + lastSwitchoverHappenedOn, + freeAutonomousDatabaseStoppedOn, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs?.ToList(), + serializedAdditionalRawData: null, + source, + sourceId, + cloneType, + timestamp, + useLatestAvailableBackupTimeStamp); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// A new instance for mocking. + public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string adminPassword = null, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = null, string characterSet = null, float? computeCount = null, AutonomousDatabaseComputeModel? computeModel = null, int? cpuCoreCount = null, IEnumerable customerContacts = null, int? dataStorageSizeInTbs = null, int? dataStorageSizeInGbs = null, string dbVersion = null, AutonomousDatabaseWorkloadType? dbWorkload = null, string displayName = null, bool? isAutoScalingEnabled = null, bool? isAutoScalingForStorageEnabled = null, IEnumerable peerDBIds = null, string peerDBId = null, bool? isLocalDataGuardEnabled = null, bool? isRemoteDataGuardEnabled = null, DisasterRecoveryType? localDisasterRecoveryType = null, DateTimeOffset? timeDisasterRecoveryRoleChanged = null, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = null, AutonomousDatabaseStandbySummary localStandbyDB = null, int? failedDataRecoveryInSeconds = null, bool? isMtlsConnectionRequired = null, bool? isPreviewVersionWithServiceTermsAccepted = null, OracleLicenseModel? licenseModel = null, string ncharacterSet = null, string lifecycleDetails = null, OracleDatabaseProvisioningState? provisioningState = null, AutonomousDatabaseLifecycleState? lifecycleState = null, ScheduledOperationsType scheduledOperations = null, string privateEndpointIP = null, string privateEndpointLabel = null, Uri ociUri = null, ResourceIdentifier subnetId = null, ResourceIdentifier vnetId = null, DateTimeOffset? createdOn = null, DateTimeOffset? maintenanceBeginOn = null, DateTimeOffset? maintenanceEndOn = null, double? actualUsedDataStorageSizeInTbs = null, double? allocatedStorageSizeInTbs = null, OracleApexDetailsType apexDetails = null, IEnumerable availableUpgradeVersions = null, AutonomousDatabaseConnectionStrings connectionStrings = null, AutonomousDatabaseConnectionUrls connectionUrls = null, DataSafeStatusType? dataSafeStatus = null, OracleDatabaseEditionType? databaseEdition = null, ResourceIdentifier autonomousDatabaseId = null, int? inMemoryAreaInGbs = null, DateTimeOffset? nextLongTermBackupCreatedOn = null, LongTermBackUpScheduleDetails longTermBackupSchedule = null, bool? isPreview = null, int? localAdgAutoFailoverMaxDataLossLimit = null, int? memoryPerOracleComputeUnitInGbs = null, AutonomousDatabaseModeType? openMode = null, OperationsInsightsStatusType? operationsInsightsStatus = null, AutonomousDatabasePermissionLevelType? permissionLevel = null, string privateEndpoint = null, IEnumerable provisionableCpus = null, DataGuardRoleType? role = null, Uri serviceConsoleUri = null, Uri sqlWebDeveloperUri = null, IEnumerable supportedRegionsToCloneTo = null, DateTimeOffset? dataGuardRoleChangedOn = null, DateTimeOffset? freeAutonomousDatabaseDeletedOn = null, string timeLocalDataGuardEnabled = null, DateTimeOffset? lastFailoverHappenedOn = null, DateTimeOffset? lastRefreshHappenedOn = null, DateTimeOffset? lastRefreshPointTimestamp = null, DateTimeOffset? lastSwitchoverHappenedOn = null, DateTimeOffset? freeAutonomousDatabaseStoppedOn = null, int? usedDataStorageSizeInGbs = null, int? usedDataStorageSizeInTbs = null, ResourceIdentifier ocid = null, int? backupRetentionPeriodInDays = null, IEnumerable whitelistedIPs = null) + { + customerContacts ??= new List(); + peerDBIds ??= new List(); + availableUpgradeVersions ??= new List(); + provisionableCpus ??= new List(); + supportedRegionsToCloneTo ??= new List(); + whitelistedIPs ??= new List(); + + return new AutonomousDatabaseProperties( + adminPassword, + OracleDataBaseType.Regular, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts?.ToList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDBIds?.ToList(), + peerDBId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDB, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUri, + subnetId, + vnetId, + createdOn, + maintenanceBeginOn, + maintenanceEndOn, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions?.ToList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupCreatedOn, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus?.ToList(), + role, + serviceConsoleUri, + sqlWebDeveloperUri, + supportedRegionsToCloneTo?.ToList(), + dataGuardRoleChangedOn, + freeAutonomousDatabaseDeletedOn, + timeLocalDataGuardEnabled, + lastFailoverHappenedOn, + lastRefreshHappenedOn, + lastRefreshPointTimestamp, + lastSwitchoverHappenedOn, + freeAutonomousDatabaseStoppedOn, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AutonomousDatabaseBaseProperties AutonomousDatabaseBaseProperties(string adminPassword, string dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IEnumerable customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IEnumerable peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IEnumerable availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IEnumerable provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IEnumerable supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IEnumerable whitelistedIPs) + { + return AutonomousDatabaseBaseProperties(adminPassword: adminPassword, dataBaseType: dataBaseType, autonomousMaintenanceScheduleType: autonomousMaintenanceScheduleType, characterSet: characterSet, computeCount: computeCount, computeModel: computeModel, cpuCoreCount: cpuCoreCount, customerContacts: customerContacts, dataStorageSizeInTbs: dataStorageSizeInTbs, dataStorageSizeInGbs: dataStorageSizeInGbs, dbVersion: dbVersion, dbWorkload: dbWorkload, displayName: displayName, isAutoScalingEnabled: isAutoScalingEnabled, isAutoScalingForStorageEnabled: isAutoScalingForStorageEnabled, peerDBIds: peerDBIds, peerDBId: peerDBId, isLocalDataGuardEnabled: isLocalDataGuardEnabled, isRemoteDataGuardEnabled: isRemoteDataGuardEnabled, localDisasterRecoveryType: localDisasterRecoveryType, timeDisasterRecoveryRoleChanged: default, remoteDisasterRecoveryConfiguration: default, localStandbyDB: localStandbyDB, failedDataRecoveryInSeconds: failedDataRecoveryInSeconds, isMtlsConnectionRequired: isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted: isPreviewVersionWithServiceTermsAccepted, licenseModel: licenseModel, ncharacterSet: ncharacterSet, lifecycleDetails: lifecycleDetails, provisioningState: provisioningState, lifecycleState: lifecycleState, scheduledOperations: scheduledOperations, privateEndpointIP: privateEndpointIP, privateEndpointLabel: privateEndpointLabel, ociUri: ociUri, subnetId: subnetId, vnetId: vnetId, createdOn: createdOn, maintenanceBeginOn: maintenanceBeginOn, maintenanceEndOn: maintenanceEndOn, actualUsedDataStorageSizeInTbs: actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs: allocatedStorageSizeInTbs, apexDetails: apexDetails, availableUpgradeVersions: availableUpgradeVersions, connectionStrings: connectionStrings, connectionUrls: connectionUrls, dataSafeStatus: dataSafeStatus, databaseEdition: databaseEdition, autonomousDatabaseId: autonomousDatabaseId, inMemoryAreaInGbs: inMemoryAreaInGbs, nextLongTermBackupCreatedOn: nextLongTermBackupCreatedOn, longTermBackupSchedule: longTermBackupSchedule, isPreview: isPreview, localAdgAutoFailoverMaxDataLossLimit: localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs: memoryPerOracleComputeUnitInGbs, openMode: openMode, operationsInsightsStatus: operationsInsightsStatus, permissionLevel: permissionLevel, privateEndpoint: privateEndpoint, provisionableCpus: provisionableCpus, role: role, serviceConsoleUri: serviceConsoleUri, sqlWebDeveloperUri: sqlWebDeveloperUri, supportedRegionsToCloneTo: supportedRegionsToCloneTo, dataGuardRoleChangedOn: dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn: freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled: timeLocalDataGuardEnabled, lastFailoverHappenedOn: lastFailoverHappenedOn, lastRefreshHappenedOn: lastRefreshHappenedOn, lastRefreshPointTimestamp: lastRefreshPointTimestamp, lastSwitchoverHappenedOn: lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn: freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs: usedDataStorageSizeInGbs, usedDataStorageSizeInTbs: usedDataStorageSizeInTbs, ocid: ocid, backupRetentionPeriodInDays: backupRetentionPeriodInDays, whitelistedIPs: whitelistedIPs); + } + + /// Initializes a new instance of . + /// Exadata infra ocid. + /// The number of compute servers for the cloud Exadata infrastructure. + /// The number of storage servers for the cloud Exadata infrastructure. + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// The date and time the cloud Exadata infrastructure resource was created. + /// Additional information about the current lifecycle state. + /// maintenanceWindow property. + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network switch patching). + /// The list of customer email addresses that receive information from Oracle about the specified OCI Database service resource. Oracle uses these email addresses to send notifications about planned and unplanned software maintenance updates, information about system hardware, and other information needed by administrators. Up to 10 email addresses can be added to the customer contacts for a cloud Exadata infrastructure instance. + /// CloudExadataInfrastructure provisioning state. + /// CloudExadataInfrastructure lifecycle state. + /// The model name of the cloud Exadata infrastructure resource. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// The total number of CPU cores allocated. + /// The total number of CPU cores available. + /// The memory allocated in GBs. + /// The total memory available in GBs. + /// The local node storage to be allocated in GBs. + /// The total local node storage available in GBs. + /// The quantity of data in the database, in terabytes. + /// The total available DATA disk group size. + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// The requested number of additional storage servers for the Exadata infrastructure. + /// The name for the Exadata infrastructure. + /// The OCID of the last maintenance run. + /// The OCID of the next maintenance run. + /// Monthly Db Server version. + /// Monthly Storage Server version. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static CloudExadataInfrastructureProperties CloudExadataInfrastructureProperties(ResourceIdentifier ocid, int? computeCount, int? storageCount, int? totalStorageSizeInGbs, int? availableStorageSizeInGbs, DateTimeOffset? createdOn, string lifecycleDetails, OracleDatabaseMaintenanceWindow maintenanceWindow, EstimatedPatchingTime estimatedPatchingTime, IEnumerable customerContacts, OracleDatabaseProvisioningState? provisioningState, CloudExadataInfrastructureLifecycleState? lifecycleState, string shape, Uri ociUri, int? cpuCount, int? maxCpuCount, int? memorySizeInGbs, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, int? maxDBNodeStorageSizeInGbs, double? dataStorageSizeInTbs, double? maxDataStorageInTbs, string dbServerVersion, string storageServerVersion, int? activatedStorageCount, int? additionalStorageCount, string displayName, ResourceIdentifier lastMaintenanceRunId, ResourceIdentifier nextMaintenanceRunId, string monthlyDBServerVersion, string monthlyStorageServerVersion) + { + return CloudExadataInfrastructureProperties(definedFileSystemConfiguration: default, ocid: ocid, computeCount: computeCount, storageCount: storageCount, totalStorageSizeInGbs: totalStorageSizeInGbs, availableStorageSizeInGbs: availableStorageSizeInGbs, createdOn: createdOn, lifecycleDetails: lifecycleDetails, maintenanceWindow: maintenanceWindow, estimatedPatchingTime: estimatedPatchingTime, customerContacts: customerContacts, provisioningState: provisioningState, lifecycleState: lifecycleState, shape: shape, ociUri: ociUri, cpuCount: cpuCount, maxCpuCount: maxCpuCount, memorySizeInGbs: memorySizeInGbs, maxMemoryInGbs: maxMemoryInGbs, dbNodeStorageSizeInGbs: dbNodeStorageSizeInGbs, maxDBNodeStorageSizeInGbs: maxDBNodeStorageSizeInGbs, dataStorageSizeInTbs: dataStorageSizeInTbs, maxDataStorageInTbs: maxDataStorageInTbs, dbServerVersion: dbServerVersion, storageServerVersion: storageServerVersion, activatedStorageCount: activatedStorageCount, additionalStorageCount: additionalStorageCount, displayName: displayName, lastMaintenanceRunId: lastMaintenanceRunId, nextMaintenanceRunId: nextMaintenanceRunId, monthlyDBServerVersion: monthlyDBServerVersion, monthlyStorageServerVersion: monthlyStorageServerVersion, databaseServerType: default, storageServerType: default, computeModel: default); + } + + /// Initializes a new instance of . + /// Cloud VM Cluster ocid. + /// The port number configured for the listener on the cloud VM cluster. + /// The number of nodes in the cloud VM cluster. + /// The data disk group size to be allocated in GBs per VM. + /// The data disk group size to be allocated in TBs. + /// The local node storage to be allocated in GBs. + /// The memory to be allocated in GBs. + /// The date and time that the cloud VM cluster was created. + /// Additional information about the current lifecycle state. + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// The OCID of the zone the cloud VM cluster is associated with. + /// The hostname for the cloud VM cluster. + /// The domain name for the cloud VM cluster. + /// The number of CPU cores enabled on the cloud VM cluster. + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// The cluster name for cloud VM cluster. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// The percentage assigned to DATA storage (user data and database files). The remaining percentage is assigned to RECO storage (database redo logs, archive logs, and recovery manager backups). Accepted values are 35, 40, 60 and 80. The default is 80 percent assigned to DATA storage. See [Storage Configuration](/Content/Database/Concepts/exaoverview.htm#Exadata) in the Exadata documentation for details on the impact of the configuration settings on storage. + /// If true, database backup on local Exadata storage is configured for the cloud VM cluster. If false, database backup on local Exadata storage is not available in the cloud VM cluster. + /// Cloud Exadata Infrastructure ID. + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// Operating system version of the image. + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// The Single Client Access Name (SCAN) IP addresses associated with the cloud VM cluster. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The virtual IP (VIP) addresses associated with the cloud VM cluster. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// The model name of the Exadata hardware running the cloud VM cluster. + /// CloudVmCluster provisioning state. + /// CloudVmCluster lifecycle state. + /// VNET for network connectivity. + /// Oracle Grid Infrastructure (GI) software version. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// Client subnet. + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// The list of compute servers to be added to the cloud VM cluster. + /// iormConfigCache details for cloud VM cluster. + /// The OCID of the last maintenance update history entry. + /// The list of DB servers. + /// Cluster compartmentId. + /// Cluster subnet ocid. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static CloudVmClusterProperties CloudVmClusterProperties(ResourceIdentifier ocid, long? listenerPort, int? nodeCount, int? storageSizeInGbs, double? dataStorageSizeInTbs, int? dbNodeStorageSizeInGbs, int? memorySizeInGbs, DateTimeOffset? createdOn, string lifecycleDetails, string timeZone, ResourceIdentifier zoneId, string hostname, string domain, int cpuCoreCount, float? ocpuCount, string clusterName, int? dataStoragePercentage, bool? isLocalBackupEnabled, ResourceIdentifier cloudExadataInfrastructureId, bool? isSparseDiskgroupEnabled, string systemVersion, IEnumerable sshPublicKeys, OracleLicenseModel? licenseModel, CloudVmClusterDiskRedundancy? diskRedundancy, IEnumerable scanIPIds, IEnumerable vipIds, string scanDnsName, int? scanListenerPortTcp, int? scanListenerPortTcpSsl, ResourceIdentifier scanDnsRecordId, string shape, OracleDatabaseProvisioningState? provisioningState, CloudVmClusterLifecycleState? lifecycleState, ResourceIdentifier vnetId, string giVersion, Uri ociUri, Uri nsgUri, ResourceIdentifier subnetId, string backupSubnetCidr, IEnumerable nsgCidrs, DiagnosticCollectionConfig dataCollectionOptions, string displayName, IEnumerable computeNodes, ExadataIormConfig iormConfigCache, ResourceIdentifier lastUpdateHistoryEntryId, IEnumerable dbServers, ResourceIdentifier compartmentId, ResourceIdentifier subnetOcid) + { + return CloudVmClusterProperties(ocid: ocid, listenerPort: listenerPort, nodeCount: nodeCount, storageSizeInGbs: storageSizeInGbs, fileSystemConfigurationDetails: default, dataStorageSizeInTbs: dataStorageSizeInTbs, dbNodeStorageSizeInGbs: dbNodeStorageSizeInGbs, memorySizeInGbs: memorySizeInGbs, createdOn: createdOn, lifecycleDetails: lifecycleDetails, timeZone: timeZone, zoneId: zoneId, hostname: hostname, domain: domain, cpuCoreCount: cpuCoreCount, ocpuCount: ocpuCount, clusterName: clusterName, dataStoragePercentage: dataStoragePercentage, isLocalBackupEnabled: isLocalBackupEnabled, cloudExadataInfrastructureId: cloudExadataInfrastructureId, isSparseDiskgroupEnabled: isSparseDiskgroupEnabled, systemVersion: systemVersion, sshPublicKeys: sshPublicKeys, licenseModel: licenseModel, diskRedundancy: diskRedundancy, scanIPIds: scanIPIds, vipIds: vipIds, scanDnsName: scanDnsName, scanListenerPortTcp: scanListenerPortTcp, scanListenerPortTcpSsl: scanListenerPortTcpSsl, scanDnsRecordId: scanDnsRecordId, shape: shape, provisioningState: provisioningState, lifecycleState: lifecycleState, vnetId: vnetId, giVersion: giVersion, ociUri: ociUri, nsgUri: nsgUri, subnetId: subnetId, backupSubnetCidr: backupSubnetCidr, nsgCidrs: nsgCidrs, dataCollectionOptions: dataCollectionOptions, displayName: displayName, computeNodes: computeNodes, iormConfigCache: iormConfigCache, lastUpdateHistoryEntryId: lastUpdateHistoryEntryId, dbServers: dbServers, compartmentId: compartmentId, subnetOcid: subnetOcid, computeModel: default); + } + + /// Initializes a new instance of . + /// OracleSubscriptionProvisioningState provisioning state. + /// SAAS subscription ID generated by Marketplace. + /// Cloud Account Id. + /// Cloud Account provisioning state. + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. + /// Product code for the term unit. + /// Intent for the update operation. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static OracleSubscriptionProperties OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, ResourceIdentifier cloudAccountId, CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, OracleSubscriptionUpdateIntent? intent) + { + return OracleSubscriptionProperties(provisioningState: provisioningState, saasSubscriptionId: saasSubscriptionId, cloudAccountId: cloudAccountId, cloudAccountState: cloudAccountState, termUnit: termUnit, productCode: productCode, intent: intent, azureSubscriptionIds: default, addSubscriptionOperationState: default, lastOperationStatusDetail: default); + } + + /// Initializes a new instance of . + /// Db server name. + /// The name for the Db Server. + /// The OCID of the compartment. + /// The OCID of the Exadata infrastructure. + /// The number of CPU cores enabled on the Db server. + /// dbServerPatching details of the Db server. + /// The total memory available in GBs. + /// The allocated local node storage in GBs on the Db server. + /// The OCID of the VM Clusters associated with the Db server. + /// The OCID of the Db nodes associated with the Db server. + /// Lifecycle details of dbServer. + /// DbServer provisioning state. + /// The total number of CPU cores available. + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// The total max dbNode storage in GBs. + /// The total memory size in GBs. + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// The date and time that the Db Server was created. + /// Azure resource provisioning state. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static OracleDBServerProperties OracleDBServerProperties(ResourceIdentifier ocid, string displayName, ResourceIdentifier compartmentId, ResourceIdentifier exadataInfrastructureId, int? cpuCoreCount, DBServerPatchingDetails dbServerPatchingDetails, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, IEnumerable vmClusterIds, IEnumerable dbNodeIds, string lifecycleDetails, DBServerProvisioningState? lifecycleState, int? maxCpuCount, IEnumerable autonomousVmClusterIds, IEnumerable autonomousVirtualMachineIds, int? maxDBNodeStorageInGbs, int? memorySizeInGbs, string shape, DateTimeOffset? createdOn, OracleDatabaseResourceProvisioningState? provisioningState) + { + return OracleDBServerProperties(ocid: ocid, displayName: displayName, compartmentId: compartmentId, exadataInfrastructureId: exadataInfrastructureId, cpuCoreCount: cpuCoreCount, dbServerPatchingDetails: dbServerPatchingDetails, maxMemoryInGbs: maxMemoryInGbs, dbNodeStorageSizeInGbs: dbNodeStorageSizeInGbs, vmClusterIds: vmClusterIds, dbNodeIds: dbNodeIds, lifecycleDetails: lifecycleDetails, lifecycleState: lifecycleState, maxCpuCount: maxCpuCount, autonomousVmClusterIds: autonomousVmClusterIds, autonomousVirtualMachineIds: autonomousVirtualMachineIds, maxDBNodeStorageInGbs: maxDBNodeStorageInGbs, memorySizeInGbs: memorySizeInGbs, shape: shape, createdOn: createdOn, provisioningState: provisioningState, computeModel: default); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// The source of the database. + /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Autonomous Database clone type. + /// Indicates if the refreshable clone can be reconnected to its source database. + /// Indicates if the Autonomous Database is a refreshable clone. + /// The refresh mode of the clone. + /// The refresh status of the clone. + /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AutonomousDatabaseCloneProperties AutonomousDatabaseCloneProperties(string adminPassword, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IEnumerable customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IEnumerable peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IEnumerable availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IEnumerable provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IEnumerable supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IEnumerable whitelistedIPs, AutonomousDatabaseSourceType? source, ResourceIdentifier sourceId, AutonomousDatabaseCloneType cloneType, bool? isReconnectCloneEnabled, bool? isRefreshableClone, RefreshableModelType? refreshableModel, RefreshableStatusType? refreshableStatus, DateTimeOffset? reconnectCloneEnabledOn) + { + return AutonomousDatabaseCloneProperties(adminPassword: adminPassword, autonomousMaintenanceScheduleType: autonomousMaintenanceScheduleType, characterSet: characterSet, computeCount: computeCount, computeModel: computeModel, cpuCoreCount: cpuCoreCount, customerContacts: customerContacts, dataStorageSizeInTbs: dataStorageSizeInTbs, dataStorageSizeInGbs: dataStorageSizeInGbs, dbVersion: dbVersion, dbWorkload: dbWorkload, displayName: displayName, isAutoScalingEnabled: isAutoScalingEnabled, isAutoScalingForStorageEnabled: isAutoScalingForStorageEnabled, peerDBIds: peerDBIds, peerDBId: peerDBId, isLocalDataGuardEnabled: isLocalDataGuardEnabled, isRemoteDataGuardEnabled: isRemoteDataGuardEnabled, localDisasterRecoveryType: localDisasterRecoveryType, timeDisasterRecoveryRoleChanged: default, remoteDisasterRecoveryConfiguration: default, localStandbyDB: localStandbyDB, failedDataRecoveryInSeconds: failedDataRecoveryInSeconds, isMtlsConnectionRequired: isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted: isPreviewVersionWithServiceTermsAccepted, licenseModel: licenseModel, ncharacterSet: ncharacterSet, lifecycleDetails: lifecycleDetails, provisioningState: provisioningState, lifecycleState: lifecycleState, scheduledOperations: scheduledOperations, privateEndpointIP: privateEndpointIP, privateEndpointLabel: privateEndpointLabel, ociUri: ociUri, subnetId: subnetId, vnetId: vnetId, createdOn: createdOn, maintenanceBeginOn: maintenanceBeginOn, maintenanceEndOn: maintenanceEndOn, actualUsedDataStorageSizeInTbs: actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs: allocatedStorageSizeInTbs, apexDetails: apexDetails, availableUpgradeVersions: availableUpgradeVersions, connectionStrings: connectionStrings, connectionUrls: connectionUrls, dataSafeStatus: dataSafeStatus, databaseEdition: databaseEdition, autonomousDatabaseId: autonomousDatabaseId, inMemoryAreaInGbs: inMemoryAreaInGbs, nextLongTermBackupCreatedOn: nextLongTermBackupCreatedOn, longTermBackupSchedule: longTermBackupSchedule, isPreview: isPreview, localAdgAutoFailoverMaxDataLossLimit: localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs: memoryPerOracleComputeUnitInGbs, openMode: openMode, operationsInsightsStatus: operationsInsightsStatus, permissionLevel: permissionLevel, privateEndpoint: privateEndpoint, provisionableCpus: provisionableCpus, role: role, serviceConsoleUri: serviceConsoleUri, sqlWebDeveloperUri: sqlWebDeveloperUri, supportedRegionsToCloneTo: supportedRegionsToCloneTo, dataGuardRoleChangedOn: dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn: freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled: timeLocalDataGuardEnabled, lastFailoverHappenedOn: lastFailoverHappenedOn, lastRefreshHappenedOn: lastRefreshHappenedOn, lastRefreshPointTimestamp: lastRefreshPointTimestamp, lastSwitchoverHappenedOn: lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn: freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs: usedDataStorageSizeInGbs, usedDataStorageSizeInTbs: usedDataStorageSizeInTbs, ocid: ocid, backupRetentionPeriodInDays: backupRetentionPeriodInDays, whitelistedIPs: whitelistedIPs, source: source, sourceId: sourceId, cloneType: cloneType, isReconnectCloneEnabled: isReconnectCloneEnabled, isRefreshableClone: isRefreshableClone, refreshableModel: refreshableModel, refreshableStatus: refreshableStatus, reconnectCloneEnabledOn: reconnectCloneEnabledOn); + } + + /// Initializes a new instance of . + /// Admin password. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AutonomousDatabaseProperties AutonomousDatabaseProperties(string adminPassword, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IEnumerable customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IEnumerable peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IEnumerable availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IEnumerable provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IEnumerable supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IEnumerable whitelistedIPs) + { + return AutonomousDatabaseProperties(adminPassword: adminPassword, autonomousMaintenanceScheduleType: autonomousMaintenanceScheduleType, characterSet: characterSet, computeCount: computeCount, computeModel: computeModel, cpuCoreCount: cpuCoreCount, customerContacts: customerContacts, dataStorageSizeInTbs: dataStorageSizeInTbs, dataStorageSizeInGbs: dataStorageSizeInGbs, dbVersion: dbVersion, dbWorkload: dbWorkload, displayName: displayName, isAutoScalingEnabled: isAutoScalingEnabled, isAutoScalingForStorageEnabled: isAutoScalingForStorageEnabled, peerDBIds: peerDBIds, peerDBId: peerDBId, isLocalDataGuardEnabled: isLocalDataGuardEnabled, isRemoteDataGuardEnabled: isRemoteDataGuardEnabled, localDisasterRecoveryType: localDisasterRecoveryType, timeDisasterRecoveryRoleChanged: default, remoteDisasterRecoveryConfiguration: default, localStandbyDB: localStandbyDB, failedDataRecoveryInSeconds: failedDataRecoveryInSeconds, isMtlsConnectionRequired: isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted: isPreviewVersionWithServiceTermsAccepted, licenseModel: licenseModel, ncharacterSet: ncharacterSet, lifecycleDetails: lifecycleDetails, provisioningState: provisioningState, lifecycleState: lifecycleState, scheduledOperations: scheduledOperations, privateEndpointIP: privateEndpointIP, privateEndpointLabel: privateEndpointLabel, ociUri: ociUri, subnetId: subnetId, vnetId: vnetId, createdOn: createdOn, maintenanceBeginOn: maintenanceBeginOn, maintenanceEndOn: maintenanceEndOn, actualUsedDataStorageSizeInTbs: actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs: allocatedStorageSizeInTbs, apexDetails: apexDetails, availableUpgradeVersions: availableUpgradeVersions, connectionStrings: connectionStrings, connectionUrls: connectionUrls, dataSafeStatus: dataSafeStatus, databaseEdition: databaseEdition, autonomousDatabaseId: autonomousDatabaseId, inMemoryAreaInGbs: inMemoryAreaInGbs, nextLongTermBackupCreatedOn: nextLongTermBackupCreatedOn, longTermBackupSchedule: longTermBackupSchedule, isPreview: isPreview, localAdgAutoFailoverMaxDataLossLimit: localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs: memoryPerOracleComputeUnitInGbs, openMode: openMode, operationsInsightsStatus: operationsInsightsStatus, permissionLevel: permissionLevel, privateEndpoint: privateEndpoint, provisionableCpus: provisionableCpus, role: role, serviceConsoleUri: serviceConsoleUri, sqlWebDeveloperUri: sqlWebDeveloperUri, supportedRegionsToCloneTo: supportedRegionsToCloneTo, dataGuardRoleChangedOn: dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn: freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled: timeLocalDataGuardEnabled, lastFailoverHappenedOn: lastFailoverHappenedOn, lastRefreshHappenedOn: lastRefreshHappenedOn, lastRefreshPointTimestamp: lastRefreshPointTimestamp, lastSwitchoverHappenedOn: lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn: freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs: usedDataStorageSizeInGbs, usedDataStorageSizeInTbs: usedDataStorageSizeInTbs, ocid: ocid, backupRetentionPeriodInDays: backupRetentionPeriodInDays, whitelistedIPs: whitelistedIPs); } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs index 3c3676a88ffe..8468bb3a3169 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(string autonomousdbvers } /// - /// List AutonomousDbVersion resources by Location + /// List AutonomousDbVersion resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +158,7 @@ public virtual Response Get(string autonomousdbvers /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati } /// - /// List AutonomousDbVersion resources by Location + /// List AutonomousDbVersion resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string autonomousdbversion /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string autonomousdbversionsname, Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs index 5e9b6ff9a91b..ea1c78d29285 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDBVersionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs index 7949d6bf217b..0b6fdc3e13a0 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Create /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(Wai /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync(s /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string adbbackupid /// /// /// Operation Id - /// AutonomousDatabaseBackups_ListByAutonomousDatabase + /// AutonomousDatabaseBackups_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -264,8 +264,8 @@ public virtual Response Get(string adbbackupid /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseBackupRestClient.CreateListByAutonomousDatabaseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseBackupRestClient.CreateListByAutonomousDatabaseNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseBackupRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseBackupRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseBackupResource(Client, AutonomousDatabaseBackupData.DeserializeAutonomousDatabaseBackupData(e)), _autonomousDatabaseBackupClientDiagnostics, Pipeline, "AutonomousDatabaseBackupCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsync(Cance /// /// /// Operation Id - /// AutonomousDatabaseBackups_ListByAutonomousDatabase + /// AutonomousDatabaseBackups_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAllAsync(Cance /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseBackupRestClient.CreateListByAutonomousDatabaseRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseBackupRestClient.CreateListByAutonomousDatabaseNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _autonomousDatabaseBackupRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _autonomousDatabaseBackupRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new AutonomousDatabaseBackupResource(Client, AutonomousDatabaseBackupData.DeserializeAutonomousDatabaseBackupData(e)), _autonomousDatabaseBackupClientDiagnostics, Pipeline, "AutonomousDatabaseBackupCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(CancellationTok /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string adbbackupid, Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string adbbackupid, CancellationToken cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs index e77c1e4b351d..f731ba2f8811 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseBackupResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(C /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -224,7 +224,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -266,7 +266,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> Update /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs index ed660289b8c4..754248c9fc3c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(string adbsc } /// - /// List AutonomousDatabaseCharacterSet resources by Location + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +158,7 @@ public virtual Response Get(string adbsc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable GetAllAsync } /// - /// List AutonomousDatabaseCharacterSet resources by Location + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string adbscharsetname, Ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string adbscharsetname, CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs index add8b6954302..c5df9095eccc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCharacterSetResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs index b0ad77230b4a..1569287a9cd9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string autonomousdatabas /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Cancellatio /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken can /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string autonomousdatabasen /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string autonomousdatabasename, Cancellation /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExi /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.cs index ebf77ba0b2e7..c2af47340c97 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseData.cs @@ -67,7 +67,7 @@ public AutonomousDatabaseData(AzureLocation location) : base(location) /// /// The resource-specific properties for this resource. /// 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 available derived classes include , , and . /// /// Keeps track of any properties unknown to the library. internal AutonomousDatabaseData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, AutonomousDatabaseBaseProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) @@ -84,7 +84,7 @@ internal AutonomousDatabaseData() /// /// The resource-specific properties for this resource. /// 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 available derived classes include , , and . /// public AutonomousDatabaseBaseProperties Properties { get; set; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs index 971fa09286e7..e8cd7d25fedb 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(stri } /// - /// List AutonomousDatabaseNationalCharacterSet resources by Location + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +158,7 @@ public virtual Response Get(stri /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable Get } /// - /// List AutonomousDatabaseNationalCharacterSet resources by Location + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual AsyncPageable Get /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(C /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string adbsncharsetname, C /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string adbsncharsetname, CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs index b8edaac9c36f..719e9a6b37cc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseNationalCharacterSetResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs index d51866781728..d3139f7e514b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/AutonomousDatabaseResource.cs @@ -110,7 +110,7 @@ public virtual AutonomousDatabaseBackupCollection GetAutonomousDatabaseBackups() /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAutonom /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetAutonomousDatabaseB /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -415,6 +415,98 @@ public virtual ArmOperation Update(WaitUntil waitUnt } } + /// + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration + /// + /// + /// Operation Id + /// AutonomousDatabases_ChangeDisasterRecoveryConfiguration + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ChangeDisasterRecoveryConfigurationAsync(WaitUntil waitUntil, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.ChangeDisasterRecoveryConfiguration"); + scope.Start(); + try + { + var response = await _autonomousDatabaseRestClient.ChangeDisasterRecoveryConfigurationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateChangeDisasterRecoveryConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration + /// + /// + /// Operation Id + /// AutonomousDatabases_ChangeDisasterRecoveryConfiguration + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation ChangeDisasterRecoveryConfiguration(WaitUntil waitUntil, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _autonomousDatabaseClientDiagnostics.CreateScope("AutonomousDatabaseResource.ChangeDisasterRecoveryConfiguration"); + scope.Start(); + try + { + var response = _autonomousDatabaseRestClient.ChangeDisasterRecoveryConfiguration(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + var operation = new OracleDatabaseArmOperation(new AutonomousDatabaseOperationSource(Client), _autonomousDatabaseClientDiagnostics, Pipeline, _autonomousDatabaseRestClient.CreateChangeDisasterRecoveryConfigurationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Perform failover action on Autonomous Database /// @@ -428,7 +520,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -474,7 +566,7 @@ public virtual async Task> FailoverAsyn /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -520,7 +612,7 @@ public virtual ArmOperation Failover(WaitUntil waitU /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -562,7 +654,7 @@ public virtual async Task> GenerateWallet /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -604,7 +696,7 @@ public virtual Response GenerateWallet(GenerateAut /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -650,7 +742,7 @@ public virtual async Task> RestoreAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -696,7 +788,7 @@ public virtual ArmOperation Restore(WaitUntil waitUn /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -738,7 +830,7 @@ public virtual async Task> ShrinkAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -780,7 +872,7 @@ public virtual ArmOperation Shrink(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -826,7 +918,7 @@ public virtual async Task> SwitchoverAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -872,7 +964,7 @@ public virtual ArmOperation Switchover(WaitUntil wai /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -934,7 +1026,7 @@ public virtual async Task> AddTagAsync(stri /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -996,7 +1088,7 @@ public virtual Response AddTag(string key, string va /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1053,7 +1145,7 @@ public virtual async Task> SetTagsAsync(IDi /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1110,7 +1202,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1170,7 +1262,7 @@ public virtual async Task> RemoveTagAsync(s /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs index 7d6c86d2c077..e33300e6b16e 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string cloudexad /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(Can /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationT /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string cloudexadatainfrast /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string cloudexadatainfrastructurename, Canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs index 0ce169064a1c..fb7ffdf8253c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudExadataInfrastructureResource.cs @@ -110,7 +110,7 @@ public virtual OracleDBServerCollection GetOracleDBServers() /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetOracleDBServerAsy /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -172,7 +172,7 @@ public virtual Response GetOracleDBServer(string dbserve /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -294,7 +294,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -336,7 +336,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -382,7 +382,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -428,7 +428,7 @@ public virtual ArmOperation Update(WaitUntil /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -470,7 +470,7 @@ public virtual async Task> AddS /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -512,7 +512,7 @@ public virtual ArmOperation AddStorageCapaci /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -574,7 +574,7 @@ public virtual async Task> AddTagAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -636,7 +636,7 @@ public virtual Response AddTag(string key, s /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -693,7 +693,7 @@ public virtual async Task> SetTagsA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -750,7 +750,7 @@ public virtual Response SetTags(IDictionary< /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -810,7 +810,7 @@ public virtual async Task> RemoveTa /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs index 8a45baad9fe4..2a1227854a69 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil wai /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string clou /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string cloudvmclustername, C /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -283,7 +283,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -313,7 +313,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual async Task> ExistsAsync(string cloudvmclustername, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -399,7 +399,7 @@ public virtual Response Exists(string cloudvmclustername, CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -444,7 +444,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs index 59721ec74eff..2c4121d4efa7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -150,11 +150,11 @@ public virtual Response Get(string dbnodeocid, Can /// /// /// Operation Id - /// DbNodes_ListByCloudVmCluster + /// DbNodes_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -166,8 +166,8 @@ public virtual Response Get(string dbnodeocid, Can /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByCloudVmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByCloudVmClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterDBNodeResource(Client, CloudVmClusterDBNodeData.DeserializeCloudVmClusterDBNodeData(e)), _cloudVmClusterDBNodeDBNodesClientDiagnostics, Pipeline, "CloudVmClusterDBNodeCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -180,11 +180,11 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Operation Id - /// DbNodes_ListByCloudVmCluster + /// DbNodes_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -196,8 +196,8 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByCloudVmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByCloudVmClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterDBNodeDBNodesRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterDBNodeResource(Client, CloudVmClusterDBNodeData.DeserializeCloudVmClusterDBNodeData(e)), _cloudVmClusterDBNodeDBNodesClientDiagnostics, Pipeline, "CloudVmClusterDBNodeCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string dbnodeocid, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string dbnodeocid, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs index 8e002b047058..20c0e6644358 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterDBNodeResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> ActionAsyn /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs index 301353267a10..11bf1367f948 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterResource.cs @@ -111,7 +111,7 @@ public virtual CloudVmClusterDBNodeCollection GetCloudVmClusterDBNodes() /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetCloudVmClus /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual CloudVmClusterVirtualNetworkAddressCollection GetCloudVmClusterVi /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -242,7 +242,7 @@ public virtual Response GetCloudVmC /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -282,7 +282,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -322,7 +322,7 @@ public virtual Response Get(CancellationToken cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -364,7 +364,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -406,7 +406,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -452,7 +452,7 @@ public virtual async Task> UpdateAsync(Wait /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -498,7 +498,7 @@ public virtual ArmOperation Update(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -544,7 +544,7 @@ public virtual async Task> AddVmsAsync(Wait /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -590,7 +590,7 @@ public virtual ArmOperation AddVms(WaitUntil waitUntil, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -623,7 +623,7 @@ public virtual AsyncPageable GetPrivateIPAddressesAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -656,7 +656,7 @@ public virtual Pageable GetPrivateIPAddresses(PrivateIPA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -702,7 +702,7 @@ public virtual async Task> RemoveVmsAsync(W /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -748,7 +748,7 @@ public virtual ArmOperation RemoveVms(WaitUntil waitUnti /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -810,7 +810,7 @@ public virtual async Task> AddTagAsync(string k /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -872,7 +872,7 @@ public virtual Response AddTag(string key, string value, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -929,7 +929,7 @@ public virtual async Task> SetTagsAsync(IDictio /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -986,7 +986,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1046,7 +1046,7 @@ public virtual async Task> RemoveTagAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs index 7e1323b0b949..01b0328861ac 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string /// /// /// Operation Id - /// VirtualNetworkAddresses_ListByCloudVmCluster + /// VirtualNetworkAddresses_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -264,8 +264,8 @@ public virtual Response Get(string /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByCloudVmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByCloudVmClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterVirtualNetworkAddressResource(Client, CloudVmClusterVirtualNetworkAddressData.DeserializeCloudVmClusterVirtualNetworkAddressData(e)), _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesClientDiagnostics, Pipeline, "CloudVmClusterVirtualNetworkAddressCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAll /// /// /// Operation Id - /// VirtualNetworkAddresses_ListByCloudVmCluster + /// VirtualNetworkAddresses_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -294,8 +294,8 @@ public virtual AsyncPageable GetAll /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByCloudVmClusterRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByCloudVmClusterNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterVirtualNetworkAddressResource(Client, CloudVmClusterVirtualNetworkAddressData.DeserializeCloudVmClusterVirtualNetworkAddressData(e)), _cloudVmClusterVirtualNetworkAddressVirtualNetworkAddressesClientDiagnostics, Pipeline, "CloudVmClusterVirtualNetworkAddressCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -312,7 +312,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -355,7 +355,7 @@ public virtual async Task> ExistsAsync(string virtualnetworkaddre /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -398,7 +398,7 @@ public virtual Response Exists(string virtualnetworkaddressname, Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -443,7 +443,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs index 467045fe9607..03e79ad1efa6 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/CloudVmClusterVirtualNetworkAddressResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -223,7 +223,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -265,7 +265,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -311,7 +311,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterCollection.cs new file mode 100644 index 000000000000..9476ab8fcbf7 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterCollection.cs @@ -0,0 +1,494 @@ +// 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; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// 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 GetExadbVmClusters method from an instance of . + /// + public partial class ExadbVmClusterCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _exadbVmClusterClientDiagnostics; + private readonly ExadbVmClustersRestOperations _exadbVmClusterRestClient; + + /// Initializes a new instance of the class for mocking. + protected ExadbVmClusterCollection() + { + } + + /// 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 ExadbVmClusterCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exadbVmClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExadbVmClusterResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ExadbVmClusterResource.ResourceType, out string exadbVmClusterApiVersion); + _exadbVmClusterRestClient = new ExadbVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exadbVmClusterApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 name of the ExadbVmCluster. + /// 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 exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, 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 ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_CreateOrUpdate + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 name of the ExadbVmCluster. + /// 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 exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Get"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Get"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ExadbVmCluster resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmClusters_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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) => _exadbVmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exadbVmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), _exadbVmClusterClientDiagnostics, Pipeline, "ExadbVmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ExadbVmCluster resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmClusters_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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) => _exadbVmClusterRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exadbVmClusterRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), _exadbVmClusterClientDiagnostics, Pipeline, "ExadbVmClusterCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Exists"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, 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/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.Exists"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, 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/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterCollection.GetIfExists"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exadbVmClusterName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.Serialization.cs new file mode 100644 index 000000000000..b29d283fb2bf --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.Serialization.cs @@ -0,0 +1,204 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExadbVmClusterData : 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(ExadbVmClusterData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ExadbVmClusterData 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(ExadbVmClusterData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterData(document.RootElement, options); + } + + internal static ExadbVmClusterData DeserializeExadbVmClusterData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExadbVmClusterProperties properties = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = 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 = ExadbVmClusterProperties.DeserializeExadbVmClusterProperties(property.Value, options); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"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()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + 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 ExadbVmClusterData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + zones ?? 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterData)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterData 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 DeserializeExadbVmClusterData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.cs new file mode 100644 index 000000000000..7d9b7d350b23 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterData.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; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the ExadbVmCluster data model. + /// ExadbVmCluster resource definition + /// + public partial class ExadbVmClusterData : TrackedResourceData + { + /// + /// 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 location. + public ExadbVmClusterData(AzureLocation location) : base(location) + { + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExadbVmClusterProperties properties, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterData() + { + } + + /// The resource-specific properties for this resource. + public ExadbVmClusterProperties Properties { get; set; } + /// The availability zones. + public IList Zones { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.Serialization.cs new file mode 100644 index 000000000000..b83dc4172d2e --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.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.OracleDatabase +{ + public partial class ExadbVmClusterResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ExadbVmClusterData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); + + ExadbVmClusterData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.cs new file mode 100644 index 000000000000..ac7e20b166f5 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExadbVmClusterResource.cs @@ -0,0 +1,868 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an ExadbVmCluster 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 GetExadbVmClusterResource method. + /// Otherwise you can get one from its parent resource using the GetExadbVmCluster method. + /// + public partial class ExadbVmClusterResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The exadbVmClusterName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _exadbVmClusterClientDiagnostics; + private readonly ExadbVmClustersRestOperations _exadbVmClusterRestClient; + private readonly ExadbVmClusterData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/exadbVmClusters"; + + /// Initializes a new instance of the class for mocking. + protected ExadbVmClusterResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ExadbVmClusterResource(ArmClient client, ExadbVmClusterData 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 ExadbVmClusterResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exadbVmClusterClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string exadbVmClusterApiVersion); + _exadbVmClusterRestClient = new ExadbVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exadbVmClusterApiVersion); +#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 ExadbVmClusterData 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 ExascaleDBNodeResources in the ExadbVmCluster. + /// An object representing collection of ExascaleDBNodeResources and their operations over a ExascaleDBNodeResource. + public virtual ExascaleDBNodeCollection GetExascaleDBNodes() + { + return GetCachedClient(client => new ExascaleDBNodeCollection(client, Id)); + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetExascaleDBNodeAsync(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + return await GetExascaleDBNodes().GetAsync(exascaleDBNodeName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetExascaleDBNode(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + return GetExascaleDBNodes().Get(exascaleDBNodeName, cancellationToken); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Get"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Get"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExadbVmClusterResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Delete"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, 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 ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Delete"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Update"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.Update"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove VMs from the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms + /// + /// + /// Operation Id + /// ExadbVmClusters_RemoveVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveVmsAsync(WaitUntil waitUntil, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveVms"); + scope.Start(); + try + { + var response = await _exadbVmClusterRestClient.RemoveVmsAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateRemoveVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Remove VMs from the VM Cluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms + /// + /// + /// Operation Id + /// ExadbVmClusters_RemoveVms + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation RemoveVms(WaitUntil waitUntil, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(details, nameof(details)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveVms"); + scope.Start(); + try + { + var response = _exadbVmClusterRestClient.RemoveVms(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExadbVmClusterOperationSource(Client), _exadbVmClusterClientDiagnostics, Pipeline, _exadbVmClusterRestClient.CreateRemoveVmsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, details).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExadbVmClusterPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExadbVmClusterPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exadbVmClusterRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exadbVmClusterClientDiagnostics.CreateScope("ExadbVmClusterResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exadbVmClusterRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExadbVmClusterResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExadbVmClusterPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeCollection.cs new file mode 100644 index 000000000000..4ced75872925 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeCollection.cs @@ -0,0 +1,395 @@ +// 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.OracleDatabase +{ + /// + /// 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 GetExascaleDBNodes method from an instance of . + /// + public partial class ExascaleDBNodeCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _exascaleDBNodeExascaleDBNodesClientDiagnostics; + private readonly ExascaleDbNodesRestOperations _exascaleDBNodeExascaleDBNodesRestClient; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDBNodeCollection() + { + } + + /// 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 ExascaleDBNodeCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDBNodeExascaleDBNodesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExascaleDBNodeResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ExascaleDBNodeResource.ResourceType, out string exascaleDBNodeExascaleDBNodesApiVersion); + _exascaleDBNodeExascaleDBNodesRestClient = new ExascaleDbNodesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDBNodeExascaleDBNodesApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ExadbVmClusterResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ExadbVmClusterResource.ResourceType), nameof(id)); + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeCollection.Get"); + scope.Start(); + try + { + var response = await _exascaleDBNodeExascaleDBNodesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDBNodeName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeCollection.Get"); + scope.Start(); + try + { + var response = _exascaleDBNodeExascaleDBNodesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDBNodeName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ExascaleDbNode resources by ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes + /// + /// + /// Operation Id + /// ExascaleDbNodes_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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) => _exascaleDBNodeExascaleDBNodesRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDBNodeExascaleDBNodesRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExascaleDBNodeResource(Client, ExascaleDBNodeData.DeserializeExascaleDBNodeData(e)), _exascaleDBNodeExascaleDBNodesClientDiagnostics, Pipeline, "ExascaleDBNodeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbNode resources by ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes + /// + /// + /// Operation Id + /// ExascaleDbNodes_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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) => _exascaleDBNodeExascaleDBNodesRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDBNodeExascaleDBNodesRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExascaleDBNodeResource(Client, ExascaleDBNodeData.DeserializeExascaleDBNodeData(e)), _exascaleDBNodeExascaleDBNodesClientDiagnostics, Pipeline, "ExascaleDBNodeCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeCollection.Exists"); + scope.Start(); + try + { + var response = await _exascaleDBNodeExascaleDBNodesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDBNodeName, 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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeCollection.Exists"); + scope.Start(); + try + { + var response = _exascaleDBNodeExascaleDBNodesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDBNodeName, 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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _exascaleDBNodeExascaleDBNodesRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDBNodeName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBNodeResource(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/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbNode. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeCollection.GetIfExists"); + scope.Start(); + try + { + var response = _exascaleDBNodeExascaleDBNodesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, exascaleDBNodeName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBNodeResource(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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeData.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeData.Serialization.cs new file mode 100644 index 000000000000..daf74abbaae2 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExascaleDBNodeData : 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(ExascaleDBNodeData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + ExascaleDBNodeData 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(ExascaleDBNodeData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBNodeData(document.RootElement, options); + } + + internal static ExascaleDBNodeData DeserializeExascaleDBNodeData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExascaleDBNodeProperties properties = 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 = ExascaleDBNodeProperties.DeserializeExascaleDBNodeProperties(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 ExascaleDBNodeData( + id, + name, + type, + systemData, + properties, + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBNodeData)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBNodeData 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 DeserializeExascaleDBNodeData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBNodeData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeData.cs new file mode 100644 index 000000000000..674985518d26 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeData.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; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the ExascaleDBNode data model. + /// The DbNode resource belonging to ExadbVmCluster + /// + public partial class ExascaleDBNodeData : 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 ExascaleDBNodeData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBNodeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ExascaleDBNodeProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public ExascaleDBNodeProperties Properties { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeResource.Serialization.cs new file mode 100644 index 000000000000..b7f8a794267e --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeResource.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.OracleDatabase +{ + public partial class ExascaleDBNodeResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ExascaleDBNodeData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); + + ExascaleDBNodeData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeResource.cs new file mode 100644 index 000000000000..28ce67286da6 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBNodeResource.cs @@ -0,0 +1,264 @@ +// 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; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an ExascaleDBNode 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 GetExascaleDBNodeResource method. + /// Otherwise you can get one from its parent resource using the GetExascaleDBNode method. + /// + public partial class ExascaleDBNodeResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The exadbVmClusterName. + /// The exascaleDBNodeName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDBNodeName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDBNodeName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _exascaleDBNodeExascaleDBNodesClientDiagnostics; + private readonly ExascaleDbNodesRestOperations _exascaleDBNodeExascaleDBNodesRestClient; + private readonly ExascaleDBNodeData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/exadbVmClusters/dbNodes"; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDBNodeResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ExascaleDBNodeResource(ArmClient client, ExascaleDBNodeData 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 ExascaleDBNodeResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDBNodeExascaleDBNodesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string exascaleDBNodeExascaleDBNodesApiVersion); + _exascaleDBNodeExascaleDBNodesRestClient = new ExascaleDbNodesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDBNodeExascaleDBNodesApiVersion); +#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 ExascaleDBNodeData 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 ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeResource.Get"); + scope.Start(); + try + { + var response = await _exascaleDBNodeExascaleDBNodesRestClient.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 ExascaleDBNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbNode + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName} + /// + /// + /// Operation Id + /// ExascaleDbNodes_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeResource.Get"); + scope.Start(); + try + { + var response = _exascaleDBNodeExascaleDBNodesRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBNodeResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action + /// + /// + /// Operation Id + /// ExascaleDbNodes_Action + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task> ActionAsync(WaitUntil waitUntil, DBNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeResource.Action"); + scope.Start(); + try + { + var response = await _exascaleDBNodeExascaleDBNodesRestClient.ActionAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new DBActionResponseOperationSource(), _exascaleDBNodeExascaleDBNodesClientDiagnostics, Pipeline, _exascaleDBNodeExascaleDBNodesRestClient.CreateActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action + /// + /// + /// Operation Id + /// ExascaleDbNodes_Action + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Action(WaitUntil waitUntil, DBNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _exascaleDBNodeExascaleDBNodesClientDiagnostics.CreateScope("ExascaleDBNodeResource.Action"); + scope.Start(); + try + { + var response = _exascaleDBNodeExascaleDBNodesRestClient.Action(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(new DBActionResponseOperationSource(), _exascaleDBNodeExascaleDBNodesClientDiagnostics, Pipeline, _exascaleDBNodeExascaleDBNodesRestClient.CreateActionRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultCollection.cs new file mode 100644 index 000000000000..84e5f297ee3c --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultCollection.cs @@ -0,0 +1,494 @@ +// 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; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// 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 GetExascaleDBStorageVaults method from an instance of . + /// + public partial class ExascaleDBStorageVaultCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics; + private readonly ExascaleDbStorageVaultsRestOperations _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDBStorageVaultCollection() + { + } + + /// 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 ExascaleDBStorageVaultCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExascaleDBStorageVaultResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ExascaleDBStorageVaultResource.ResourceType, out string exascaleDBStorageVaultExascaleDBStorageVaultsApiVersion); + _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient = new ExascaleDbStorageVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDBStorageVaultExascaleDBStorageVaultsApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceGroupResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); + } + + /// + /// Create a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Create + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 name of the ExascaleDbStorageVault. + /// 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 exascaleDBStorageVaultName, ExascaleDBStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, data, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExascaleDBStorageVaultOperationSource(Client), _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, 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 ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Create + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 name of the ExascaleDbStorageVault. + /// 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 exascaleDBStorageVaultName, ExascaleDBStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Create(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, data, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExascaleDBStorageVaultOperationSource(Client), _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateCreateRequest(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, data).Request, response, OperationFinalStateVia.AzureAsyncOperation); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.Get"); + scope.Start(); + try + { + var response = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.Get"); + scope.Start(); + try + { + var response = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List ExascaleDbStorageVault resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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) => _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExascaleDBStorageVaultResource(Client, ExascaleDBStorageVaultData.DeserializeExascaleDBStorageVaultData(e)), _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, "ExascaleDBStorageVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by resource group + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_ListByResourceGroup + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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) => _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExascaleDBStorageVaultResource(Client, ExascaleDBStorageVaultData.DeserializeExascaleDBStorageVaultData(e)), _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, "ExascaleDBStorageVaultCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.Exists"); + scope.Start(); + try + { + var response = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, 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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.Exists"); + scope.Start(); + try + { + var response = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, 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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBStorageVaultResource(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/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultCollection.GetIfExists"); + scope.Start(); + try + { + var response = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, exascaleDBStorageVaultName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBStorageVaultResource(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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultData.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultData.Serialization.cs new file mode 100644 index 000000000000..ce5ec1b38ac7 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultData.Serialization.cs @@ -0,0 +1,204 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class ExascaleDBStorageVaultData : 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(ExascaleDBStorageVaultData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ExascaleDBStorageVaultData 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(ExascaleDBStorageVaultData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBStorageVaultData(document.RootElement, options); + } + + internal static ExascaleDBStorageVaultData DeserializeExascaleDBStorageVaultData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ExascaleDBStorageVaultProperties properties = default; + IList zones = default; + IDictionary tags = default; + AzureLocation location = 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 = ExascaleDBStorageVaultProperties.DeserializeExascaleDBStorageVaultProperties(property.Value, options); + continue; + } + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"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()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("location"u8)) + { + location = new AzureLocation(property.Value.GetString()); + 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 ExascaleDBStorageVaultData( + id, + name, + type, + systemData, + tags ?? new ChangeTrackingDictionary(), + location, + properties, + zones ?? 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultData)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBStorageVaultData 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 DeserializeExascaleDBStorageVaultData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultData.cs new file mode 100644 index 000000000000..549721747266 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultData.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; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the ExascaleDBStorageVault data model. + /// ExascaleDbStorageVault resource definition + /// + public partial class ExascaleDBStorageVaultData : TrackedResourceData + { + /// + /// 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 location. + public ExascaleDBStorageVaultData(AzureLocation location) : base(location) + { + Zones = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The tags. + /// The location. + /// The resource-specific properties for this resource. + /// The availability zones. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBStorageVaultData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ExascaleDBStorageVaultProperties properties, IList zones, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + { + Properties = properties; + Zones = zones; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDBStorageVaultData() + { + } + + /// The resource-specific properties for this resource. + public ExascaleDBStorageVaultProperties Properties { get; set; } + /// The availability zones. + public IList Zones { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultResource.Serialization.cs new file mode 100644 index 000000000000..a282070a7ea8 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultResource.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.OracleDatabase +{ + public partial class ExascaleDBStorageVaultResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + ExascaleDBStorageVaultData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); + + ExascaleDBStorageVaultData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultResource.cs new file mode 100644 index 000000000000..ea1bd4d6b210 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/ExascaleDBStorageVaultResource.cs @@ -0,0 +1,707 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing an ExascaleDBStorageVault 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 GetExascaleDBStorageVaultResource method. + /// Otherwise you can get one from its parent resource using the GetExascaleDBStorageVault method. + /// + public partial class ExascaleDBStorageVaultResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The exascaleDBStorageVaultName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDBStorageVaultName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics; + private readonly ExascaleDbStorageVaultsRestOperations _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient; + private readonly ExascaleDBStorageVaultData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/exascaleDbStorageVaults"; + + /// Initializes a new instance of the class for mocking. + protected ExascaleDBStorageVaultResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal ExascaleDBStorageVaultResource(ArmClient client, ExascaleDBStorageVaultData 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 ExascaleDBStorageVaultResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string exascaleDBStorageVaultExascaleDBStorageVaultsApiVersion); + _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient = new ExascaleDbStorageVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, exascaleDBStorageVaultExascaleDBStorageVaultsApiVersion); +#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 ExascaleDBStorageVaultData 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 ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.Get"); + scope.Start(); + try + { + var response = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.Get"); + scope.Start(); + try + { + var response = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.Delete"); + scope.Start(); + try + { + var response = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, 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 ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Delete + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.Delete"); + scope.Start(); + try + { + var response = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new OracleDatabaseArmOperation(_exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateDeleteRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(WaitUntil waitUntil, ExascaleDBStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.Update"); + scope.Start(); + try + { + var response = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(new ExascaleDBStorageVaultOperationSource(Client), _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Update + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 resource properties to be updated. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Update(WaitUntil waitUntil, ExascaleDBStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(patch, nameof(patch)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.Update"); + scope.Start(); + try + { + var response = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch, cancellationToken); + var operation = new OracleDatabaseArmOperation(new ExascaleDBStorageVaultOperationSource(Client), _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics, Pipeline, _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.CreateUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, patch).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExascaleDBStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExascaleDBStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExascaleDBStorageVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExascaleDBStorageVaultPatch(); + patch.Tags.ReplaceWith(tags); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new ExascaleDBStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(WaitUntil.Completed, patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics.CreateScope("ExascaleDBStorageVaultResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new ExascaleDBStorageVaultResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new ExascaleDBStorageVaultPatch(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(WaitUntil.Completed, patch, cancellationToken: cancellationToken); + return Response.FromValue(result.Value, result.GetRawResponse()); + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseArmClient.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseArmClient.cs index 4a867265ef0a..9ad4b317e924 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseArmClient.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseArmClient.cs @@ -70,6 +70,30 @@ public virtual CloudVmClusterResource GetCloudVmClusterResource(ResourceIdentifi return new CloudVmClusterResource(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 ExadbVmClusterResource GetExadbVmClusterResource(ResourceIdentifier id) + { + ExadbVmClusterResource.ValidateResourceId(id); + return new ExadbVmClusterResource(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 ExascaleDBStorageVaultResource GetExascaleDBStorageVaultResource(ResourceIdentifier id) + { + ExascaleDBStorageVaultResource.ValidateResourceId(id); + return new ExascaleDBStorageVaultResource(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. @@ -142,6 +166,18 @@ public virtual OracleDnsPrivateZoneResource GetOracleDnsPrivateZoneResource(Reso return new OracleDnsPrivateZoneResource(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 FlexComponentResource GetFlexComponentResource(ResourceIdentifier id) + { + FlexComponentResource.ValidateResourceId(id); + return new FlexComponentResource(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. @@ -154,6 +190,18 @@ public virtual OracleGIVersionResource GetOracleGIVersionResource(ResourceIdenti return new OracleGIVersionResource(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 GiMinorVersionResource GetGiMinorVersionResource(ResourceIdentifier id) + { + GiMinorVersionResource.ValidateResourceId(id); + return new GiMinorVersionResource(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. @@ -225,5 +273,17 @@ public virtual CloudVmClusterVirtualNetworkAddressResource GetCloudVmClusterVirt CloudVmClusterVirtualNetworkAddressResource.ValidateResourceId(id); return new CloudVmClusterVirtualNetworkAddressResource(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 ExascaleDBNodeResource GetExascaleDBNodeResource(ResourceIdentifier id) + { + ExascaleDBNodeResource.ValidateResourceId(id); + return new ExascaleDBNodeResource(Client, id); + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs index b04720fb1980..f6fd3404a200 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual AutonomousDatabaseCollection GetAutonomousDatabases() /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetAutonomousDat /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -122,7 +122,7 @@ public virtual CloudExadataInfrastructureCollection GetCloudExadataInfrastructur /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -153,7 +153,7 @@ public virtual async Task> GetCloud /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -191,7 +191,7 @@ public virtual CloudVmClusterCollection GetCloudVmClusters() /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task> GetCloudVmClusterAsy /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -239,5 +239,143 @@ public virtual Response GetCloudVmCluster(string cloudvm { return GetCloudVmClusters().Get(cloudvmclustername, cancellationToken); } + + /// Gets a collection of ExadbVmClusterResources in the ResourceGroupResource. + /// An object representing collection of ExadbVmClusterResources and their operations over a ExadbVmClusterResource. + public virtual ExadbVmClusterCollection GetExadbVmClusters() + { + return GetCachedClient(client => new ExadbVmClusterCollection(client, Id)); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetExadbVmClusterAsync(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + return await GetExadbVmClusters().GetAsync(exadbVmClusterName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetExadbVmCluster(string exadbVmClusterName, CancellationToken cancellationToken = default) + { + return GetExadbVmClusters().Get(exadbVmClusterName, cancellationToken); + } + + /// Gets a collection of ExascaleDBStorageVaultResources in the ResourceGroupResource. + /// An object representing collection of ExascaleDBStorageVaultResources and their operations over a ExascaleDBStorageVaultResource. + public virtual ExascaleDBStorageVaultCollection GetExascaleDBStorageVaults() + { + return GetCachedClient(client => new ExascaleDBStorageVaultCollection(client, Id)); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetExascaleDBStorageVaultAsync(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + return await GetExascaleDBStorageVaults().GetAsync(exascaleDBStorageVaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetExascaleDBStorageVault(string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + return GetExascaleDBStorageVaults().Get(exascaleDBStorageVaultName, cancellationToken); + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs index 0b4249a63a43..f945a5100552 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/MockableOracleDatabaseSubscriptionResource.cs @@ -23,6 +23,10 @@ public partial class MockableOracleDatabaseSubscriptionResource : ArmResource private CloudExadataInfrastructuresRestOperations _cloudExadataInfrastructureRestClient; private ClientDiagnostics _cloudVmClusterClientDiagnostics; private CloudVmClustersRestOperations _cloudVmClusterRestClient; + private ClientDiagnostics _exadbVmClusterClientDiagnostics; + private ExadbVmClustersRestOperations _exadbVmClusterRestClient; + private ClientDiagnostics _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics; + private ExascaleDbStorageVaultsRestOperations _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient; /// Initializes a new instance of the class for mocking. protected MockableOracleDatabaseSubscriptionResource() @@ -42,6 +46,10 @@ internal MockableOracleDatabaseSubscriptionResource(ArmClient client, ResourceId private CloudExadataInfrastructuresRestOperations CloudExadataInfrastructureRestClient => _cloudExadataInfrastructureRestClient ??= new CloudExadataInfrastructuresRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CloudExadataInfrastructureResource.ResourceType)); private ClientDiagnostics CloudVmClusterClientDiagnostics => _cloudVmClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", CloudVmClusterResource.ResourceType.Namespace, Diagnostics); private CloudVmClustersRestOperations CloudVmClusterRestClient => _cloudVmClusterRestClient ??= new CloudVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(CloudVmClusterResource.ResourceType)); + private ClientDiagnostics ExadbVmClusterClientDiagnostics => _exadbVmClusterClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExadbVmClusterResource.ResourceType.Namespace, Diagnostics); + private ExadbVmClustersRestOperations ExadbVmClusterRestClient => _exadbVmClusterRestClient ??= new ExadbVmClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ExadbVmClusterResource.ResourceType)); + private ClientDiagnostics ExascaleDBStorageVaultExascaleDbStorageVaultsClientDiagnostics => _exascaleDBStorageVaultExascaleDBStorageVaultsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ExascaleDBStorageVaultResource.ResourceType.Namespace, Diagnostics); + private ExascaleDbStorageVaultsRestOperations ExascaleDBStorageVaultExascaleDbStorageVaultsRestClient => _exascaleDBStorageVaultExascaleDBStorageVaultsRestClient ??= new ExascaleDbStorageVaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ExascaleDBStorageVaultResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -70,7 +78,7 @@ public virtual AutonomousDatabaseCharacterSetCollection GetAutonomousDatabaseCha /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -102,7 +110,7 @@ public virtual async Task> GetA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -142,7 +150,7 @@ public virtual AutonomousDatabaseNationalCharacterSetCollection GetAutonomousDat /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -174,7 +182,7 @@ public virtual async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -214,7 +222,7 @@ public virtual AutonomousDBVersionCollection GetAutonomousDBVersions(AzureLocati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -246,7 +254,7 @@ public virtual async Task> GetAutonomousDB /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -286,7 +294,7 @@ public virtual OracleDBSystemShapeCollection GetOracleDBSystemShapes(AzureLocati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -318,7 +326,7 @@ public virtual async Task> GetOracleDBSyst /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -358,7 +366,7 @@ public virtual OracleDnsPrivateViewCollection GetOracleDnsPrivateViews(AzureLoca /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -390,7 +398,7 @@ public virtual async Task> GetOracleDnsPr /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -430,7 +438,7 @@ public virtual OracleDnsPrivateZoneCollection GetOracleDnsPrivateZones(AzureLoca /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -462,7 +470,7 @@ public virtual async Task> GetOracleDnsPr /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -481,6 +489,78 @@ public virtual Response GetOracleDnsPrivateZone(Az return GetOracleDnsPrivateZones(location).Get(dnsprivatezonename, cancellationToken); } + /// Gets a collection of FlexComponentResources in the SubscriptionResource. + /// The name of the Azure region. + /// An object representing collection of FlexComponentResources and their operations over a FlexComponentResource. + public virtual FlexComponentCollection GetFlexComponents(AzureLocation location) + { + return new FlexComponentCollection(Client, Id, location); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetFlexComponentAsync(AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + return await GetFlexComponents(location).GetAsync(flexComponentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetFlexComponent(AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + return GetFlexComponents(location).Get(flexComponentName, cancellationToken); + } + /// Gets a collection of OracleGIVersionResources in the SubscriptionResource. /// The name of the Azure region. /// An object representing collection of OracleGIVersionResources and their operations over a OracleGIVersionResource. @@ -502,7 +582,7 @@ public virtual OracleGIVersionCollection GetOracleGIVersions(AzureLocation locat /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -534,7 +614,7 @@ public virtual async Task> GetOracleGIVersionA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -574,7 +654,7 @@ public virtual OracleSystemVersionCollection GetOracleSystemVersions(AzureLocati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -606,7 +686,7 @@ public virtual async Task> GetOracleSystem /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -645,7 +725,7 @@ public virtual OracleSubscriptionResource GetOracleSubscription() /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -675,7 +755,7 @@ public virtual AsyncPageable GetAutonomousDatabasesA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -705,7 +785,7 @@ public virtual Pageable GetAutonomousDatabases(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -735,7 +815,7 @@ public virtual AsyncPageable GetCloudExadata /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -765,7 +845,7 @@ public virtual Pageable GetCloudExadataInfra /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -795,7 +875,7 @@ public virtual AsyncPageable GetCloudVmClustersAsync(Can /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -811,5 +891,125 @@ public virtual Pageable GetCloudVmClusters(CancellationT HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CloudVmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new CloudVmClusterResource(Client, CloudVmClusterData.DeserializeCloudVmClusterData(e)), CloudVmClusterClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetCloudVmClusters", "value", "nextLink", cancellationToken); } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmClusters_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExadbVmClustersAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExadbVmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExadbVmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), ExadbVmClusterClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExadbVmClusters", "value", "nextLink", cancellationToken); + } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmClusters_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExadbVmClusters(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExadbVmClusterRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExadbVmClusterRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExadbVmClusterResource(Client, ExadbVmClusterData.DeserializeExadbVmClusterData(e)), ExadbVmClusterClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExadbVmClusters", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetExascaleDBStorageVaultsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExascaleDBStorageVaultExascaleDbStorageVaultsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExascaleDBStorageVaultExascaleDbStorageVaultsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ExascaleDBStorageVaultResource(Client, ExascaleDBStorageVaultData.DeserializeExascaleDBStorageVaultData(e)), ExascaleDBStorageVaultExascaleDbStorageVaultsClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExascaleDBStorageVaults", "value", "nextLink", cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetExascaleDBStorageVaults(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => ExascaleDBStorageVaultExascaleDbStorageVaultsRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ExascaleDBStorageVaultExascaleDbStorageVaultsRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ExascaleDBStorageVaultResource(Client, ExascaleDBStorageVaultData.DeserializeExascaleDBStorageVaultData(e)), ExascaleDBStorageVaultExascaleDbStorageVaultsClientDiagnostics, Pipeline, "MockableOracleDatabaseSubscriptionResource.GetExascaleDBStorageVaults", "value", "nextLink", cancellationToken); + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs index cf143a951a26..01e17de679ab 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Extensions/OracleDatabaseExtensions.cs @@ -89,6 +89,44 @@ public static CloudVmClusterResource GetCloudVmClusterResource(this ArmClient cl return GetMockableOracleDatabaseArmClient(client).GetCloudVmClusterResource(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 ExadbVmClusterResource GetExadbVmClusterResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetExadbVmClusterResource(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 ExascaleDBStorageVaultResource GetExascaleDBStorageVaultResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetExascaleDBStorageVaultResource(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. @@ -203,6 +241,25 @@ public static OracleDnsPrivateZoneResource GetOracleDnsPrivateZoneResource(this return GetMockableOracleDatabaseArmClient(client).GetOracleDnsPrivateZoneResource(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 FlexComponentResource GetFlexComponentResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetFlexComponentResource(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. @@ -222,6 +279,25 @@ public static OracleGIVersionResource GetOracleGIVersionResource(this ArmClient return GetMockableOracleDatabaseArmClient(client).GetOracleGIVersionResource(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 GiMinorVersionResource GetGiMinorVersionResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetGiMinorVersionResource(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. @@ -336,6 +412,25 @@ public static CloudVmClusterVirtualNetworkAddressResource GetCloudVmClusterVirtu return GetMockableOracleDatabaseArmClient(client).GetCloudVmClusterVirtualNetworkAddressResource(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 ExascaleDBNodeResource GetExascaleDBNodeResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableOracleDatabaseArmClient(client).GetExascaleDBNodeResource(id); + } + /// /// Gets a collection of AutonomousDatabaseResources in the ResourceGroupResource. /// @@ -366,7 +461,7 @@ public static AutonomousDatabaseCollection GetAutonomousDatabases(this ResourceG /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -404,7 +499,7 @@ public static async Task> GetAutonomousData /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -459,7 +554,7 @@ public static CloudExadataInfrastructureCollection GetCloudExadataInfrastructure /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -497,7 +592,7 @@ public static async Task> GetCloudE /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -552,7 +647,7 @@ public static CloudVmClusterCollection GetCloudVmClusters(this ResourceGroupReso /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -590,7 +685,7 @@ public static async Task> GetCloudVmClusterAsyn /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -615,6 +710,192 @@ public static Response GetCloudVmCluster(this ResourceGr return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetCloudVmCluster(cloudvmclustername, cancellationToken); } + /// + /// Gets a collection of ExadbVmClusterResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ExadbVmClusterResources and their operations over a ExadbVmClusterResource. + public static ExadbVmClusterCollection GetExadbVmClusters(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExadbVmClusters(); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetExadbVmClusterAsync(this ResourceGroupResource resourceGroupResource, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExadbVmClusterAsync(exadbVmClusterName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExadbVmCluster + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName} + /// + /// + /// Operation Id + /// ExadbVmClusters_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetExadbVmCluster(this ResourceGroupResource resourceGroupResource, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExadbVmCluster(exadbVmClusterName, cancellationToken); + } + + /// + /// Gets a collection of ExascaleDBStorageVaultResources in the ResourceGroupResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// is null. + /// An object representing collection of ExascaleDBStorageVaultResources and their operations over a ExascaleDBStorageVaultResource. + public static ExascaleDBStorageVaultCollection GetExascaleDBStorageVaults(this ResourceGroupResource resourceGroupResource) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExascaleDBStorageVaults(); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetExascaleDBStorageVaultAsync(this ResourceGroupResource resourceGroupResource, string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return await GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExascaleDBStorageVaultAsync(exascaleDBStorageVaultName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a ExascaleDbStorageVault + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName} + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the ExascaleDbStorageVault. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetExascaleDBStorageVault(this ResourceGroupResource resourceGroupResource, string exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); + + return GetMockableOracleDatabaseResourceGroupResource(resourceGroupResource).GetExascaleDBStorageVault(exascaleDBStorageVaultName, cancellationToken); + } + /// /// Gets a collection of AutonomousDatabaseCharacterSetResources in the SubscriptionResource. /// @@ -646,7 +927,7 @@ public static AutonomousDatabaseCharacterSetCollection GetAutonomousDatabaseChar /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -685,7 +966,7 @@ public static async Task> GetAu /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -742,7 +1023,7 @@ public static AutonomousDatabaseNationalCharacterSetCollection GetAutonomousData /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -781,7 +1062,7 @@ public static async Task /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -838,7 +1119,7 @@ public static AutonomousDBVersionCollection GetAutonomousDBVersions(this Subscri /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -877,7 +1158,7 @@ public static async Task> GetAutonomousDBV /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -934,7 +1215,7 @@ public static OracleDBSystemShapeCollection GetOracleDBSystemShapes(this Subscri /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -973,7 +1254,7 @@ public static async Task> GetOracleDBSyste /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1030,7 +1311,7 @@ public static OracleDnsPrivateViewCollection GetOracleDnsPrivateViews(this Subsc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1069,7 +1350,7 @@ public static async Task> GetOracleDnsPri /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1126,7 +1407,7 @@ public static OracleDnsPrivateZoneCollection GetOracleDnsPrivateZones(this Subsc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1165,7 +1446,7 @@ public static async Task> GetOracleDnsPri /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1191,6 +1472,102 @@ public static Response GetOracleDnsPrivateZone(thi return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetOracleDnsPrivateZone(location, dnsprivatezonename, cancellationToken); } + /// + /// Gets a collection of FlexComponentResources in the SubscriptionResource. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// is null. + /// An object representing collection of FlexComponentResources and their operations over a FlexComponentResource. + public static FlexComponentCollection GetFlexComponents(this SubscriptionResource subscriptionResource, AzureLocation location) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetFlexComponents(location); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static async Task> GetFlexComponentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetFlexComponentAsync(location, flexComponentName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public static Response GetFlexComponent(this SubscriptionResource subscriptionResource, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetFlexComponent(location, flexComponentName, cancellationToken); + } + /// /// Gets a collection of OracleGIVersionResources in the SubscriptionResource. /// @@ -1222,7 +1599,7 @@ public static OracleGIVersionCollection GetOracleGIVersions(this SubscriptionRes /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1261,7 +1638,7 @@ public static async Task> GetOracleGIVersionAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1318,7 +1695,7 @@ public static OracleSystemVersionCollection GetOracleSystemVersions(this Subscri /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1357,7 +1734,7 @@ public static async Task> GetOracleSystemV /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1413,7 +1790,7 @@ public static OracleSubscriptionResource GetOracleSubscription(this Subscription /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1449,7 +1826,7 @@ public static AsyncPageable GetAutonomousDatabasesAs /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1485,7 +1862,7 @@ public static Pageable GetAutonomousDatabases(this S /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1521,7 +1898,7 @@ public static AsyncPageable GetCloudExadataI /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1557,7 +1934,7 @@ public static Pageable GetCloudExadataInfras /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1593,7 +1970,7 @@ public static AsyncPageable GetCloudVmClustersAsync(this /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -1615,5 +1992,149 @@ public static Pageable GetCloudVmClusters(this Subscript return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetCloudVmClusters(cancellationToken); } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmClusters_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetExadbVmClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExadbVmClustersAsync(cancellationToken); + } + + /// + /// List ExadbVmCluster resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters + /// + /// + /// Operation Id + /// ExadbVmClusters_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetExadbVmClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExadbVmClusters(cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetExascaleDBStorageVaultsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExascaleDBStorageVaultsAsync(cancellationToken); + } + + /// + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults + /// + /// + /// Operation Id + /// ExascaleDbStorageVaults_ListBySubscription + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetExascaleDBStorageVaults(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableOracleDatabaseSubscriptionResource(subscriptionResource).GetExascaleDBStorageVaults(cancellationToken); + } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentCollection.cs new file mode 100644 index 000000000000..ba5454b65b5c --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentCollection.cs @@ -0,0 +1,402 @@ +// 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; +using Azure.ResourceManager.OracleDatabase.Models; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// 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 GetFlexComponents method from an instance of . + /// + public partial class FlexComponentCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _flexComponentClientDiagnostics; + private readonly FlexComponentsRestOperations _flexComponentRestClient; + private readonly AzureLocation _location; + + /// Initializes a new instance of the class for mocking. + protected FlexComponentCollection() + { + } + + /// 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. + /// The name of the Azure region. + internal FlexComponentCollection(ArmClient client, ResourceIdentifier id, AzureLocation location) : base(client, id) + { + _location = location; + _flexComponentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", FlexComponentResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(FlexComponentResource.ResourceType, out string flexComponentApiVersion); + _flexComponentRestClient = new FlexComponentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, flexComponentApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != SubscriptionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, SubscriptionResource.ResourceType), nameof(id)); + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Get"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Get"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List FlexComponent resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents + /// + /// + /// Operation Id + /// FlexComponents_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(SystemShape? shape = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _flexComponentRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(_location), shape); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _flexComponentRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new FlexComponentResource(Client, FlexComponentData.DeserializeFlexComponentData(e)), _flexComponentClientDiagnostics, Pipeline, "FlexComponentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List FlexComponent resources by SubscriptionLocationResource + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents + /// + /// + /// Operation Id + /// FlexComponents_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(SystemShape? shape = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _flexComponentRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(_location), shape); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _flexComponentRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new FlexComponentResource(Client, FlexComponentData.DeserializeFlexComponentData(e)), _flexComponentClientDiagnostics, Pipeline, "FlexComponentCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Exists"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, 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}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.Exists"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, 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}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(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}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the FlexComponent. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentCollection.GetIfExists"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(_location), flexComponentName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.Serialization.cs new file mode 100644 index 000000000000..822ea7e05646 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class FlexComponentData : 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(FlexComponentData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + FlexComponentData 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(FlexComponentData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlexComponentData(document.RootElement, options); + } + + internal static FlexComponentData DeserializeFlexComponentData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FlexComponentProperties properties = 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 = FlexComponentProperties.DeserializeFlexComponentProperties(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 FlexComponentData( + id, + name, + type, + systemData, + properties, + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(FlexComponentData)} does not support writing '{options.Format}' format."); + } + } + + FlexComponentData 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 DeserializeFlexComponentData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlexComponentData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.cs new file mode 100644 index 000000000000..bd361073797d --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentData.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; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the FlexComponent data model. + /// FlexComponent Resource Definition + /// + public partial class FlexComponentData : 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 FlexComponentData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal FlexComponentData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, FlexComponentProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public FlexComponentProperties Properties { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.Serialization.cs new file mode 100644 index 000000000000..6c1110af2279 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.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.OracleDatabase +{ + public partial class FlexComponentResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + FlexComponentData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); + + FlexComponentData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.cs new file mode 100644 index 000000000000..47afea4f6209 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/FlexComponentResource.cs @@ -0,0 +1,171 @@ +// 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; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A Class representing a FlexComponent 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 GetFlexComponentResource method. + /// Otherwise you can get one from its parent resource using the GetFlexComponent method. + /// + public partial class FlexComponentResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The flexComponentName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string flexComponentName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _flexComponentClientDiagnostics; + private readonly FlexComponentsRestOperations _flexComponentRestClient; + private readonly FlexComponentData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/flexComponents"; + + /// Initializes a new instance of the class for mocking. + protected FlexComponentResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal FlexComponentResource(ArmClient client, FlexComponentData 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 FlexComponentResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _flexComponentClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string flexComponentApiVersion); + _flexComponentRestClient = new FlexComponentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, flexComponentApiVersion); +#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 FlexComponentData 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 FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentResource.Get"); + scope.Start(); + try + { + var response = await _flexComponentRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a FlexComponent + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName} + /// + /// + /// Operation Id + /// FlexComponents_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _flexComponentClientDiagnostics.CreateScope("FlexComponentResource.Get"); + scope.Start(); + try + { + var response = _flexComponentRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new FlexComponentResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionCollection.cs new file mode 100644 index 000000000000..a635f33d7300 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionCollection.cs @@ -0,0 +1,400 @@ +// 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; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// 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 GetGiMinorVersions method from an instance of . + /// + public partial class GiMinorVersionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _giMinorVersionClientDiagnostics; + private readonly GiMinorVersionsRestOperations _giMinorVersionRestClient; + + /// Initializes a new instance of the class for mocking. + protected GiMinorVersionCollection() + { + } + + /// 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 GiMinorVersionCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _giMinorVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", GiMinorVersionResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(GiMinorVersionResource.ResourceType, out string giMinorVersionApiVersion); + _giMinorVersionRestClient = new GiMinorVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, giMinorVersionApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != OracleGIVersionResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, OracleGIVersionResource.ResourceType), nameof(id)); + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Get"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Get"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List GiMinorVersion resources by GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions + /// + /// + /// Operation Id + /// GiMinorVersions_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _giMinorVersionRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _giMinorVersionRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new GiMinorVersionResource(Client, GiMinorVersionData.DeserializeGiMinorVersionData(e)), _giMinorVersionClientDiagnostics, Pipeline, "GiMinorVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List GiMinorVersion resources by GiVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions + /// + /// + /// Operation Id + /// GiMinorVersions_ListByParent + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _giMinorVersionRestClient.CreateListByParentRequest(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _giMinorVersionRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, shapeFamily, zone); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new GiMinorVersionResource(Client, GiMinorVersionData.DeserializeGiMinorVersionData(e)), _giMinorVersionClientDiagnostics, Pipeline, "GiMinorVersionCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Exists"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, 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}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.Exists"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, 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}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(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}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionCollection.GetIfExists"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Name), Id.Name, giMinorVersionName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.Serialization.cs new file mode 100644 index 000000000000..badbbe2eb3f4 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.Serialization.cs @@ -0,0 +1,155 @@ +// 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.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + public partial class GiMinorVersionData : 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(GiMinorVersionData)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + } + + GiMinorVersionData 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(GiMinorVersionData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiMinorVersionData(document.RootElement, options); + } + + internal static GiMinorVersionData DeserializeGiMinorVersionData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + GiMinorVersionProperties properties = 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 = GiMinorVersionProperties.DeserializeGiMinorVersionProperties(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 GiMinorVersionData( + id, + name, + type, + systemData, + properties, + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(GiMinorVersionData)} does not support writing '{options.Format}' format."); + } + } + + GiMinorVersionData 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 DeserializeGiMinorVersionData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiMinorVersionData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.cs new file mode 100644 index 000000000000..5c6514a4a0e0 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionData.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; +using Azure.Core; +using Azure.ResourceManager.Models; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + /// + /// A class representing the GiMinorVersion data model. + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + /// + public partial class GiMinorVersionData : 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 GiMinorVersionData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal GiMinorVersionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, GiMinorVersionProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource-specific properties for this resource. + public GiMinorVersionProperties Properties { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.Serialization.cs new file mode 100644 index 000000000000..6ea6a651f242 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.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.OracleDatabase +{ + public partial class GiMinorVersionResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + GiMinorVersionData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options, AzureResourceManagerOracleDatabaseContext.Default); + + GiMinorVersionData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options, AzureResourceManagerOracleDatabaseContext.Default); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.cs new file mode 100644 index 000000000000..d7b49e1ce3b9 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/GiMinorVersionResource.cs @@ -0,0 +1,171 @@ +// 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.OracleDatabase +{ + /// + /// A Class representing a GiMinorVersion 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 GetGiMinorVersionResource method. + /// Otherwise you can get one from its parent resource using the GetGiMinorVersion method. + /// + public partial class GiMinorVersionResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The location. + /// The giversionname. + /// The giMinorVersionName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName) + { + var resourceId = $"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _giMinorVersionClientDiagnostics; + private readonly GiMinorVersionsRestOperations _giMinorVersionRestClient; + private readonly GiMinorVersionData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Oracle.Database/locations/giVersions/giMinorVersions"; + + /// Initializes a new instance of the class for mocking. + protected GiMinorVersionResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal GiMinorVersionResource(ArmClient client, GiMinorVersionData 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 GiMinorVersionResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _giMinorVersionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.OracleDatabase", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string giMinorVersionApiVersion); + _giMinorVersionRestClient = new GiMinorVersionsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, giMinorVersionApiVersion); +#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 GiMinorVersionData 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 GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionResource.Get"); + scope.Start(); + try + { + var response = await _giMinorVersionRestClient.GetAsync(Id.SubscriptionId, new AzureLocation(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 GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _giMinorVersionClientDiagnostics.CreateScope("GiMinorVersionResource.Get"); + scope.Start(); + try + { + var response = _giMinorVersionRestClient.Get(Id.SubscriptionId, new AzureLocation(Id.Parent.Parent.Name), Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new GiMinorVersionResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DBActionResponseOperationSource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DBActionResponseOperationSource.cs new file mode 100644 index 000000000000..88689317c065 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/DBActionResponseOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal class DBActionResponseOperationSource : IOperationSource + { + DBActionResponse IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return DBActionResponse.DeserializeDBActionResponse(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return DBActionResponse.DeserializeDBActionResponse(document.RootElement); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExadbVmClusterOperationSource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExadbVmClusterOperationSource.cs new file mode 100644 index 000000000000..2e2a8775ff1a --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExadbVmClusterOperationSource.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.OracleDatabase +{ + internal class ExadbVmClusterOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ExadbVmClusterOperationSource(ArmClient client) + { + _client = client; + } + + ExadbVmClusterResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerOracleDatabaseContext.Default); + return new ExadbVmClusterResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerOracleDatabaseContext.Default); + return await Task.FromResult(new ExadbVmClusterResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExascaleDBStorageVaultOperationSource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExascaleDBStorageVaultOperationSource.cs new file mode 100644 index 000000000000..6a12c3684afb --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/LongRunningOperation/ExascaleDBStorageVaultOperationSource.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.OracleDatabase +{ + internal class ExascaleDBStorageVaultOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal ExascaleDBStorageVaultOperationSource(ArmClient client) + { + _client = client; + } + + ExascaleDBStorageVaultResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerOracleDatabaseContext.Default); + return new ExascaleDBStorageVaultResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + var data = ModelReaderWriter.Read(response.Content, ModelReaderWriterOptions.Json, AzureResourceManagerOracleDatabaseContext.Default); + return await Task.FromResult(new ExascaleDBStorageVaultResource(_client, data)).ConfigureAwait(false); + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.cs new file mode 100644 index 000000000000..29255876381b --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AddSubscriptionOperationState.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.OracleDatabase.Models +{ + /// Add Subscription Operation state enum. + public readonly partial struct AddSubscriptionOperationState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AddSubscriptionOperationState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string SucceededValue = "Succeeded"; + private const string UpdatingValue = "Updating"; + private const string FailedValue = "Failed"; + + /// Succeeded - State when Add Subscription operation succeeded. + public static AddSubscriptionOperationState Succeeded { get; } = new AddSubscriptionOperationState(SucceededValue); + /// Updating - State when Add Subscription operation is being Updated. + public static AddSubscriptionOperationState Updating { get; } = new AddSubscriptionOperationState(UpdatingValue); + /// Failed - State when Add Subscription operation failed. + public static AddSubscriptionOperationState Failed { get; } = new AddSubscriptionOperationState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(AddSubscriptionOperationState left, AddSubscriptionOperationState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AddSubscriptionOperationState left, AddSubscriptionOperationState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AddSubscriptionOperationState(string value) => new AddSubscriptionOperationState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AddSubscriptionOperationState other && Equals(other); + /// + public bool Equals(AddSubscriptionOperationState 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs index bcb9824d1296..f4fa621234be 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.Serialization.cs @@ -34,32 +34,29 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AutonomousDBVersionProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } - if (options.Format != "W" && Optional.IsDefined(DBWorkload)) + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(DBWorkload)) { writer.WritePropertyName("dbWorkload"u8); writer.WriteStringValue(DBWorkload.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(IsDefaultForFree)) + if (Optional.IsDefined(IsDefaultForFree)) { writer.WritePropertyName("isDefaultForFree"u8); writer.WriteBooleanValue(IsDefaultForFree.Value); } - if (options.Format != "W" && Optional.IsDefined(IsDefaultForPaid)) + if (Optional.IsDefined(IsDefaultForPaid)) { writer.WritePropertyName("isDefaultForPaid"u8); writer.WriteBooleanValue(IsDefaultForPaid.Value); } - if (options.Format != "W" && Optional.IsDefined(IsFreeTierEnabled)) + if (Optional.IsDefined(IsFreeTierEnabled)) { writer.WritePropertyName("isFreeTierEnabled"u8); writer.WriteBooleanValue(IsFreeTierEnabled.Value); } - if (options.Format != "W" && Optional.IsDefined(IsPaidEnabled)) + if (Optional.IsDefined(IsPaidEnabled)) { writer.WritePropertyName("isPaidEnabled"u8); writer.WriteBooleanValue(IsPaidEnabled.Value); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs index f621e5994b38..f6e159b37371 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDBVersionProperties.cs @@ -47,8 +47,11 @@ public partial class AutonomousDBVersionProperties /// Initializes a new instance of . /// Supported Autonomous Db versions. + /// is null. public AutonomousDBVersionProperties(string version) { + Argument.AssertNotNull(version, nameof(version)); + Version = version; } @@ -77,16 +80,16 @@ internal AutonomousDBVersionProperties() } /// Supported Autonomous Db versions. - public string Version { get; } + public string Version { get; set; } /// The Autonomous Database workload type. - public AutonomousDatabaseWorkloadType? DBWorkload { get; } + public AutonomousDatabaseWorkloadType? DBWorkload { get; set; } /// True if this version of the Oracle Database software's default is free. - public bool? IsDefaultForFree { get; } + public bool? IsDefaultForFree { get; set; } /// True if this version of the Oracle Database software's default is paid. - public bool? IsDefaultForPaid { get; } + public bool? IsDefaultForPaid { get; set; } /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. - public bool? IsFreeTierEnabled { get; } + public bool? IsFreeTierEnabled { get; set; } /// True if this version of the Oracle Database software has payments enabled. - public bool? IsPaidEnabled { get; } + public bool? IsPaidEnabled { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.Serialization.cs index 9cb6ec497f4f..2acd8f37f003 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.Serialization.cs @@ -39,6 +39,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("peerDbId"u8); writer.WriteStringValue(PeerDBId); } + if (Optional.IsDefined(PeerDBOcid)) + { + writer.WritePropertyName("peerDbOcid"u8); + writer.WriteStringValue(PeerDBOcid); + } + if (Optional.IsDefined(PeerDBLocation)) + { + writer.WritePropertyName("peerDbLocation"u8); + writer.WriteStringValue(PeerDBLocation); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -77,6 +87,8 @@ internal static AutonomousDatabaseActionContent DeserializeAutonomousDatabaseAct return null; } string peerDBId = default; + string peerDBOcid = default; + string peerDBLocation = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -86,13 +98,23 @@ internal static AutonomousDatabaseActionContent DeserializeAutonomousDatabaseAct peerDBId = property.Value.GetString(); continue; } + if (property.NameEquals("peerDbOcid"u8)) + { + peerDBOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("peerDbLocation"u8)) + { + peerDBLocation = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AutonomousDatabaseActionContent(peerDBId, serializedAdditionalRawData); + return new AutonomousDatabaseActionContent(peerDBId, peerDBOcid, peerDBLocation, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.cs index 3207f9a0d786..20afcf4007b0 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseActionContent.cs @@ -51,15 +51,23 @@ public AutonomousDatabaseActionContent() } /// Initializes a new instance of . - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The location of the Disaster Recovery peer database. /// Keeps track of any properties unknown to the library. - internal AutonomousDatabaseActionContent(string peerDBId, IDictionary serializedAdditionalRawData) + internal AutonomousDatabaseActionContent(string peerDBId, string peerDBOcid, string peerDBLocation, IDictionary serializedAdditionalRawData) { PeerDBId = peerDBId; + PeerDBOcid = peerDBOcid; + PeerDBLocation = peerDBLocation; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. public string PeerDBId { get; set; } + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + public string PeerDBOcid { get; set; } + /// The location of the Disaster Recovery peer database. + public string PeerDBLocation { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.Serialization.cs index eb94c7915d15..30858207b849 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.Serialization.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using System.Text.Json; using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.OracleDatabase.Models { @@ -26,7 +27,7 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mode /// The JSON writer. /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") @@ -34,26 +35,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AutonomousDatabaseBackupPatch)} does not support writing '{format}' format."); } + base.JsonModelWriteCore(writer, options); if (Optional.IsDefined(Properties)) { writer.WritePropertyName("properties"u8); writer.WriteObjectValue(Properties, 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 - } - } } AutonomousDatabaseBackupPatch IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) @@ -76,7 +63,11 @@ internal static AutonomousDatabaseBackupPatch DeserializeAutonomousDatabaseBacku { return null; } - AutonomousDatabaseBackupUpdateProperties properties = default; + AutonomousDatabaseBackupProperties properties = 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()) @@ -87,7 +78,31 @@ internal static AutonomousDatabaseBackupPatch DeserializeAutonomousDatabaseBacku { continue; } - properties = AutonomousDatabaseBackupUpdateProperties.DeserializeAutonomousDatabaseBackupUpdateProperties(property.Value, options); + properties = AutonomousDatabaseBackupProperties.DeserializeAutonomousDatabaseBackupProperties(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") @@ -96,7 +111,13 @@ internal static AutonomousDatabaseBackupPatch DeserializeAutonomousDatabaseBacku } } serializedAdditionalRawData = rawDataDictionary; - return new AutonomousDatabaseBackupPatch(properties, serializedAdditionalRawData); + return new AutonomousDatabaseBackupPatch( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs index a6fdfd83a508..af8bbdbf04a7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupPatch.cs @@ -7,11 +7,13 @@ using System; using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.Models; namespace Azure.ResourceManager.OracleDatabase.Models { - /// The type used for update operations of the AutonomousDatabaseBackup. - public partial class AutonomousDatabaseBackupPatch + /// AutonomousDatabaseBackup resource definition. + public partial class AutonomousDatabaseBackupPatch : ResourceData { /// /// Keeps track of any properties unknown to the library. @@ -51,26 +53,19 @@ public AutonomousDatabaseBackupPatch() } /// Initializes a new instance of . - /// The updatable properties of the AutonomousDatabaseBackup. + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. - internal AutonomousDatabaseBackupPatch(AutonomousDatabaseBackupUpdateProperties properties, IDictionary serializedAdditionalRawData) + internal AutonomousDatabaseBackupPatch(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, AutonomousDatabaseBackupProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { Properties = properties; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The updatable properties of the AutonomousDatabaseBackup. - internal AutonomousDatabaseBackupUpdateProperties Properties { get; set; } - /// Retention period, in days, for long-term backups. - public int? AutonomousDatabaseBackupUpdateRetentionPeriodInDays - { - get => Properties is null ? default : Properties.RetentionPeriodInDays; - set - { - if (Properties is null) - Properties = new AutonomousDatabaseBackupUpdateProperties(); - Properties.RetentionPeriodInDays = value; - } - } + /// The resource-specific properties for this resource. + public AutonomousDatabaseBackupProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.cs index 0b4e165c69e4..a5071f45bcb9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupProperties.cs @@ -61,7 +61,7 @@ public AutonomousDatabaseBackupProperties() /// Indicates whether the backup can be used to restore the associated Autonomous Database. /// Additional information about the current lifecycle state. /// The current state of the backup. - /// Retention period, in days, for long-term backups. + /// Retention period, in days. /// The backup size in terabytes (TB). /// Timestamp until when the backup will be available. /// The date and time the backup started. @@ -108,7 +108,7 @@ internal AutonomousDatabaseBackupProperties(ResourceIdentifier autonomousDatabas public string LifecycleDetails { get; } /// The current state of the backup. public AutonomousDatabaseBackupLifecycleState? LifecycleState { get; } - /// Retention period, in days, for long-term backups. + /// Retention period, in days. public int? RetentionPeriodInDays { get; set; } /// The backup size in terabytes (TB). public double? SizeInTbs { get; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.Serialization.cs index 5755e4dd35e2..a94e08ed2849 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.Serialization.cs @@ -141,6 +141,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("localDisasterRecoveryType"u8); writer.WriteStringValue(LocalDisasterRecoveryType.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(TimeDisasterRecoveryRoleChanged)) + { + writer.WritePropertyName("timeDisasterRecoveryRoleChanged"u8); + writer.WriteStringValue(TimeDisasterRecoveryRoleChanged.Value, "O"); + } + if (options.Format != "W" && Optional.IsDefined(RemoteDisasterRecoveryConfiguration)) + { + writer.WritePropertyName("remoteDisasterRecoveryConfiguration"u8); + writer.WriteObjectValue(RemoteDisasterRecoveryConfiguration, options); + } if (options.Format != "W" && Optional.IsDefined(LocalStandbyDB)) { writer.WritePropertyName("localStandbyDb"u8); @@ -478,6 +488,8 @@ internal static AutonomousDatabaseBaseProperties DeserializeAutonomousDatabaseBa switch (discriminator.GetString()) { case "Clone": return AutonomousDatabaseCloneProperties.DeserializeAutonomousDatabaseCloneProperties(element, options); + case "CloneFromBackupTimestamp": return AutonomousDatabaseFromBackupTimestampProperties.DeserializeAutonomousDatabaseFromBackupTimestampProperties(element, options); + case "CrossRegionDisasterRecovery": return AutonomousDatabaseCrossRegionDisasterRecoveryProperties.DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(element, options); case "Regular": return AutonomousDatabaseProperties.DeserializeAutonomousDatabaseProperties(element, options); } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.cs index f7ed30ae5c27..b9741d251d93 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBaseProperties.cs @@ -14,7 +14,7 @@ namespace Azure.ResourceManager.OracleDatabase.Models /// /// Autonomous Database base resource model. /// 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 available derived classes include , , and . /// public abstract partial class AutonomousDatabaseBaseProperties { @@ -77,11 +77,13 @@ protected AutonomousDatabaseBaseProperties() /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. /// Local Autonomous Disaster Recovery standby database details. /// Indicates the number of seconds of data loss for a Data Guard failover. /// Specifies if the Autonomous Database requires mTLS connections. @@ -138,7 +140,7 @@ protected AutonomousDatabaseBaseProperties() /// Retention period, in days, for long-term backups. /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. /// Keeps track of any properties unknown to the library. - internal AutonomousDatabaseBaseProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) + internal AutonomousDatabaseBaseProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) { AdminPassword = adminPassword; DataBaseType = dataBaseType; @@ -160,6 +162,8 @@ internal AutonomousDatabaseBaseProperties(string adminPassword, OracleDataBaseTy IsLocalDataGuardEnabled = isLocalDataGuardEnabled; IsRemoteDataGuardEnabled = isRemoteDataGuardEnabled; LocalDisasterRecoveryType = localDisasterRecoveryType; + TimeDisasterRecoveryRoleChanged = timeDisasterRecoveryRoleChanged; + RemoteDisasterRecoveryConfiguration = remoteDisasterRecoveryConfiguration; LocalStandbyDB = localStandbyDB; FailedDataRecoveryInSeconds = failedDataRecoveryInSeconds; IsMtlsConnectionRequired = isMtlsConnectionRequired; @@ -248,9 +252,9 @@ internal AutonomousDatabaseBaseProperties(string adminPassword, OracleDataBaseTy public bool? IsAutoScalingEnabled { get; set; } /// Indicates if auto scaling is enabled for the Autonomous Database storage. public bool? IsAutoScalingForStorageEnabled { get; set; } - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. public IReadOnlyList PeerDBIds { get; } - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. public string PeerDBId { get; set; } /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. public bool? IsLocalDataGuardEnabled { get; set; } @@ -258,6 +262,10 @@ internal AutonomousDatabaseBaseProperties(string adminPassword, OracleDataBaseTy public bool? IsRemoteDataGuardEnabled { get; } /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. public DisasterRecoveryType? LocalDisasterRecoveryType { get; } + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + public DateTimeOffset? TimeDisasterRecoveryRoleChanged { get; } + /// Indicates remote disaster recovery configuration. + public DisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get; } /// Local Autonomous Disaster Recovery standby database details. public AutonomousDatabaseStandbySummary LocalStandbyDB { get; } /// Indicates the number of seconds of data loss for a Data Guard failover. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs index cac8ef74f964..abf77c2d39b3 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AutonomousDatabaseCharacterSetProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("characterSet"u8); - writer.WriteStringValue(CharacterSet); - } + writer.WritePropertyName("characterSet"u8); + writer.WriteStringValue(CharacterSet); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs index a1a8e1075de3..a66f49fb4df1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCharacterSetProperties.cs @@ -47,8 +47,11 @@ internal partial class AutonomousDatabaseCharacterSetProperties /// Initializes a new instance of . /// The Oracle Autonomous Database supported character sets. + /// is null. public AutonomousDatabaseCharacterSetProperties(string characterSet) { + Argument.AssertNotNull(characterSet, nameof(characterSet)); + CharacterSet = characterSet; } @@ -67,6 +70,6 @@ internal AutonomousDatabaseCharacterSetProperties() } /// The Oracle Autonomous Database supported character sets. - public string CharacterSet { get; } + public string CharacterSet { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.Serialization.cs index 89c1be3c2f40..eeedcf3741b1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.Serialization.cs @@ -119,6 +119,8 @@ internal static AutonomousDatabaseCloneProperties DeserializeAutonomousDatabaseC bool? isLocalDataGuardEnabled = default; bool? isRemoteDataGuardEnabled = default; DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; AutonomousDatabaseStandbySummary localStandbyDB = default; int? failedDataRecoveryInSeconds = default; bool? isMtlsConnectionRequired = default; @@ -408,6 +410,24 @@ internal static AutonomousDatabaseCloneProperties DeserializeAutonomousDatabaseC localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); continue; } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } if (property.NameEquals("localStandbyDb"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -926,6 +946,8 @@ internal static AutonomousDatabaseCloneProperties DeserializeAutonomousDatabaseC isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.cs index c92342137ce7..1074947b8d2e 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCloneProperties.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.OracleDatabase.Models public partial class AutonomousDatabaseCloneProperties : AutonomousDatabaseBaseProperties { /// Initializes a new instance of . - /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. /// The Autonomous Database clone type. /// is null. public AutonomousDatabaseCloneProperties(ResourceIdentifier sourceId, AutonomousDatabaseCloneType cloneType) @@ -43,11 +43,13 @@ public AutonomousDatabaseCloneProperties(ResourceIdentifier sourceId, Autonomous /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. /// Local Autonomous Disaster Recovery standby database details. /// Indicates the number of seconds of data loss for a Data Guard failover. /// Specifies if the Autonomous Database requires mTLS connections. @@ -105,14 +107,14 @@ public AutonomousDatabaseCloneProperties(ResourceIdentifier sourceId, Autonomous /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. /// Keeps track of any properties unknown to the library. /// The source of the database. - /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. /// The Autonomous Database clone type. /// Indicates if the refreshable clone can be reconnected to its source database. /// Indicates if the Autonomous Database is a refreshable clone. /// The refresh mode of the clone. /// The refresh status of the clone. /// The time and date as an RFC3339 formatted string, e.g., 2022-01-01T12:00:00.000Z, to set the limit for a refreshable clone to be reconnected to its source database. - internal AutonomousDatabaseCloneProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData, AutonomousDatabaseSourceType? source, ResourceIdentifier sourceId, AutonomousDatabaseCloneType cloneType, bool? isReconnectCloneEnabled, bool? isRefreshableClone, RefreshableModelType? refreshableModel, RefreshableStatusType? refreshableStatus, DateTimeOffset? reconnectCloneEnabledOn) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + internal AutonomousDatabaseCloneProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData, AutonomousDatabaseSourceType? source, ResourceIdentifier sourceId, AutonomousDatabaseCloneType cloneType, bool? isReconnectCloneEnabled, bool? isRefreshableClone, RefreshableModelType? refreshableModel, RefreshableStatusType? refreshableStatus, DateTimeOffset? reconnectCloneEnabledOn) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) { Source = source; SourceId = sourceId; @@ -132,7 +134,7 @@ internal AutonomousDatabaseCloneProperties() /// The source of the database. public AutonomousDatabaseSourceType? Source { get; set; } - /// The Azure ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. public ResourceIdentifier SourceId { get; set; } /// The Autonomous Database clone type. public AutonomousDatabaseCloneType CloneType { get; set; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.Serialization.cs new file mode 100644 index 000000000000..5aeb87b2848a --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.Serialization.cs @@ -0,0 +1,1001 @@ +// 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.OracleDatabase.Models +{ + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryProperties : 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(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source.ToString()); + writer.WritePropertyName("sourceId"u8); + writer.WriteStringValue(SourceId); + if (Optional.IsDefined(SourceLocation)) + { + writer.WritePropertyName("sourceLocation"u8); + writer.WriteStringValue(SourceLocation); + } + if (Optional.IsDefined(SourceOcid)) + { + writer.WritePropertyName("sourceOcid"u8); + writer.WriteStringValue(SourceOcid); + } + writer.WritePropertyName("remoteDisasterRecoveryType"u8); + writer.WriteStringValue(RemoteDisasterRecoveryType.ToString()); + if (Optional.IsDefined(IsReplicateAutomaticBackups)) + { + writer.WritePropertyName("isReplicateAutomaticBackups"u8); + writer.WriteBooleanValue(IsReplicateAutomaticBackups.Value); + } + } + + AutonomousDatabaseCrossRegionDisasterRecoveryProperties 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(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseCrossRegionDisasterRecoveryProperties DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource source = default; + ResourceIdentifier sourceId = default; + string sourceLocation = default; + string sourceOcid = default; + DisasterRecoveryType remoteDisasterRecoveryType = default; + bool? isReplicateAutomaticBackups = default; + string adminPassword = default; + OracleDataBaseType dataBaseType = default; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + string characterSet = default; + float? computeCount = default; + AutonomousDatabaseComputeModel? computeModel = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string dbVersion = default; + AutonomousDatabaseWorkloadType? dbWorkload = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + IReadOnlyList peerDBIds = default; + string peerDBId = default; + bool? isLocalDataGuardEnabled = default; + bool? isRemoteDataGuardEnabled = default; + DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; + AutonomousDatabaseStandbySummary localStandbyDB = default; + int? failedDataRecoveryInSeconds = default; + bool? isMtlsConnectionRequired = default; + bool? isPreviewVersionWithServiceTermsAccepted = default; + OracleLicenseModel? licenseModel = default; + string ncharacterSet = default; + string lifecycleDetails = default; + OracleDatabaseProvisioningState? provisioningState = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + ScheduledOperationsType scheduledOperations = default; + string privateEndpointIP = default; + string privateEndpointLabel = default; + Uri ociUrl = default; + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeMaintenanceBegin = default; + DateTimeOffset? timeMaintenanceEnd = default; + double? actualUsedDataStorageSizeInTbs = default; + double? allocatedStorageSizeInTbs = default; + OracleApexDetailsType apexDetails = default; + IReadOnlyList availableUpgradeVersions = default; + AutonomousDatabaseConnectionStrings connectionStrings = default; + AutonomousDatabaseConnectionUrls connectionUrls = default; + DataSafeStatusType? dataSafeStatus = default; + OracleDatabaseEditionType? databaseEdition = default; + ResourceIdentifier autonomousDatabaseId = default; + int? inMemoryAreaInGbs = default; + DateTimeOffset? nextLongTermBackupTimeStamp = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + bool? isPreview = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + int? memoryPerOracleComputeUnitInGbs = default; + AutonomousDatabaseModeType? openMode = default; + OperationsInsightsStatusType? operationsInsightsStatus = default; + AutonomousDatabasePermissionLevelType? permissionLevel = default; + string privateEndpoint = default; + IReadOnlyList provisionableCpus = default; + DataGuardRoleType? role = default; + Uri serviceConsoleUrl = default; + Uri sqlWebDeveloperUrl = default; + IReadOnlyList supportedRegionsToCloneTo = default; + DateTimeOffset? timeDataGuardRoleChanged = default; + DateTimeOffset? timeDeletionOfFreeAutonomousDatabase = default; + string timeLocalDataGuardEnabled = default; + DateTimeOffset? timeOfLastFailover = default; + DateTimeOffset? timeOfLastRefresh = default; + DateTimeOffset? timeOfLastRefreshPoint = default; + DateTimeOffset? timeOfLastSwitchover = default; + DateTimeOffset? timeReclamationOfFreeAutonomousDatabase = default; + int? usedDataStorageSizeInGbs = default; + int? usedDataStorageSizeInTbs = default; + ResourceIdentifier ocid = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = new AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceId"u8)) + { + sourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceLocation"u8)) + { + sourceLocation = property.Value.GetString(); + continue; + } + if (property.NameEquals("sourceOcid"u8)) + { + sourceOcid = property.Value.GetString(); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryType"u8)) + { + remoteDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("isReplicateAutomaticBackups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReplicateAutomaticBackups = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBaseType"u8)) + { + dataBaseType = new OracleDataBaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new AutonomousDatabaseComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OracleCustomerContact.DeserializeOracleCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new AutonomousDatabaseWorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerDBIds = array; + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDBId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRemoteDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRemoteDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localDisasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } + if (property.NameEquals("localStandbyDb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStandbyDB = AutonomousDatabaseStandbySummary.DeserializeAutonomousDatabaseStandbySummary(property.Value, options); + continue; + } + if (property.NameEquals("failedDataRecoveryInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedDataRecoveryInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPreviewVersionWithServiceTermsAccepted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreviewVersionWithServiceTermsAccepted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new OracleLicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("ncharacterSet"u8)) + { + ncharacterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new OracleDatabaseProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("privateEndpointIp"u8)) + { + privateEndpointIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointLabel"u8)) + { + privateEndpointLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceBegin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceBegin = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("actualUsedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualUsedDataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("allocatedStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("apexDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apexDetails = OracleApexDetailsType.DeserializeOracleApexDetailsType(property.Value, options); + continue; + } + if (property.NameEquals("availableUpgradeVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableUpgradeVersions = array; + continue; + } + if (property.NameEquals("connectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStrings = AutonomousDatabaseConnectionStrings.DeserializeAutonomousDatabaseConnectionStrings(property.Value, options); + continue; + } + if (property.NameEquals("connectionUrls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionUrls = AutonomousDatabaseConnectionUrls.DeserializeAutonomousDatabaseConnectionUrls(property.Value, options); + continue; + } + if (property.NameEquals("dataSafeStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSafeStatus = new DataSafeStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new OracleDatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousDatabaseId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousDatabaseId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inMemoryAreaInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inMemoryAreaInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nextLongTermBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLongTermBackupTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("isPreview"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryPerOracleComputeUnitInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryPerOracleComputeUnitInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new AutonomousDatabaseModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationsInsightsStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationsInsightsStatus = new OperationsInsightsStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new AutonomousDatabasePermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + privateEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionableCpus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + provisionableCpus = array; + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new DataGuardRoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceConsoleUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceConsoleUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sqlWebDeveloperUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sqlWebDeveloperUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("supportedRegionsToCloneTo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedRegionsToCloneTo = array; + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDataGuardRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeDeletionOfFreeAutonomousDatabase"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDeletionOfFreeAutonomousDatabase = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeLocalDataGuardEnabled"u8)) + { + timeLocalDataGuardEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastFailover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastFailover = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeOfLastRefresh"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastRefresh = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeOfLastRefreshPoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastRefreshPoint = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeOfLastSwitchover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastSwitchover = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeReclamationOfFreeAutonomousDatabase"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeReclamationOfFreeAutonomousDatabase = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("usedDataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ocid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseCrossRegionDisasterRecoveryProperties( + adminPassword, + dataBaseType, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDBIds ?? new ChangeTrackingList(), + peerDBId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDB, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUrl, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions ?? new ChangeTrackingList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus ?? new ChangeTrackingList(), + role, + serviceConsoleUrl, + sqlWebDeveloperUrl, + supportedRegionsToCloneTo ?? new ChangeTrackingList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData, + source, + sourceId, + sourceLocation, + sourceOcid, + remoteDisasterRecoveryType, + isReplicateAutomaticBackups); + } + + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseCrossRegionDisasterRecoveryProperties 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 DeserializeAutonomousDatabaseCrossRegionDisasterRecoveryProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseCrossRegionDisasterRecoveryProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs new file mode 100644 index 000000000000..3e4d6a8562c4 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs @@ -0,0 +1,145 @@ +// 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.OracleDatabase.Models +{ + /// Autonomous Database Cross Region Disaster Recovery resource model. + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryProperties : AutonomousDatabaseBaseProperties + { + /// Initializes a new instance of . + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// is null. + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties(ResourceIdentifier sourceId, DisasterRecoveryType remoteDisasterRecoveryType) + { + Argument.AssertNotNull(sourceId, nameof(sourceId)); + + Source = AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource.CrossRegionDisasterRecovery; + SourceId = sourceId; + RemoteDisasterRecoveryType = remoteDisasterRecoveryType; + DataBaseType = OracleDataBaseType.CrossRegionDisasterRecovery; + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + /// The source of the database. + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// The name of the region where source Autonomous Database exists. + /// The source database ocid. + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + internal AutonomousDatabaseCrossRegionDisasterRecoveryProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData, AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource source, ResourceIdentifier sourceId, string sourceLocation, string sourceOcid, DisasterRecoveryType remoteDisasterRecoveryType, bool? isReplicateAutomaticBackups) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + { + Source = source; + SourceId = sourceId; + SourceLocation = sourceLocation; + SourceOcid = sourceOcid; + RemoteDisasterRecoveryType = remoteDisasterRecoveryType; + IsReplicateAutomaticBackups = isReplicateAutomaticBackups; + DataBaseType = dataBaseType; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseCrossRegionDisasterRecoveryProperties() + { + } + + /// The source of the database. + public AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource Source { get; } + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + public ResourceIdentifier SourceId { get; set; } + /// The name of the region where source Autonomous Database exists. + public string SourceLocation { get; set; } + /// The source database ocid. + public string SourceOcid { get; set; } + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + public DisasterRecoveryType RemoteDisasterRecoveryType { get; set; } + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + public bool? IsReplicateAutomaticBackups { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource.cs new file mode 100644 index 000000000000..1ec7f9c7aa7f --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource.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.OracleDatabase.Models +{ + /// The source of the database. + public readonly partial struct AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CrossRegionDisasterRecoveryValue = "CrossRegionDisasterRecovery"; + + /// CrossRegionDisasterRecovery. + public static AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource CrossRegionDisasterRecovery { get; } = new AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource(CrossRegionDisasterRecoveryValue); + /// Determines if two values are the same. + public static bool operator ==(AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource left, AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource left, AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource(string value) => new AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource other && Equals(other); + /// + public bool Equals(AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesSource 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.Serialization.cs new file mode 100644 index 000000000000..d1916ca953fe --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.Serialization.cs @@ -0,0 +1,993 @@ +// 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.OracleDatabase.Models +{ + public partial class AutonomousDatabaseFromBackupTimestampProperties : 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(AutonomousDatabaseFromBackupTimestampProperties)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("source"u8); + writer.WriteStringValue(Source.ToString()); + writer.WritePropertyName("sourceId"u8); + writer.WriteStringValue(SourceId); + writer.WritePropertyName("cloneType"u8); + writer.WriteStringValue(CloneType.ToString()); + if (Optional.IsDefined(Timestamp)) + { + writer.WritePropertyName("timestamp"u8); + writer.WriteStringValue(Timestamp.Value, "O"); + } + if (Optional.IsDefined(UseLatestAvailableBackupTimeStamp)) + { + writer.WritePropertyName("useLatestAvailableBackupTimeStamp"u8); + writer.WriteBooleanValue(UseLatestAvailableBackupTimeStamp.Value); + } + } + + AutonomousDatabaseFromBackupTimestampProperties 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(AutonomousDatabaseFromBackupTimestampProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAutonomousDatabaseFromBackupTimestampProperties(document.RootElement, options); + } + + internal static AutonomousDatabaseFromBackupTimestampProperties DeserializeAutonomousDatabaseFromBackupTimestampProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AutonomousDatabaseFromBackupTimestampPropertiesSource source = default; + ResourceIdentifier sourceId = default; + AutonomousDatabaseCloneType cloneType = default; + DateTimeOffset? timestamp = default; + bool? useLatestAvailableBackupTimeStamp = default; + string adminPassword = default; + OracleDataBaseType dataBaseType = default; + AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType = default; + string characterSet = default; + float? computeCount = default; + AutonomousDatabaseComputeModel? computeModel = default; + int? cpuCoreCount = default; + IList customerContacts = default; + int? dataStorageSizeInTbs = default; + int? dataStorageSizeInGbs = default; + string dbVersion = default; + AutonomousDatabaseWorkloadType? dbWorkload = default; + string displayName = default; + bool? isAutoScalingEnabled = default; + bool? isAutoScalingForStorageEnabled = default; + IReadOnlyList peerDBIds = default; + string peerDBId = default; + bool? isLocalDataGuardEnabled = default; + bool? isRemoteDataGuardEnabled = default; + DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; + AutonomousDatabaseStandbySummary localStandbyDB = default; + int? failedDataRecoveryInSeconds = default; + bool? isMtlsConnectionRequired = default; + bool? isPreviewVersionWithServiceTermsAccepted = default; + OracleLicenseModel? licenseModel = default; + string ncharacterSet = default; + string lifecycleDetails = default; + OracleDatabaseProvisioningState? provisioningState = default; + AutonomousDatabaseLifecycleState? lifecycleState = default; + ScheduledOperationsType scheduledOperations = default; + string privateEndpointIP = default; + string privateEndpointLabel = default; + Uri ociUrl = default; + ResourceIdentifier subnetId = default; + ResourceIdentifier vnetId = default; + DateTimeOffset? timeCreated = default; + DateTimeOffset? timeMaintenanceBegin = default; + DateTimeOffset? timeMaintenanceEnd = default; + double? actualUsedDataStorageSizeInTbs = default; + double? allocatedStorageSizeInTbs = default; + OracleApexDetailsType apexDetails = default; + IReadOnlyList availableUpgradeVersions = default; + AutonomousDatabaseConnectionStrings connectionStrings = default; + AutonomousDatabaseConnectionUrls connectionUrls = default; + DataSafeStatusType? dataSafeStatus = default; + OracleDatabaseEditionType? databaseEdition = default; + ResourceIdentifier autonomousDatabaseId = default; + int? inMemoryAreaInGbs = default; + DateTimeOffset? nextLongTermBackupTimeStamp = default; + LongTermBackUpScheduleDetails longTermBackupSchedule = default; + bool? isPreview = default; + int? localAdgAutoFailoverMaxDataLossLimit = default; + int? memoryPerOracleComputeUnitInGbs = default; + AutonomousDatabaseModeType? openMode = default; + OperationsInsightsStatusType? operationsInsightsStatus = default; + AutonomousDatabasePermissionLevelType? permissionLevel = default; + string privateEndpoint = default; + IReadOnlyList provisionableCpus = default; + DataGuardRoleType? role = default; + Uri serviceConsoleUrl = default; + Uri sqlWebDeveloperUrl = default; + IReadOnlyList supportedRegionsToCloneTo = default; + DateTimeOffset? timeDataGuardRoleChanged = default; + DateTimeOffset? timeDeletionOfFreeAutonomousDatabase = default; + string timeLocalDataGuardEnabled = default; + DateTimeOffset? timeOfLastFailover = default; + DateTimeOffset? timeOfLastRefresh = default; + DateTimeOffset? timeOfLastRefreshPoint = default; + DateTimeOffset? timeOfLastSwitchover = default; + DateTimeOffset? timeReclamationOfFreeAutonomousDatabase = default; + int? usedDataStorageSizeInGbs = default; + int? usedDataStorageSizeInTbs = default; + ResourceIdentifier ocid = default; + int? backupRetentionPeriodInDays = default; + IList whitelistedIPs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("source"u8)) + { + source = new AutonomousDatabaseFromBackupTimestampPropertiesSource(property.Value.GetString()); + continue; + } + if (property.NameEquals("sourceId"u8)) + { + sourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("cloneType"u8)) + { + cloneType = new AutonomousDatabaseCloneType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timestamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timestamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("useLatestAvailableBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + useLatestAvailableBackupTimeStamp = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("adminPassword"u8)) + { + adminPassword = property.Value.GetString(); + continue; + } + if (property.NameEquals("dataBaseType"u8)) + { + dataBaseType = new OracleDataBaseType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousMaintenanceScheduleType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousMaintenanceScheduleType = new AutonomousMaintenanceScheduleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("characterSet"u8)) + { + characterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeCount = property.Value.GetSingle(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new AutonomousDatabaseComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("customerContacts"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(OracleCustomerContact.DeserializeOracleCustomerContact(item, options)); + } + customerContacts = array; + continue; + } + if (property.NameEquals("dataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbVersion"u8)) + { + dbVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("dbWorkload"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbWorkload = new AutonomousDatabaseWorkloadType(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("isAutoScalingEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isAutoScalingForStorageEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isAutoScalingForStorageEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("peerDbIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + peerDBIds = array; + continue; + } + if (property.NameEquals("peerDbId"u8)) + { + peerDBId = property.Value.GetString(); + continue; + } + if (property.NameEquals("isLocalDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isLocalDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isRemoteDataGuardEnabled"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isRemoteDataGuardEnabled = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localDisasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } + if (property.NameEquals("localStandbyDb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localStandbyDB = AutonomousDatabaseStandbySummary.DeserializeAutonomousDatabaseStandbySummary(property.Value, options); + continue; + } + if (property.NameEquals("failedDataRecoveryInSeconds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + failedDataRecoveryInSeconds = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("isMtlsConnectionRequired"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isMtlsConnectionRequired = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isPreviewVersionWithServiceTermsAccepted"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreviewVersionWithServiceTermsAccepted = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new OracleLicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("ncharacterSet"u8)) + { + ncharacterSet = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new OracleDatabaseProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new AutonomousDatabaseLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("scheduledOperations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scheduledOperations = ScheduledOperationsType.DeserializeScheduledOperationsType(property.Value, options); + continue; + } + if (property.NameEquals("privateEndpointIp"u8)) + { + privateEndpointIP = property.Value.GetString(); + continue; + } + if (property.NameEquals("privateEndpointLabel"u8)) + { + privateEndpointLabel = property.Value.GetString(); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeCreated"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeCreated = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceBegin"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceBegin = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("actualUsedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actualUsedDataStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("allocatedStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + allocatedStorageSizeInTbs = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("apexDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + apexDetails = OracleApexDetailsType.DeserializeOracleApexDetailsType(property.Value, options); + continue; + } + if (property.NameEquals("availableUpgradeVersions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + availableUpgradeVersions = array; + continue; + } + if (property.NameEquals("connectionStrings"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionStrings = AutonomousDatabaseConnectionStrings.DeserializeAutonomousDatabaseConnectionStrings(property.Value, options); + continue; + } + if (property.NameEquals("connectionUrls"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + connectionUrls = AutonomousDatabaseConnectionUrls.DeserializeAutonomousDatabaseConnectionUrls(property.Value, options); + continue; + } + if (property.NameEquals("dataSafeStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSafeStatus = new DataSafeStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("databaseEdition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + databaseEdition = new OracleDatabaseEditionType(property.Value.GetString()); + continue; + } + if (property.NameEquals("autonomousDatabaseId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + autonomousDatabaseId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("inMemoryAreaInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inMemoryAreaInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nextLongTermBackupTimeStamp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLongTermBackupTimeStamp = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("longTermBackupSchedule"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + longTermBackupSchedule = LongTermBackUpScheduleDetails.DeserializeLongTermBackUpScheduleDetails(property.Value, options); + continue; + } + if (property.NameEquals("isPreview"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isPreview = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("localAdgAutoFailoverMaxDataLossLimit"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + localAdgAutoFailoverMaxDataLossLimit = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("memoryPerOracleComputeUnitInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memoryPerOracleComputeUnitInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("openMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + openMode = new AutonomousDatabaseModeType(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationsInsightsStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationsInsightsStatus = new OperationsInsightsStatusType(property.Value.GetString()); + continue; + } + if (property.NameEquals("permissionLevel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + permissionLevel = new AutonomousDatabasePermissionLevelType(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateEndpoint"u8)) + { + privateEndpoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisionableCpus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetInt32()); + } + provisionableCpus = array; + continue; + } + if (property.NameEquals("role"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + role = new DataGuardRoleType(property.Value.GetString()); + continue; + } + if (property.NameEquals("serviceConsoleUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceConsoleUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("sqlWebDeveloperUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sqlWebDeveloperUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("supportedRegionsToCloneTo"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + supportedRegionsToCloneTo = array; + continue; + } + if (property.NameEquals("timeDataGuardRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDataGuardRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeDeletionOfFreeAutonomousDatabase"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDeletionOfFreeAutonomousDatabase = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeLocalDataGuardEnabled"u8)) + { + timeLocalDataGuardEnabled = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeOfLastFailover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastFailover = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeOfLastRefresh"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastRefresh = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeOfLastRefreshPoint"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastRefreshPoint = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeOfLastSwitchover"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeOfLastSwitchover = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeReclamationOfFreeAutonomousDatabase"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeReclamationOfFreeAutonomousDatabase = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("usedDataStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("usedDataStorageSizeInTbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usedDataStorageSizeInTbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ocid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("backupRetentionPeriodInDays"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupRetentionPeriodInDays = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("whitelistedIps"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + whitelistedIPs = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AutonomousDatabaseFromBackupTimestampProperties( + adminPassword, + dataBaseType, + autonomousMaintenanceScheduleType, + characterSet, + computeCount, + computeModel, + cpuCoreCount, + customerContacts ?? new ChangeTrackingList(), + dataStorageSizeInTbs, + dataStorageSizeInGbs, + dbVersion, + dbWorkload, + displayName, + isAutoScalingEnabled, + isAutoScalingForStorageEnabled, + peerDBIds ?? new ChangeTrackingList(), + peerDBId, + isLocalDataGuardEnabled, + isRemoteDataGuardEnabled, + localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, + localStandbyDB, + failedDataRecoveryInSeconds, + isMtlsConnectionRequired, + isPreviewVersionWithServiceTermsAccepted, + licenseModel, + ncharacterSet, + lifecycleDetails, + provisioningState, + lifecycleState, + scheduledOperations, + privateEndpointIP, + privateEndpointLabel, + ociUrl, + subnetId, + vnetId, + timeCreated, + timeMaintenanceBegin, + timeMaintenanceEnd, + actualUsedDataStorageSizeInTbs, + allocatedStorageSizeInTbs, + apexDetails, + availableUpgradeVersions ?? new ChangeTrackingList(), + connectionStrings, + connectionUrls, + dataSafeStatus, + databaseEdition, + autonomousDatabaseId, + inMemoryAreaInGbs, + nextLongTermBackupTimeStamp, + longTermBackupSchedule, + isPreview, + localAdgAutoFailoverMaxDataLossLimit, + memoryPerOracleComputeUnitInGbs, + openMode, + operationsInsightsStatus, + permissionLevel, + privateEndpoint, + provisionableCpus ?? new ChangeTrackingList(), + role, + serviceConsoleUrl, + sqlWebDeveloperUrl, + supportedRegionsToCloneTo ?? new ChangeTrackingList(), + timeDataGuardRoleChanged, + timeDeletionOfFreeAutonomousDatabase, + timeLocalDataGuardEnabled, + timeOfLastFailover, + timeOfLastRefresh, + timeOfLastRefreshPoint, + timeOfLastSwitchover, + timeReclamationOfFreeAutonomousDatabase, + usedDataStorageSizeInGbs, + usedDataStorageSizeInTbs, + ocid, + backupRetentionPeriodInDays, + whitelistedIPs ?? new ChangeTrackingList(), + serializedAdditionalRawData, + source, + sourceId, + cloneType, + timestamp, + useLatestAvailableBackupTimeStamp); + } + + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseFromBackupTimestampProperties)} does not support writing '{options.Format}' format."); + } + } + + AutonomousDatabaseFromBackupTimestampProperties 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 DeserializeAutonomousDatabaseFromBackupTimestampProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AutonomousDatabaseFromBackupTimestampProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.cs new file mode 100644 index 000000000000..73160b5926e5 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampProperties.cs @@ -0,0 +1,141 @@ +// 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.OracleDatabase.Models +{ + /// Autonomous Database From Backup Timestamp resource model. + public partial class AutonomousDatabaseFromBackupTimestampProperties : AutonomousDatabaseBaseProperties + { + /// Initializes a new instance of . + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// The Autonomous Database clone type. + /// is null. + public AutonomousDatabaseFromBackupTimestampProperties(ResourceIdentifier sourceId, AutonomousDatabaseCloneType cloneType) + { + Argument.AssertNotNull(sourceId, nameof(sourceId)); + + Source = AutonomousDatabaseFromBackupTimestampPropertiesSource.BackupFromTimestamp; + SourceId = sourceId; + CloneType = cloneType; + DataBaseType = OracleDataBaseType.CloneFromBackupTimestamp; + } + + /// Initializes a new instance of . + /// Admin password. + /// Database type to be created. + /// The maintenance schedule type of the Autonomous Database Serverless. + /// The character set for the autonomous database. + /// The compute amount (CPUs) available to the database. + /// The compute model of the Autonomous Database. + /// The number of CPU cores to be made available to the database. + /// Customer Contacts. + /// The quantity of data in the database, in terabytes. + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// A valid Oracle Database version for Autonomous Database. + /// The Autonomous Database workload type. + /// The user-friendly name for the Autonomous Database. + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. + /// Local Autonomous Disaster Recovery standby database details. + /// Indicates the number of seconds of data loss for a Data Guard failover. + /// Specifies if the Autonomous Database requires mTLS connections. + /// Specifies if the Autonomous Database preview version is being provisioned. + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// The character set for the Autonomous Database. + /// Additional information about the current lifecycle state. + /// Azure resource provisioning state. + /// Views lifecycleState. + /// The list of scheduled operations. + /// The private endpoint Ip address for the resource. + /// The resource's private endpoint label. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Client subnet. + /// VNET for network connectivity. + /// The date and time that the database was created. + /// The date and time when maintenance will begin. + /// The date and time when maintenance will end. + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// Information about Oracle APEX Application Development. + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty. + /// The connection string used to connect to the Autonomous Database. + /// The URLs for accessing Oracle Application Express (APEX) and SQL Developer Web with a browser from a Compute instance within your VCN or that has a direct connection to your VCN. + /// Status of the Data Safe registration for this Autonomous Database. + /// The Oracle Database Edition that applies to the Autonomous databases. + /// Autonomous Database ID. + /// The area assigned to In-Memory tables in Autonomous Database. + /// The date and time when the next long-term backup would be created. + /// Details for the long-term backup schedule. + /// Indicates if the Autonomous Database version is a preview version. + /// Parameter that allows users to select an acceptable maximum data loss limit in seconds, up to which Automatic Failover will be triggered when necessary for a Local Autonomous Data Guard. + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + /// Indicates the Autonomous Database mode. + /// Status of Operations Insights for this Autonomous Database. + /// The Autonomous Database permission level. + /// The private endpoint for the resource. + /// An array of CPU values that an Autonomous Database can be scaled to. + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// The URL of the Service Console for the Autonomous Database. + /// The SQL Web Developer URL for the Oracle Autonomous Database. + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// The date and time that Autonomous Data Guard was enabled for an Autonomous Database where the standby was provisioned in the same region as the primary database. + /// The timestamp of the last failover operation. + /// The date and time when last refresh happened. + /// The refresh point timestamp (UTC). + /// The timestamp of the last switchover operation for the Autonomous Database. + /// The date and time the Always Free database will be stopped because of inactivity. + /// The storage space consumed by Autonomous Database in GBs. + /// The amount of storage that has been used, in terabytes. + /// Database ocid. + /// Retention period, in days, for long-term backups. + /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. + /// Keeps track of any properties unknown to the library. + /// The source of the database. + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// The Autonomous Database clone type. + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + /// Clone from latest available backup timestamp. + internal AutonomousDatabaseFromBackupTimestampProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData, AutonomousDatabaseFromBackupTimestampPropertiesSource source, ResourceIdentifier sourceId, AutonomousDatabaseCloneType cloneType, DateTimeOffset? timestamp, bool? useLatestAvailableBackupTimeStamp) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + { + Source = source; + SourceId = sourceId; + CloneType = cloneType; + Timestamp = timestamp; + UseLatestAvailableBackupTimeStamp = useLatestAvailableBackupTimeStamp; + DataBaseType = dataBaseType; + } + + /// Initializes a new instance of for deserialization. + internal AutonomousDatabaseFromBackupTimestampProperties() + { + } + + /// The source of the database. + public AutonomousDatabaseFromBackupTimestampPropertiesSource Source { get; } + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + public ResourceIdentifier SourceId { get; set; } + /// The Autonomous Database clone type. + public AutonomousDatabaseCloneType CloneType { get; set; } + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + public DateTimeOffset? Timestamp { get; set; } + /// Clone from latest available backup timestamp. + public bool? UseLatestAvailableBackupTimeStamp { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampPropertiesSource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampPropertiesSource.cs new file mode 100644 index 000000000000..9daa22bcfd77 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseFromBackupTimestampPropertiesSource.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.OracleDatabase.Models +{ + /// The source of the database. + public readonly partial struct AutonomousDatabaseFromBackupTimestampPropertiesSource : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AutonomousDatabaseFromBackupTimestampPropertiesSource(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string BackupFromTimestampValue = "BackupFromTimestamp"; + + /// BackupFromTimestamp. + public static AutonomousDatabaseFromBackupTimestampPropertiesSource BackupFromTimestamp { get; } = new AutonomousDatabaseFromBackupTimestampPropertiesSource(BackupFromTimestampValue); + /// Determines if two values are the same. + public static bool operator ==(AutonomousDatabaseFromBackupTimestampPropertiesSource left, AutonomousDatabaseFromBackupTimestampPropertiesSource right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AutonomousDatabaseFromBackupTimestampPropertiesSource left, AutonomousDatabaseFromBackupTimestampPropertiesSource right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator AutonomousDatabaseFromBackupTimestampPropertiesSource(string value) => new AutonomousDatabaseFromBackupTimestampPropertiesSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AutonomousDatabaseFromBackupTimestampPropertiesSource other && Equals(other); + /// + public bool Equals(AutonomousDatabaseFromBackupTimestampPropertiesSource 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs index 664de546810a..ad0e45508a7e 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AutonomousDatabaseNationalCharacterSetProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("characterSet"u8); - writer.WriteStringValue(CharacterSet); - } + writer.WritePropertyName("characterSet"u8); + writer.WriteStringValue(CharacterSet); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs index 6992133934c3..89c316e07d6b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseNationalCharacterSetProperties.cs @@ -47,8 +47,11 @@ internal partial class AutonomousDatabaseNationalCharacterSetProperties /// Initializes a new instance of . /// The Oracle Autonomous Database supported national character sets. + /// is null. public AutonomousDatabaseNationalCharacterSetProperties(string characterSet) { + Argument.AssertNotNull(characterSet, nameof(characterSet)); + CharacterSet = characterSet; } @@ -67,6 +70,6 @@ internal AutonomousDatabaseNationalCharacterSetProperties() } /// The Oracle Autonomous Database supported national character sets. - public string CharacterSet { get; } + public string CharacterSet { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs index 12e7d7e5f6d6..0a6d36756b5c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabasePatch.cs @@ -53,7 +53,7 @@ public AutonomousDatabasePatch() /// Initializes a new instance of . /// Resource tags. - /// The updatable properties of the AutonomousDatabase. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal AutonomousDatabasePatch(IDictionary tags, AutonomousDatabaseUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -64,7 +64,7 @@ internal AutonomousDatabasePatch(IDictionary tags, AutonomousDat /// Resource tags. public IDictionary Tags { get; } - /// The updatable properties of the AutonomousDatabase. + /// The resource-specific properties for this resource. public AutonomousDatabaseUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.Serialization.cs index 0c423211acc1..e05a8d86ec49 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.Serialization.cs @@ -77,6 +77,8 @@ internal static AutonomousDatabaseProperties DeserializeAutonomousDatabaseProper bool? isLocalDataGuardEnabled = default; bool? isRemoteDataGuardEnabled = default; DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; AutonomousDatabaseStandbySummary localStandbyDB = default; int? failedDataRecoveryInSeconds = default; bool? isMtlsConnectionRequired = default; @@ -302,6 +304,24 @@ internal static AutonomousDatabaseProperties DeserializeAutonomousDatabaseProper localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); continue; } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } if (property.NameEquals("localStandbyDb"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -820,6 +840,8 @@ internal static AutonomousDatabaseProperties DeserializeAutonomousDatabaseProper isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.cs index 275e9ac85be7..1f50edfec063 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseProperties.cs @@ -36,11 +36,13 @@ public AutonomousDatabaseProperties() /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. /// Local Autonomous Disaster Recovery standby database details. /// Indicates the number of seconds of data loss for a Data Guard failover. /// Specifies if the Autonomous Database requires mTLS connections. @@ -97,7 +99,7 @@ public AutonomousDatabaseProperties() /// Retention period, in days, for long-term backups. /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. /// Keeps track of any properties unknown to the library. - internal AutonomousDatabaseProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + internal AutonomousDatabaseProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) { DataBaseType = dataBaseType; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.cs index 60d9cd1a9575..fd5c89a7f006 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseUpdateProperties.cs @@ -63,7 +63,7 @@ public AutonomousDatabaseUpdateProperties() /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Specifies if the Autonomous Database requires mTLS connections. /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. @@ -125,7 +125,7 @@ internal AutonomousDatabaseUpdateProperties(string adminPassword, AutonomousMain public bool? IsAutoScalingEnabled { get; set; } /// Indicates if auto scaling is enabled for the Autonomous Database storage. public bool? IsAutoScalingForStorageEnabled { get; set; } - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. public string PeerDBId { get; set; } /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. public bool? IsLocalDataGuardEnabled { get; set; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs new file mode 100644 index 000000000000..2e77cd19d18b --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.Serialization.cs @@ -0,0 +1,136 @@ +// 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.OracleDatabase.Models +{ + public partial class AzureSubscriptions : 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(AzureSubscriptions)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("azureSubscriptionIds"u8); + writer.WriteStartArray(); + foreach (var item in AzureSubscriptionIds) + { + 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 + } + } + } + + AzureSubscriptions 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(AzureSubscriptions)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAzureSubscriptions(document.RootElement, options); + } + + internal static AzureSubscriptions DeserializeAzureSubscriptions(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList azureSubscriptionIds = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("azureSubscriptionIds"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + azureSubscriptionIds = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AzureSubscriptions(azureSubscriptionIds, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support writing '{options.Format}' format."); + } + } + + AzureSubscriptions 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 DeserializeAzureSubscriptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AzureSubscriptions)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.cs new file mode 100644 index 000000000000..4fc171c10996 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AzureSubscriptions.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 System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Azure Subscriptions model. + public partial class AzureSubscriptions + { + /// + /// 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 . + /// Azure Subscription Ids to be updated. + /// is null. + public AzureSubscriptions(IEnumerable azureSubscriptionIds) + { + Argument.AssertNotNull(azureSubscriptionIds, nameof(azureSubscriptionIds)); + + AzureSubscriptionIds = azureSubscriptionIds.ToList(); + } + + /// Initializes a new instance of . + /// Azure Subscription Ids to be updated. + /// Keeps track of any properties unknown to the library. + internal AzureSubscriptions(IList azureSubscriptionIds, IDictionary serializedAdditionalRawData) + { + AzureSubscriptionIds = azureSubscriptionIds; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal AzureSubscriptions() + { + } + + /// Azure Subscription Ids to be updated. + public IList AzureSubscriptionIds { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs index 41954decd0b7..42364e92eec8 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructurePatch.cs @@ -55,7 +55,7 @@ public CloudExadataInfrastructurePatch() /// Initializes a new instance of . /// CloudExadataInfrastructure zones. /// Resource tags. - /// The updatable properties of the CloudExadataInfrastructure. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal CloudExadataInfrastructurePatch(IList zones, IDictionary tags, CloudExadataInfrastructureUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -69,7 +69,7 @@ internal CloudExadataInfrastructurePatch(IList zones, IDictionary Zones { get; } /// Resource tags. public IDictionary Tags { get; } - /// The updatable properties of the CloudExadataInfrastructure. + /// The resource-specific properties for this resource. public CloudExadataInfrastructureUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.Serialization.cs index 036af9e9fcf4..40ada28997e8 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.Serialization.cs @@ -34,6 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CloudExadataInfrastructureProperties)} does not support writing '{format}' format."); } + if (options.Format != "W" && Optional.IsCollectionDefined(DefinedFileSystemConfiguration)) + { + writer.WritePropertyName("definedFileSystemConfiguration"u8); + writer.WriteStartArray(); + foreach (var item in DefinedFileSystemConfiguration) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (options.Format != "W" && Optional.IsDefined(Ocid)) { writer.WritePropertyName("ocid"u8); @@ -188,6 +198,21 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("monthlyStorageServerVersion"u8); writer.WriteStringValue(MonthlyStorageServerVersion); } + if (Optional.IsDefined(DatabaseServerType)) + { + writer.WritePropertyName("databaseServerType"u8); + writer.WriteStringValue(DatabaseServerType); + } + if (Optional.IsDefined(StorageServerType)) + { + writer.WritePropertyName("storageServerType"u8); + writer.WriteStringValue(StorageServerType); + } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -225,6 +250,7 @@ internal static CloudExadataInfrastructureProperties DeserializeCloudExadataInfr { return null; } + IReadOnlyList definedFileSystemConfiguration = default; ResourceIdentifier ocid = default; int? computeCount = default; int? storageCount = default; @@ -256,10 +282,27 @@ internal static CloudExadataInfrastructureProperties DeserializeCloudExadataInfr ResourceIdentifier nextMaintenanceRunId = default; string monthlyDBServerVersion = default; string monthlyStorageServerVersion = default; + string databaseServerType = default; + string storageServerType = default; + AutonomousDatabaseComputeModel? computeModel = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("definedFileSystemConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.DefinedFileSystemConfiguration.DeserializeDefinedFileSystemConfiguration(item, options)); + } + definedFileSystemConfiguration = array; + continue; + } if (property.NameEquals("ocid"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -516,6 +559,25 @@ internal static CloudExadataInfrastructureProperties DeserializeCloudExadataInfr monthlyStorageServerVersion = property.Value.GetString(); continue; } + if (property.NameEquals("databaseServerType"u8)) + { + databaseServerType = property.Value.GetString(); + continue; + } + if (property.NameEquals("storageServerType"u8)) + { + storageServerType = property.Value.GetString(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new AutonomousDatabaseComputeModel(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -523,6 +585,7 @@ internal static CloudExadataInfrastructureProperties DeserializeCloudExadataInfr } serializedAdditionalRawData = rawDataDictionary; return new CloudExadataInfrastructureProperties( + definedFileSystemConfiguration ?? new ChangeTrackingList(), ocid, computeCount, storageCount, @@ -554,6 +617,9 @@ internal static CloudExadataInfrastructureProperties DeserializeCloudExadataInfr nextMaintenanceRunId, monthlyDBServerVersion, monthlyStorageServerVersion, + databaseServerType, + storageServerType, + computeModel, serializedAdditionalRawData); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.cs index 25efe8483fb4..51d32be2a1be 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudExadataInfrastructureProperties.cs @@ -55,12 +55,14 @@ public CloudExadataInfrastructureProperties(string shape, string displayName) Argument.AssertNotNull(shape, nameof(shape)); Argument.AssertNotNull(displayName, nameof(displayName)); + DefinedFileSystemConfiguration = new ChangeTrackingList(); CustomerContacts = new ChangeTrackingList(); Shape = shape; DisplayName = displayName; } /// Initializes a new instance of . + /// Defined file system configurations. /// Exadata infra ocid. /// The number of compute servers for the cloud Exadata infrastructure. /// The number of storage servers for the cloud Exadata infrastructure. @@ -92,9 +94,13 @@ public CloudExadataInfrastructureProperties(string shape, string displayName) /// The OCID of the next maintenance run. /// Monthly Db Server version. /// Monthly Storage Server version. + /// The database server model type of the cloud Exadata infrastructure resource. + /// The storage server model type of the cloud Exadata infrastructure resource. + /// The compute model of the Exadata Infrastructure. /// Keeps track of any properties unknown to the library. - internal CloudExadataInfrastructureProperties(ResourceIdentifier ocid, int? computeCount, int? storageCount, int? totalStorageSizeInGbs, int? availableStorageSizeInGbs, DateTimeOffset? createdOn, string lifecycleDetails, OracleDatabaseMaintenanceWindow maintenanceWindow, EstimatedPatchingTime estimatedPatchingTime, IList customerContacts, OracleDatabaseProvisioningState? provisioningState, CloudExadataInfrastructureLifecycleState? lifecycleState, string shape, Uri ociUri, int? cpuCount, int? maxCpuCount, int? memorySizeInGbs, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, int? maxDBNodeStorageSizeInGbs, double? dataStorageSizeInTbs, double? maxDataStorageInTbs, string dbServerVersion, string storageServerVersion, int? activatedStorageCount, int? additionalStorageCount, string displayName, ResourceIdentifier lastMaintenanceRunId, ResourceIdentifier nextMaintenanceRunId, string monthlyDBServerVersion, string monthlyStorageServerVersion, IDictionary serializedAdditionalRawData) + internal CloudExadataInfrastructureProperties(IReadOnlyList definedFileSystemConfiguration, ResourceIdentifier ocid, int? computeCount, int? storageCount, int? totalStorageSizeInGbs, int? availableStorageSizeInGbs, DateTimeOffset? createdOn, string lifecycleDetails, OracleDatabaseMaintenanceWindow maintenanceWindow, EstimatedPatchingTime estimatedPatchingTime, IList customerContacts, OracleDatabaseProvisioningState? provisioningState, CloudExadataInfrastructureLifecycleState? lifecycleState, string shape, Uri ociUri, int? cpuCount, int? maxCpuCount, int? memorySizeInGbs, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, int? maxDBNodeStorageSizeInGbs, double? dataStorageSizeInTbs, double? maxDataStorageInTbs, string dbServerVersion, string storageServerVersion, int? activatedStorageCount, int? additionalStorageCount, string displayName, ResourceIdentifier lastMaintenanceRunId, ResourceIdentifier nextMaintenanceRunId, string monthlyDBServerVersion, string monthlyStorageServerVersion, string databaseServerType, string storageServerType, AutonomousDatabaseComputeModel? computeModel, IDictionary serializedAdditionalRawData) { + DefinedFileSystemConfiguration = definedFileSystemConfiguration; Ocid = ocid; ComputeCount = computeCount; StorageCount = storageCount; @@ -126,6 +132,9 @@ internal CloudExadataInfrastructureProperties(ResourceIdentifier ocid, int? comp NextMaintenanceRunId = nextMaintenanceRunId; MonthlyDBServerVersion = monthlyDBServerVersion; MonthlyStorageServerVersion = monthlyStorageServerVersion; + DatabaseServerType = databaseServerType; + StorageServerType = storageServerType; + ComputeModel = computeModel; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -134,6 +143,8 @@ internal CloudExadataInfrastructureProperties() { } + /// Defined file system configurations. + public IReadOnlyList DefinedFileSystemConfiguration { get; } /// Exadata infra ocid. public ResourceIdentifier Ocid { get; } /// The number of compute servers for the cloud Exadata infrastructure. @@ -196,5 +207,11 @@ internal CloudExadataInfrastructureProperties() public string MonthlyDBServerVersion { get; } /// Monthly Storage Server version. public string MonthlyStorageServerVersion { get; } + /// The database server model type of the cloud Exadata infrastructure resource. + public string DatabaseServerType { get; set; } + /// The storage server model type of the cloud Exadata infrastructure resource. + public string StorageServerType { get; set; } + /// The compute model of the Exadata Infrastructure. + public AutonomousDatabaseComputeModel? ComputeModel { get; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs index c9090c53514d..1709cfcaa64b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.Serialization.cs @@ -34,116 +34,101 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(CloudVmClusterDBNodeProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("ocid"u8); - writer.WriteStringValue(Ocid); - } - if (options.Format != "W" && Optional.IsDefined(AdditionalDetails)) + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + if (Optional.IsDefined(AdditionalDetails)) { writer.WritePropertyName("additionalDetails"u8); writer.WriteStringValue(AdditionalDetails); } - if (options.Format != "W" && Optional.IsDefined(BackupIPId)) + if (Optional.IsDefined(BackupIPId)) { writer.WritePropertyName("backupIpId"u8); writer.WriteStringValue(BackupIPId); } - if (options.Format != "W" && Optional.IsDefined(BackupVnic2Id)) + if (Optional.IsDefined(BackupVnic2Id)) { writer.WritePropertyName("backupVnic2Id"u8); writer.WriteStringValue(BackupVnic2Id); } - if (options.Format != "W" && Optional.IsDefined(BackupVnicId)) + if (Optional.IsDefined(BackupVnicId)) { writer.WritePropertyName("backupVnicId"u8); writer.WriteStringValue(BackupVnicId); } - if (options.Format != "W" && Optional.IsDefined(CpuCoreCount)) + if (Optional.IsDefined(CpuCoreCount)) { writer.WritePropertyName("cpuCoreCount"u8); writer.WriteNumberValue(CpuCoreCount.Value); } - if (options.Format != "W" && Optional.IsDefined(DBNodeStorageSizeInGbs)) + if (Optional.IsDefined(DBNodeStorageSizeInGbs)) { writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); writer.WriteNumberValue(DBNodeStorageSizeInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(DBServerId)) + if (Optional.IsDefined(DBServerId)) { writer.WritePropertyName("dbServerId"u8); writer.WriteStringValue(DBServerId); } - if (options.Format != "W") - { - writer.WritePropertyName("dbSystemId"u8); - writer.WriteStringValue(DBSystemId); - } - if (options.Format != "W" && Optional.IsDefined(FaultDomain)) + writer.WritePropertyName("dbSystemId"u8); + writer.WriteStringValue(DBSystemId); + if (Optional.IsDefined(FaultDomain)) { writer.WritePropertyName("faultDomain"u8); writer.WriteStringValue(FaultDomain); } - if (options.Format != "W" && Optional.IsDefined(HostIPId)) + if (Optional.IsDefined(HostIPId)) { writer.WritePropertyName("hostIpId"u8); writer.WriteStringValue(HostIPId); } - if (options.Format != "W" && Optional.IsDefined(Hostname)) + if (Optional.IsDefined(Hostname)) { writer.WritePropertyName("hostname"u8); writer.WriteStringValue(Hostname); } - if (options.Format != "W" && Optional.IsDefined(LifecycleState)) - { - writer.WritePropertyName("lifecycleState"u8); - writer.WriteStringValue(LifecycleState.Value.ToString()); - } - if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.ToString()); + if (Optional.IsDefined(LifecycleDetails)) { writer.WritePropertyName("lifecycleDetails"u8); writer.WriteStringValue(LifecycleDetails); } - if (options.Format != "W" && Optional.IsDefined(MaintenanceType)) + if (Optional.IsDefined(MaintenanceType)) { writer.WritePropertyName("maintenanceType"u8); writer.WriteStringValue(MaintenanceType.Value.ToString()); } - if (options.Format != "W" && Optional.IsDefined(MemorySizeInGbs)) + if (Optional.IsDefined(MemorySizeInGbs)) { writer.WritePropertyName("memorySizeInGbs"u8); writer.WriteNumberValue(MemorySizeInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(SoftwareStorageSizeInGb)) + if (Optional.IsDefined(SoftwareStorageSizeInGb)) { writer.WritePropertyName("softwareStorageSizeInGb"u8); writer.WriteNumberValue(SoftwareStorageSizeInGb.Value); } - if (options.Format != "W" && Optional.IsDefined(TimeCreated)) - { - writer.WritePropertyName("timeCreated"u8); - writer.WriteStringValue(TimeCreated.Value, "O"); - } - if (options.Format != "W" && Optional.IsDefined(TimeMaintenanceWindowEnd)) + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(TimeCreated, "O"); + if (Optional.IsDefined(TimeMaintenanceWindowEnd)) { writer.WritePropertyName("timeMaintenanceWindowEnd"u8); writer.WriteStringValue(TimeMaintenanceWindowEnd.Value, "O"); } - if (options.Format != "W" && Optional.IsDefined(TimeMaintenanceWindowStart)) + if (Optional.IsDefined(TimeMaintenanceWindowStart)) { writer.WritePropertyName("timeMaintenanceWindowStart"u8); writer.WriteStringValue(TimeMaintenanceWindowStart.Value, "O"); } - if (options.Format != "W" && Optional.IsDefined(Vnic2Id)) + if (Optional.IsDefined(Vnic2Id)) { writer.WritePropertyName("vnic2Id"u8); writer.WriteStringValue(Vnic2Id); } - if (options.Format != "W" && Optional.IsDefined(VnicId)) - { - writer.WritePropertyName("vnicId"u8); - writer.WriteStringValue(VnicId); - } + writer.WritePropertyName("vnicId"u8); + writer.WriteStringValue(VnicId); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -198,12 +183,12 @@ internal static CloudVmClusterDBNodeProperties DeserializeCloudVmClusterDBNodePr string faultDomain = default; ResourceIdentifier hostIPId = default; string hostname = default; - DBNodeProvisioningState? lifecycleState = default; + DBNodeProvisioningState lifecycleState = default; string lifecycleDetails = default; DBNodeMaintenanceType? maintenanceType = default; int? memorySizeInGbs = default; int? softwareStorageSizeInGb = default; - DateTimeOffset? timeCreated = default; + DateTimeOffset timeCreated = default; DateTimeOffset? timeMaintenanceWindowEnd = default; DateTimeOffset? timeMaintenanceWindowStart = default; ResourceIdentifier vnic2Id = default; @@ -303,10 +288,6 @@ internal static CloudVmClusterDBNodeProperties DeserializeCloudVmClusterDBNodePr } if (property.NameEquals("lifecycleState"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } lifecycleState = new DBNodeProvisioningState(property.Value.GetString()); continue; } @@ -344,10 +325,6 @@ internal static CloudVmClusterDBNodeProperties DeserializeCloudVmClusterDBNodePr } if (property.NameEquals("timeCreated"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } timeCreated = property.Value.GetDateTimeOffset("O"); continue; } @@ -380,10 +357,6 @@ internal static CloudVmClusterDBNodeProperties DeserializeCloudVmClusterDBNodePr } if (property.NameEquals("vnicId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } vnicId = new ResourceIdentifier(property.Value.GetString()); continue; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs index b4c580563281..047f562672bb 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterDBNodeProperties.cs @@ -49,10 +49,21 @@ public partial class CloudVmClusterDBNodeProperties /// Initializes a new instance of . /// DbNode OCID. /// The OCID of the DB system. - public CloudVmClusterDBNodeProperties(ResourceIdentifier ocid, ResourceIdentifier dbSystemId) + /// The current state of the database node. + /// The date and time that the database node was created. + /// The OCID of the VNIC. + /// , or is null. + public CloudVmClusterDBNodeProperties(ResourceIdentifier ocid, ResourceIdentifier dbSystemId, DBNodeProvisioningState lifecycleState, DateTimeOffset timeCreated, ResourceIdentifier vnicId) { + Argument.AssertNotNull(ocid, nameof(ocid)); + Argument.AssertNotNull(dbSystemId, nameof(dbSystemId)); + Argument.AssertNotNull(vnicId, nameof(vnicId)); + Ocid = ocid; DBSystemId = dbSystemId; + LifecycleState = lifecycleState; + TimeCreated = timeCreated; + VnicId = vnicId; } /// Initializes a new instance of . @@ -80,7 +91,7 @@ public CloudVmClusterDBNodeProperties(ResourceIdentifier ocid, ResourceIdentifie /// The OCID of the VNIC. /// Azure resource provisioning state. /// Keeps track of any properties unknown to the library. - internal CloudVmClusterDBNodeProperties(ResourceIdentifier ocid, string additionalDetails, ResourceIdentifier backupIPId, ResourceIdentifier backupVnic2Id, ResourceIdentifier backupVnicId, int? cpuCoreCount, int? dbNodeStorageSizeInGbs, ResourceIdentifier dbServerId, ResourceIdentifier dbSystemId, string faultDomain, ResourceIdentifier hostIPId, string hostname, DBNodeProvisioningState? lifecycleState, string lifecycleDetails, DBNodeMaintenanceType? maintenanceType, int? memorySizeInGbs, int? softwareStorageSizeInGb, DateTimeOffset? timeCreated, DateTimeOffset? timeMaintenanceWindowEnd, DateTimeOffset? timeMaintenanceWindowStart, ResourceIdentifier vnic2Id, ResourceIdentifier vnicId, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal CloudVmClusterDBNodeProperties(ResourceIdentifier ocid, string additionalDetails, ResourceIdentifier backupIPId, ResourceIdentifier backupVnic2Id, ResourceIdentifier backupVnicId, int? cpuCoreCount, int? dbNodeStorageSizeInGbs, ResourceIdentifier dbServerId, ResourceIdentifier dbSystemId, string faultDomain, ResourceIdentifier hostIPId, string hostname, DBNodeProvisioningState lifecycleState, string lifecycleDetails, DBNodeMaintenanceType? maintenanceType, int? memorySizeInGbs, int? softwareStorageSizeInGb, DateTimeOffset timeCreated, DateTimeOffset? timeMaintenanceWindowEnd, DateTimeOffset? timeMaintenanceWindowStart, ResourceIdentifier vnic2Id, ResourceIdentifier vnicId, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { Ocid = ocid; AdditionalDetails = additionalDetails; @@ -114,49 +125,49 @@ internal CloudVmClusterDBNodeProperties() } /// DbNode OCID. - public ResourceIdentifier Ocid { get; } + public ResourceIdentifier Ocid { get; set; } /// Additional information about the planned maintenance. - public string AdditionalDetails { get; } + public string AdditionalDetails { get; set; } /// The OCID of the backup IP address associated with the database node. - public ResourceIdentifier BackupIPId { get; } + public ResourceIdentifier BackupIPId { get; set; } /// The OCID of the second backup VNIC. - public ResourceIdentifier BackupVnic2Id { get; } + public ResourceIdentifier BackupVnic2Id { get; set; } /// The OCID of the backup VNIC. - public ResourceIdentifier BackupVnicId { get; } + public ResourceIdentifier BackupVnicId { get; set; } /// The number of CPU cores enabled on the Db node. - public int? CpuCoreCount { get; } + public int? CpuCoreCount { get; set; } /// The allocated local node storage in GBs on the Db node. - public int? DBNodeStorageSizeInGbs { get; } + public int? DBNodeStorageSizeInGbs { get; set; } /// The OCID of the Exacc Db server associated with the database node. - public ResourceIdentifier DBServerId { get; } + public ResourceIdentifier DBServerId { get; set; } /// The OCID of the DB system. - public ResourceIdentifier DBSystemId { get; } + public ResourceIdentifier DBSystemId { get; set; } /// The name of the Fault Domain the instance is contained in. - public string FaultDomain { get; } + public string FaultDomain { get; set; } /// The OCID of the host IP address associated with the database node. - public ResourceIdentifier HostIPId { get; } + public ResourceIdentifier HostIPId { get; set; } /// The host name for the database node. - public string Hostname { get; } + public string Hostname { get; set; } /// The current state of the database node. - public DBNodeProvisioningState? LifecycleState { get; } + public DBNodeProvisioningState LifecycleState { get; set; } /// Lifecycle details of Db Node. - public string LifecycleDetails { get; } + public string LifecycleDetails { get; set; } /// The type of database node maintenance. - public DBNodeMaintenanceType? MaintenanceType { get; } + public DBNodeMaintenanceType? MaintenanceType { get; set; } /// The allocated memory in GBs on the Db node. - public int? MemorySizeInGbs { get; } + public int? MemorySizeInGbs { get; set; } /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. - public int? SoftwareStorageSizeInGb { get; } + public int? SoftwareStorageSizeInGb { get; set; } /// The date and time that the database node was created. - public DateTimeOffset? TimeCreated { get; } + public DateTimeOffset TimeCreated { get; set; } /// End date and time of maintenance window. - public DateTimeOffset? TimeMaintenanceWindowEnd { get; } + public DateTimeOffset? TimeMaintenanceWindowEnd { get; set; } /// Start date and time of maintenance window. - public DateTimeOffset? TimeMaintenanceWindowStart { get; } + public DateTimeOffset? TimeMaintenanceWindowStart { get; set; } /// The OCID of the second VNIC. - public ResourceIdentifier Vnic2Id { get; } + public ResourceIdentifier Vnic2Id { get; set; } /// The OCID of the VNIC. - public ResourceIdentifier VnicId { get; } + public ResourceIdentifier VnicId { get; set; } /// Azure resource provisioning state. public OracleDatabaseResourceProvisioningState? ProvisioningState { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs index 32879c816a6a..67473a1a7c53 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterPatch.cs @@ -53,7 +53,7 @@ public CloudVmClusterPatch() /// Initializes a new instance of . /// Resource tags. - /// The updatable properties of the CloudVmCluster. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal CloudVmClusterPatch(IDictionary tags, CloudVmClusterUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -64,7 +64,7 @@ internal CloudVmClusterPatch(IDictionary tags, CloudVmClusterUpd /// Resource tags. public IDictionary Tags { get; } - /// The updatable properties of the CloudVmCluster. + /// The resource-specific properties for this resource. public CloudVmClusterUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.Serialization.cs index 9298c1d92e4c..43ab14008f1c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.Serialization.cs @@ -54,6 +54,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("storageSizeInGbs"u8); writer.WriteNumberValue(StorageSizeInGbs.Value); } + if (Optional.IsCollectionDefined(FileSystemConfigurationDetails)) + { + writer.WritePropertyName("fileSystemConfigurationDetails"u8); + writer.WriteStartArray(); + foreach (var item in FileSystemConfigurationDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DataStorageSizeInTbs)) { writer.WritePropertyName("dataStorageSizeInTbs"u8); @@ -290,6 +300,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("subnetOcid"u8); writer.WriteStringValue(SubnetOcid); } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -331,6 +346,7 @@ internal static CloudVmClusterProperties DeserializeCloudVmClusterProperties(Jso long? listenerPort = default; int? nodeCount = default; int? storageSizeInGbs = default; + IList fileSystemConfigurationDetails = default; double? dataStorageSizeInTbs = default; int? dbNodeStorageSizeInGbs = default; int? memorySizeInGbs = default; @@ -375,6 +391,7 @@ internal static CloudVmClusterProperties DeserializeCloudVmClusterProperties(Jso IList dbServers = default; ResourceIdentifier compartmentId = default; ResourceIdentifier subnetOcid = default; + AutonomousDatabaseComputeModel? computeModel = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -415,6 +432,20 @@ internal static CloudVmClusterProperties DeserializeCloudVmClusterProperties(Jso storageSizeInGbs = property.Value.GetInt32(); continue; } + if (property.NameEquals("fileSystemConfigurationDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.FileSystemConfigurationDetails.DeserializeFileSystemConfigurationDetails(item, options)); + } + fileSystemConfigurationDetails = array; + continue; + } if (property.NameEquals("dataStorageSizeInTbs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -791,6 +822,15 @@ internal static CloudVmClusterProperties DeserializeCloudVmClusterProperties(Jso subnetOcid = new ResourceIdentifier(property.Value.GetString()); continue; } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new AutonomousDatabaseComputeModel(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -802,6 +842,7 @@ internal static CloudVmClusterProperties DeserializeCloudVmClusterProperties(Jso listenerPort, nodeCount, storageSizeInGbs, + fileSystemConfigurationDetails ?? new ChangeTrackingList(), dataStorageSizeInTbs, dbNodeStorageSizeInGbs, memorySizeInGbs, @@ -846,6 +887,7 @@ internal static CloudVmClusterProperties DeserializeCloudVmClusterProperties(Jso dbServers ?? new ChangeTrackingList(), compartmentId, subnetOcid, + computeModel, serializedAdditionalRawData); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.cs index e4d48c3dafc5..e628a6c3ac2d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterProperties.cs @@ -67,6 +67,7 @@ public CloudVmClusterProperties(string hostname, int cpuCoreCount, ResourceIdent Argument.AssertNotNull(subnetId, nameof(subnetId)); Argument.AssertNotNull(displayName, nameof(displayName)); + FileSystemConfigurationDetails = new ChangeTrackingList(); Hostname = hostname; CpuCoreCount = cpuCoreCount; CloudExadataInfrastructureId = cloudExadataInfrastructureId; @@ -87,6 +88,7 @@ public CloudVmClusterProperties(string hostname, int cpuCoreCount, ResourceIdent /// The port number configured for the listener on the cloud VM cluster. /// The number of nodes in the cloud VM cluster. /// The data disk group size to be allocated in GBs per VM. + /// Array of mount path and size. /// The data disk group size to be allocated in TBs. /// The local node storage to be allocated in GBs. /// The memory to be allocated in GBs. @@ -131,13 +133,15 @@ public CloudVmClusterProperties(string hostname, int cpuCoreCount, ResourceIdent /// The list of DB servers. /// Cluster compartmentId. /// Cluster subnet ocid. + /// The compute model of the VM Cluster. /// Keeps track of any properties unknown to the library. - internal CloudVmClusterProperties(ResourceIdentifier ocid, long? listenerPort, int? nodeCount, int? storageSizeInGbs, double? dataStorageSizeInTbs, int? dbNodeStorageSizeInGbs, int? memorySizeInGbs, DateTimeOffset? createdOn, string lifecycleDetails, string timeZone, ResourceIdentifier zoneId, string hostname, string domain, int cpuCoreCount, float? ocpuCount, string clusterName, int? dataStoragePercentage, bool? isLocalBackupEnabled, ResourceIdentifier cloudExadataInfrastructureId, bool? isSparseDiskgroupEnabled, string systemVersion, IList sshPublicKeys, OracleLicenseModel? licenseModel, CloudVmClusterDiskRedundancy? diskRedundancy, IReadOnlyList scanIPIds, IReadOnlyList vipIds, string scanDnsName, int? scanListenerPortTcp, int? scanListenerPortTcpSsl, ResourceIdentifier scanDnsRecordId, string shape, OracleDatabaseProvisioningState? provisioningState, CloudVmClusterLifecycleState? lifecycleState, ResourceIdentifier vnetId, string giVersion, Uri ociUri, Uri nsgUri, ResourceIdentifier subnetId, string backupSubnetCidr, IList nsgCidrs, DiagnosticCollectionConfig dataCollectionOptions, string displayName, IList computeNodes, ExadataIormConfig iormConfigCache, ResourceIdentifier lastUpdateHistoryEntryId, IList dbServers, ResourceIdentifier compartmentId, ResourceIdentifier subnetOcid, IDictionary serializedAdditionalRawData) + internal CloudVmClusterProperties(ResourceIdentifier ocid, long? listenerPort, int? nodeCount, int? storageSizeInGbs, IList fileSystemConfigurationDetails, double? dataStorageSizeInTbs, int? dbNodeStorageSizeInGbs, int? memorySizeInGbs, DateTimeOffset? createdOn, string lifecycleDetails, string timeZone, ResourceIdentifier zoneId, string hostname, string domain, int cpuCoreCount, float? ocpuCount, string clusterName, int? dataStoragePercentage, bool? isLocalBackupEnabled, ResourceIdentifier cloudExadataInfrastructureId, bool? isSparseDiskgroupEnabled, string systemVersion, IList sshPublicKeys, OracleLicenseModel? licenseModel, CloudVmClusterDiskRedundancy? diskRedundancy, IReadOnlyList scanIPIds, IReadOnlyList vipIds, string scanDnsName, int? scanListenerPortTcp, int? scanListenerPortTcpSsl, ResourceIdentifier scanDnsRecordId, string shape, OracleDatabaseProvisioningState? provisioningState, CloudVmClusterLifecycleState? lifecycleState, ResourceIdentifier vnetId, string giVersion, Uri ociUri, Uri nsgUri, ResourceIdentifier subnetId, string backupSubnetCidr, IList nsgCidrs, DiagnosticCollectionConfig dataCollectionOptions, string displayName, IList computeNodes, ExadataIormConfig iormConfigCache, ResourceIdentifier lastUpdateHistoryEntryId, IList dbServers, ResourceIdentifier compartmentId, ResourceIdentifier subnetOcid, AutonomousDatabaseComputeModel? computeModel, IDictionary serializedAdditionalRawData) { Ocid = ocid; ListenerPort = listenerPort; NodeCount = nodeCount; StorageSizeInGbs = storageSizeInGbs; + FileSystemConfigurationDetails = fileSystemConfigurationDetails; DataStorageSizeInTbs = dataStorageSizeInTbs; DBNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; MemorySizeInGbs = memorySizeInGbs; @@ -182,6 +186,7 @@ internal CloudVmClusterProperties(ResourceIdentifier ocid, long? listenerPort, i DBServers = dbServers; CompartmentId = compartmentId; SubnetOcid = subnetOcid; + ComputeModel = computeModel; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -198,6 +203,8 @@ internal CloudVmClusterProperties() public int? NodeCount { get; } /// The data disk group size to be allocated in GBs per VM. public int? StorageSizeInGbs { get; set; } + /// Array of mount path and size. + public IList FileSystemConfigurationDetails { get; } /// The data disk group size to be allocated in TBs. public double? DataStorageSizeInTbs { get; set; } /// The local node storage to be allocated in GBs. @@ -286,5 +293,7 @@ internal CloudVmClusterProperties() public ResourceIdentifier CompartmentId { get; } /// Cluster subnet ocid. public ResourceIdentifier SubnetOcid { get; } + /// The compute model of the VM Cluster. + public AutonomousDatabaseComputeModel? ComputeModel { get; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.Serialization.cs index e960f3eaf7d9..5b85e17ac9a9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.Serialization.cs @@ -39,6 +39,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("storageSizeInGbs"u8); writer.WriteNumberValue(StorageSizeInGbs.Value); } + if (Optional.IsCollectionDefined(FileSystemConfigurationDetails)) + { + writer.WritePropertyName("fileSystemConfigurationDetails"u8); + writer.WriteStartArray(); + foreach (var item in FileSystemConfigurationDetails) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(DataStorageSizeInTbs)) { writer.WritePropertyName("dataStorageSizeInTbs"u8); @@ -142,6 +152,7 @@ internal static CloudVmClusterUpdateProperties DeserializeCloudVmClusterUpdatePr return null; } int? storageSizeInGbs = default; + IList fileSystemConfigurationDetails = default; double? dataStorageSizeInTbs = default; int? dbNodeStorageSizeInGbs = default; int? memorySizeInGbs = default; @@ -165,6 +176,20 @@ internal static CloudVmClusterUpdateProperties DeserializeCloudVmClusterUpdatePr storageSizeInGbs = property.Value.GetInt32(); continue; } + if (property.NameEquals("fileSystemConfigurationDetails"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.FileSystemConfigurationDetails.DeserializeFileSystemConfigurationDetails(item, options)); + } + fileSystemConfigurationDetails = array; + continue; + } if (property.NameEquals("dataStorageSizeInTbs"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -276,6 +301,7 @@ internal static CloudVmClusterUpdateProperties DeserializeCloudVmClusterUpdatePr serializedAdditionalRawData = rawDataDictionary; return new CloudVmClusterUpdateProperties( storageSizeInGbs, + fileSystemConfigurationDetails ?? new ChangeTrackingList(), dataStorageSizeInTbs, dbNodeStorageSizeInGbs, memorySizeInGbs, diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.cs index b4d331ff46a0..3526f7c14720 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/CloudVmClusterUpdateProperties.cs @@ -49,12 +49,14 @@ public partial class CloudVmClusterUpdateProperties /// Initializes a new instance of . public CloudVmClusterUpdateProperties() { + FileSystemConfigurationDetails = new ChangeTrackingList(); SshPublicKeys = new ChangeTrackingList(); ComputeNodes = new ChangeTrackingList(); } /// Initializes a new instance of . /// The data disk group size to be allocated in GBs per VM. + /// Array of mount path and size. /// The data disk group size to be allocated in TBs. /// The local node storage to be allocated in GBs. /// The memory to be allocated in GBs. @@ -66,9 +68,10 @@ public CloudVmClusterUpdateProperties() /// Display Name. /// The list of compute servers to be added to the cloud VM cluster. /// Keeps track of any properties unknown to the library. - internal CloudVmClusterUpdateProperties(int? storageSizeInGbs, double? dataStorageSizeInTbs, int? dbNodeStorageSizeInGbs, int? memorySizeInGbs, int? cpuCoreCount, float? ocpuCount, IList sshPublicKeys, OracleLicenseModel? licenseModel, DiagnosticCollectionConfig dataCollectionOptions, string displayName, IList computeNodes, IDictionary serializedAdditionalRawData) + internal CloudVmClusterUpdateProperties(int? storageSizeInGbs, IList fileSystemConfigurationDetails, double? dataStorageSizeInTbs, int? dbNodeStorageSizeInGbs, int? memorySizeInGbs, int? cpuCoreCount, float? ocpuCount, IList sshPublicKeys, OracleLicenseModel? licenseModel, DiagnosticCollectionConfig dataCollectionOptions, string displayName, IList computeNodes, IDictionary serializedAdditionalRawData) { StorageSizeInGbs = storageSizeInGbs; + FileSystemConfigurationDetails = fileSystemConfigurationDetails; DataStorageSizeInTbs = dataStorageSizeInTbs; DBNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; MemorySizeInGbs = memorySizeInGbs; @@ -84,6 +87,8 @@ internal CloudVmClusterUpdateProperties(int? storageSizeInGbs, double? dataStora /// The data disk group size to be allocated in GBs per VM. public int? StorageSizeInGbs { get; set; } + /// Array of mount path and size. + public IList FileSystemConfigurationDetails { get; } /// The data disk group size to be allocated in TBs. public double? DataStorageSizeInTbs { get; set; } /// The local node storage to be allocated in GBs. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBActionResponse.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBActionResponse.Serialization.cs new file mode 100644 index 000000000000..11b98780e762 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBActionResponse.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.OracleDatabase.Models +{ + public partial class DBActionResponse : 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(DBActionResponse)} 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 + } + } + } + + DBActionResponse 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(DBActionResponse)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDBActionResponse(document.RootElement, options); + } + + internal static DBActionResponse DeserializeDBActionResponse(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OracleDatabaseProvisioningState? 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 OracleDatabaseProvisioningState(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DBActionResponse(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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(DBActionResponse)} does not support writing '{options.Format}' format."); + } + } + + DBActionResponse 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 DeserializeDBActionResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DBActionResponse)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupUpdateProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBActionResponse.cs similarity index 68% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupUpdateProperties.cs rename to sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBActionResponse.cs index 3505e610363b..135139f4109c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupUpdateProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBActionResponse.cs @@ -10,8 +10,8 @@ namespace Azure.ResourceManager.OracleDatabase.Models { - /// The updatable properties of the AutonomousDatabaseBackup. - internal partial class AutonomousDatabaseBackupUpdateProperties + /// ExascaleDbNode action response. + public partial class DBActionResponse { /// /// Keeps track of any properties unknown to the library. @@ -45,21 +45,21 @@ internal partial class AutonomousDatabaseBackupUpdateProperties /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public AutonomousDatabaseBackupUpdateProperties() + /// Initializes a new instance of . + internal DBActionResponse() { } - /// Initializes a new instance of . - /// Retention period, in days, for long-term backups. + /// Initializes a new instance of . + /// ExascaleDbNode provisioning state. /// Keeps track of any properties unknown to the library. - internal AutonomousDatabaseBackupUpdateProperties(int? retentionPeriodInDays, IDictionary serializedAdditionalRawData) + internal DBActionResponse(OracleDatabaseProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { - RetentionPeriodInDays = retentionPeriodInDays; + ProvisioningState = provisioningState; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Retention period, in days, for long-term backups. - public int? RetentionPeriodInDays { get; set; } + /// ExascaleDbNode provisioning state. + public OracleDatabaseProvisioningState? ProvisioningState { get; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBNodeDetails.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBNodeDetails.Serialization.cs new file mode 100644 index 000000000000..414921cb9bc2 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBNodeDetails.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.OracleDatabase.Models +{ + public partial class DBNodeDetails : 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(DBNodeDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("dbNodeId"u8); + writer.WriteStringValue(DBNodeId); + 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 + } + } + } + + DBNodeDetails 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(DBNodeDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDBNodeDetails(document.RootElement, options); + } + + internal static DBNodeDetails DeserializeDBNodeDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier dbNodeId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbNodeId"u8)) + { + dbNodeId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DBNodeDetails(dbNodeId, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(DBNodeDetails)} does not support writing '{options.Format}' format."); + } + } + + DBNodeDetails 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 DeserializeDBNodeDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DBNodeDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBNodeDetails.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBNodeDetails.cs new file mode 100644 index 000000000000..3b76392fb9bc --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DBNodeDetails.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.OracleDatabase.Models +{ + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + public partial class DBNodeDetails + { + /// + /// 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 . + /// Exascale DbNode Azure Resource ID. + /// is null. + public DBNodeDetails(ResourceIdentifier dbNodeId) + { + Argument.AssertNotNull(dbNodeId, nameof(dbNodeId)); + + DBNodeId = dbNodeId; + } + + /// Initializes a new instance of . + /// Exascale DbNode Azure Resource ID. + /// Keeps track of any properties unknown to the library. + internal DBNodeDetails(ResourceIdentifier dbNodeId, IDictionary serializedAdditionalRawData) + { + DBNodeId = dbNodeId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal DBNodeDetails() + { + } + + /// Exascale DbNode Azure Resource ID. + public ResourceIdentifier DBNodeId { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.Serialization.cs new file mode 100644 index 000000000000..44a9b2db4d0f --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.Serialization.cs @@ -0,0 +1,174 @@ +// 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.OracleDatabase.Models +{ + public partial class DefinedFileSystemConfiguration : 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(DefinedFileSystemConfiguration)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(IsBackupPartition)) + { + writer.WritePropertyName("isBackupPartition"u8); + writer.WriteBooleanValue(IsBackupPartition.Value); + } + if (Optional.IsDefined(IsResizable)) + { + writer.WritePropertyName("isResizable"u8); + writer.WriteBooleanValue(IsResizable.Value); + } + if (Optional.IsDefined(MinSizeGb)) + { + writer.WritePropertyName("minSizeGb"u8); + writer.WriteNumberValue(MinSizeGb.Value); + } + if (Optional.IsDefined(MountPoint)) + { + writer.WritePropertyName("mountPoint"u8); + writer.WriteStringValue(MountPoint); + } + 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 + } + } + } + + DefinedFileSystemConfiguration 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(DefinedFileSystemConfiguration)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDefinedFileSystemConfiguration(document.RootElement, options); + } + + internal static DefinedFileSystemConfiguration DeserializeDefinedFileSystemConfiguration(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? isBackupPartition = default; + bool? isResizable = default; + int? minSizeGb = default; + string mountPoint = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("isBackupPartition"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isBackupPartition = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isResizable"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isResizable = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("minSizeGb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minSizeGb = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("mountPoint"u8)) + { + mountPoint = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DefinedFileSystemConfiguration(isBackupPartition, isResizable, minSizeGb, mountPoint, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(DefinedFileSystemConfiguration)} does not support writing '{options.Format}' format."); + } + } + + DefinedFileSystemConfiguration 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 DeserializeDefinedFileSystemConfiguration(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DefinedFileSystemConfiguration)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.cs new file mode 100644 index 000000000000..a1adfc28521a --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DefinedFileSystemConfiguration.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Predefined configurations for the file system. + public partial class DefinedFileSystemConfiguration + { + /// + /// 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 . + internal DefinedFileSystemConfiguration() + { + } + + /// Initializes a new instance of . + /// Checks if the data can be backed up. + /// Checks if the mount path is resizable. + /// Minimum size of mount path in Gb. + /// Mount path for the file system. + /// Keeps track of any properties unknown to the library. + internal DefinedFileSystemConfiguration(bool? isBackupPartition, bool? isResizable, int? minSizeGb, string mountPoint, IDictionary serializedAdditionalRawData) + { + IsBackupPartition = isBackupPartition; + IsResizable = isResizable; + MinSizeGb = minSizeGb; + MountPoint = mountPoint; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Checks if the data can be backed up. + public bool? IsBackupPartition { get; } + /// Checks if the mount path is resizable. + public bool? IsResizable { get; } + /// Minimum size of mount path in Gb. + public int? MinSizeGb { get; } + /// Mount path for the file system. + public string MountPoint { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.Serialization.cs new file mode 100644 index 000000000000..81ab75edf0e2 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.Serialization.cs @@ -0,0 +1,178 @@ +// 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.OracleDatabase.Models +{ + public partial class DisasterRecoveryConfigurationDetails : 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(DisasterRecoveryConfigurationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(DisasterRecoveryType)) + { + writer.WritePropertyName("disasterRecoveryType"u8); + writer.WriteStringValue(DisasterRecoveryType.Value.ToString()); + } + if (Optional.IsDefined(TimeSnapshotStandbyEnabledTill)) + { + writer.WritePropertyName("timeSnapshotStandbyEnabledTill"u8); + writer.WriteStringValue(TimeSnapshotStandbyEnabledTill.Value, "O"); + } + if (Optional.IsDefined(IsSnapshotStandby)) + { + writer.WritePropertyName("isSnapshotStandby"u8); + writer.WriteBooleanValue(IsSnapshotStandby.Value); + } + if (Optional.IsDefined(IsReplicateAutomaticBackups)) + { + writer.WritePropertyName("isReplicateAutomaticBackups"u8); + writer.WriteBooleanValue(IsReplicateAutomaticBackups.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 + } + } + } + + DisasterRecoveryConfigurationDetails 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(DisasterRecoveryConfigurationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDisasterRecoveryConfigurationDetails(document.RootElement, options); + } + + internal static DisasterRecoveryConfigurationDetails DeserializeDisasterRecoveryConfigurationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DisasterRecoveryType? disasterRecoveryType = default; + DateTimeOffset? timeSnapshotStandbyEnabledTill = default; + bool? isSnapshotStandby = default; + bool? isReplicateAutomaticBackups = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("disasterRecoveryType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + disasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); + continue; + } + if (property.NameEquals("timeSnapshotStandbyEnabledTill"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeSnapshotStandbyEnabledTill = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("isSnapshotStandby"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isSnapshotStandby = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("isReplicateAutomaticBackups"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isReplicateAutomaticBackups = property.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new DisasterRecoveryConfigurationDetails(disasterRecoveryType, timeSnapshotStandbyEnabledTill, isSnapshotStandby, isReplicateAutomaticBackups, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(DisasterRecoveryConfigurationDetails)} does not support writing '{options.Format}' format."); + } + } + + DisasterRecoveryConfigurationDetails 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 DeserializeDisasterRecoveryConfigurationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DisasterRecoveryConfigurationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.cs new file mode 100644 index 000000000000..c018dac97a20 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/DisasterRecoveryConfigurationDetails.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Configurations of a Disaster Recovery Details. + public partial class DisasterRecoveryConfigurationDetails + { + /// + /// 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 DisasterRecoveryConfigurationDetails() + { + } + + /// Initializes a new instance of . + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database. + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// Keeps track of any properties unknown to the library. + internal DisasterRecoveryConfigurationDetails(DisasterRecoveryType? disasterRecoveryType, DateTimeOffset? timeSnapshotStandbyEnabledTill, bool? isSnapshotStandby, bool? isReplicateAutomaticBackups, IDictionary serializedAdditionalRawData) + { + DisasterRecoveryType = disasterRecoveryType; + TimeSnapshotStandbyEnabledTill = timeSnapshotStandbyEnabledTill; + IsSnapshotStandby = isSnapshotStandby; + IsReplicateAutomaticBackups = isReplicateAutomaticBackups; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + public DisasterRecoveryType? DisasterRecoveryType { get; set; } + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + public DateTimeOffset? TimeSnapshotStandbyEnabledTill { get; set; } + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database. + public bool? IsSnapshotStandby { get; set; } + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + public bool? IsReplicateAutomaticBackups { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterLifecycleState.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterLifecycleState.cs new file mode 100644 index 000000000000..e8ea2cb028ed --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterLifecycleState.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Exadata VM cluster on Exascale Infrastructure lifecycle state enum. + public readonly partial struct ExadbVmClusterLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExadbVmClusterLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string UpdatingValue = "Updating"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string MaintenanceInProgressValue = "MaintenanceInProgress"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static ExadbVmClusterLifecycleState Provisioning { get; } = new ExadbVmClusterLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static ExadbVmClusterLifecycleState Available { get; } = new ExadbVmClusterLifecycleState(AvailableValue); + /// Indicates that resource in Updating state. + public static ExadbVmClusterLifecycleState Updating { get; } = new ExadbVmClusterLifecycleState(UpdatingValue); + /// Indicates that resource in Terminating state. + public static ExadbVmClusterLifecycleState Terminating { get; } = new ExadbVmClusterLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static ExadbVmClusterLifecycleState Terminated { get; } = new ExadbVmClusterLifecycleState(TerminatedValue); + /// Indicates that resource Maintenance in progress state. + public static ExadbVmClusterLifecycleState MaintenanceInProgress { get; } = new ExadbVmClusterLifecycleState(MaintenanceInProgressValue); + /// Indicates that resource in Failed state. + public static ExadbVmClusterLifecycleState Failed { get; } = new ExadbVmClusterLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ExadbVmClusterLifecycleState left, ExadbVmClusterLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExadbVmClusterLifecycleState left, ExadbVmClusterLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExadbVmClusterLifecycleState(string value) => new ExadbVmClusterLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExadbVmClusterLifecycleState other && Equals(other); + /// + public bool Equals(ExadbVmClusterLifecycleState 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.Serialization.cs new file mode 100644 index 000000000000..539a6ae55438 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.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.OracleDatabase.Models +{ + internal partial class ExadbVmClusterListResult : 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(ExadbVmClusterListResult)} 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 + } + } + } + + ExadbVmClusterListResult 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(ExadbVmClusterListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterListResult(document.RootElement, options); + } + + internal static ExadbVmClusterListResult DeserializeExadbVmClusterListResult(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(ExadbVmClusterData.DeserializeExadbVmClusterData(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 ExadbVmClusterListResult(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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterListResult)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterListResult 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 DeserializeExadbVmClusterListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.cs new file mode 100644 index 000000000000..0b76d8b494a5 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterListResult.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.OracleDatabase.Models +{ + /// The response of a ExadbVmCluster list operation. + internal partial class ExadbVmClusterListResult + { + /// + /// 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 ExadbVmCluster items on this page. + /// is null. + internal ExadbVmClusterListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ExadbVmCluster items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterListResult() + { + } + + /// The ExadbVmCluster items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.Serialization.cs new file mode 100644 index 000000000000..d58bc1674c3f --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.Serialization.cs @@ -0,0 +1,184 @@ +// 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.OracleDatabase.Models +{ + public partial class ExadbVmClusterPatch : 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(ExadbVmClusterPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, 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 + } + } + } + + ExadbVmClusterPatch 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(ExadbVmClusterPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterPatch(document.RootElement, options); + } + + internal static ExadbVmClusterPatch DeserializeExadbVmClusterPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList zones = default; + IDictionary tags = default; + ExadbVmClusterUpdateProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("tags"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()); + } + tags = dictionary; + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ExadbVmClusterUpdateProperties.DeserializeExadbVmClusterUpdateProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterPatch(zones ?? new ChangeTrackingList(), tags ?? new ChangeTrackingDictionary(), properties, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterPatch)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterPatch 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 DeserializeExadbVmClusterPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.cs new file mode 100644 index 000000000000..7519852ffaf6 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterPatch.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.OracleDatabase.Models +{ + /// The type used for update operations of the ExadbVmCluster. + public partial class ExadbVmClusterPatch + { + /// + /// 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 ExadbVmClusterPatch() + { + Zones = new ChangeTrackingList(); + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The availability zones. + /// Resource tags. + /// The resource-specific properties for this resource. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterPatch(IList zones, IDictionary tags, ExadbVmClusterUpdateProperties properties, IDictionary serializedAdditionalRawData) + { + Zones = zones; + Tags = tags; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The availability zones. + public IList Zones { get; } + /// Resource tags. + public IDictionary Tags { get; } + /// The resource-specific properties for this resource. + internal ExadbVmClusterUpdateProperties Properties { get; set; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + public int? ExadbVmClusterUpdateNodeCount + { + get => Properties is null ? default : Properties.NodeCount; + set + { + if (Properties is null) + Properties = new ExadbVmClusterUpdateProperties(); + Properties.NodeCount = value; + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.Serialization.cs new file mode 100644 index 000000000000..bc6bdd2eb12f --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.Serialization.cs @@ -0,0 +1,738 @@ +// 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.OracleDatabase.Models +{ + public partial class ExadbVmClusterProperties : 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(ExadbVmClusterProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (Optional.IsDefined(ClusterName)) + { + writer.WritePropertyName("clusterName"u8); + writer.WriteStringValue(ClusterName); + } + if (Optional.IsDefined(BackupSubnetCidr)) + { + writer.WritePropertyName("backupSubnetCidr"u8); + writer.WriteStringValue(BackupSubnetCidr); + } + if (options.Format != "W" && Optional.IsDefined(NsgUri)) + { + writer.WritePropertyName("nsgUrl"u8); + writer.WriteStringValue(NsgUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + writer.WritePropertyName("vnetId"u8); + writer.WriteStringValue(VnetId); + writer.WritePropertyName("subnetId"u8); + writer.WriteStringValue(SubnetId); + if (Optional.IsDefined(DataCollectionOptions)) + { + writer.WritePropertyName("dataCollectionOptions"u8); + writer.WriteObjectValue(DataCollectionOptions, options); + } + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + if (Optional.IsDefined(Domain)) + { + writer.WritePropertyName("domain"u8); + writer.WriteStringValue(Domain); + } + writer.WritePropertyName("enabledEcpuCount"u8); + writer.WriteNumberValue(EnabledEcpuCount); + writer.WritePropertyName("exascaleDbStorageVaultId"u8); + writer.WriteStringValue(ExascaleDBStorageVaultId); + if (Optional.IsDefined(GridImageOcid)) + { + writer.WritePropertyName("gridImageOcid"u8); + writer.WriteStringValue(GridImageOcid); + } + if (options.Format != "W" && Optional.IsDefined(GridImageType)) + { + writer.WritePropertyName("gridImageType"u8); + writer.WriteStringValue(GridImageType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(GiVersion)) + { + writer.WritePropertyName("giVersion"u8); + writer.WriteStringValue(GiVersion); + } + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + if (Optional.IsDefined(LicenseModel)) + { + writer.WritePropertyName("licenseModel"u8); + writer.WriteStringValue(LicenseModel.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + writer.WritePropertyName("nodeCount"u8); + writer.WriteNumberValue(NodeCount); + if (Optional.IsCollectionDefined(NsgCidrs)) + { + writer.WritePropertyName("nsgCidrs"u8); + writer.WriteStartArray(); + foreach (var item in NsgCidrs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ZoneOcid)) + { + writer.WritePropertyName("zoneOcid"u8); + writer.WriteStringValue(ZoneOcid); + } + if (Optional.IsDefined(PrivateZoneOcid)) + { + writer.WritePropertyName("privateZoneOcid"u8); + writer.WriteStringValue(PrivateZoneOcid); + } + if (Optional.IsDefined(ScanListenerPortTcp)) + { + writer.WritePropertyName("scanListenerPortTcp"u8); + writer.WriteNumberValue(ScanListenerPortTcp.Value); + } + if (Optional.IsDefined(ScanListenerPortTcpSsl)) + { + writer.WritePropertyName("scanListenerPortTcpSsl"u8); + writer.WriteNumberValue(ScanListenerPortTcpSsl.Value); + } + if (options.Format != "W" && Optional.IsDefined(ListenerPort)) + { + writer.WritePropertyName("listenerPort"u8); + writer.WriteNumberValue(ListenerPort.Value); + } + writer.WritePropertyName("shape"u8); + writer.WriteStringValue(Shape); + writer.WritePropertyName("sshPublicKeys"u8); + writer.WriteStartArray(); + foreach (var item in SshPublicKeys) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (Optional.IsDefined(SystemVersion)) + { + writer.WritePropertyName("systemVersion"u8); + writer.WriteStringValue(SystemVersion); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + writer.WritePropertyName("totalEcpuCount"u8); + writer.WriteNumberValue(TotalEcpuCount); + writer.WritePropertyName("vmFileSystemStorage"u8); + writer.WriteObjectValue(VmFileSystemStorage, options); + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(ScanDnsName)) + { + writer.WritePropertyName("scanDnsName"u8); + writer.WriteStringValue(ScanDnsName); + } + if (options.Format != "W" && Optional.IsCollectionDefined(ScanIPIds)) + { + writer.WritePropertyName("scanIpIds"u8); + writer.WriteStartArray(); + foreach (var item in ScanIPIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(ScanDnsRecordId)) + { + writer.WritePropertyName("scanDnsRecordId"u8); + writer.WriteStringValue(ScanDnsRecordId); + } + if (options.Format != "W" && Optional.IsDefined(SnapshotFileSystemStorage)) + { + writer.WritePropertyName("snapshotFileSystemStorage"u8); + writer.WriteObjectValue(SnapshotFileSystemStorage, options); + } + if (options.Format != "W" && Optional.IsDefined(TotalFileSystemStorage)) + { + writer.WritePropertyName("totalFileSystemStorage"u8); + writer.WriteObjectValue(TotalFileSystemStorage, options); + } + if (options.Format != "W" && Optional.IsCollectionDefined(VipIds)) + { + writer.WritePropertyName("vipIds"u8); + writer.WriteStartArray(); + foreach (var item in VipIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(OciUri)) + { + writer.WritePropertyName("ociUrl"u8); + writer.WriteStringValue(OciUri.AbsoluteUri); + } + if (options.Format != "W" && Optional.IsDefined(IormConfigCache)) + { + writer.WritePropertyName("iormConfigCache"u8); + writer.WriteObjectValue(IormConfigCache, options); + } + if (options.Format != "W" && Optional.IsDefined(BackupSubnetOcid)) + { + writer.WritePropertyName("backupSubnetOcid"u8); + writer.WriteStringValue(BackupSubnetOcid); + } + if (options.Format != "W" && Optional.IsDefined(SubnetOcid)) + { + writer.WritePropertyName("subnetOcid"u8); + writer.WriteStringValue(SubnetOcid); + } + 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 + } + } + } + + ExadbVmClusterProperties 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(ExadbVmClusterProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterProperties(document.RootElement, options); + } + + internal static ExadbVmClusterProperties DeserializeExadbVmClusterProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier ocid = default; + string clusterName = default; + string backupSubnetCidr = default; + Uri nsgUrl = default; + OracleDatabaseProvisioningState? provisioningState = default; + ExadbVmClusterLifecycleState? lifecycleState = default; + ResourceIdentifier vnetId = default; + ResourceIdentifier subnetId = default; + DiagnosticCollectionConfig dataCollectionOptions = default; + string displayName = default; + string domain = default; + int enabledEcpuCount = default; + ResourceIdentifier exascaleDBStorageVaultId = default; + ResourceIdentifier gridImageOcid = default; + GridImageType? gridImageType = default; + string giVersion = default; + string hostname = default; + OracleLicenseModel? licenseModel = default; + int? memorySizeInGbs = default; + int nodeCount = default; + IList nsgCidrs = default; + ResourceIdentifier zoneOcid = default; + ResourceIdentifier privateZoneOcid = default; + int? scanListenerPortTcp = default; + int? scanListenerPortTcpSsl = default; + int? listenerPort = default; + string shape = default; + IList sshPublicKeys = default; + string systemVersion = default; + string timeZone = default; + int totalEcpuCount = default; + ExadbVmClusterStorageDetails vmFileSystemStorage = default; + string lifecycleDetails = default; + string scanDnsName = default; + IReadOnlyList scanIPIds = default; + ResourceIdentifier scanDnsRecordId = default; + ExadbVmClusterStorageDetails snapshotFileSystemStorage = default; + ExadbVmClusterStorageDetails totalFileSystemStorage = default; + IReadOnlyList vipIds = default; + Uri ociUrl = default; + ExadataIormConfig iormConfigCache = default; + ResourceIdentifier backupSubnetOcid = default; + ResourceIdentifier subnetOcid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ocid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("clusterName"u8)) + { + clusterName = property.Value.GetString(); + continue; + } + if (property.NameEquals("backupSubnetCidr"u8)) + { + backupSubnetCidr = property.Value.GetString(); + continue; + } + if (property.NameEquals("nsgUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nsgUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new OracleDatabaseProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new ExadbVmClusterLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("vnetId"u8)) + { + vnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetId"u8)) + { + subnetId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("dataCollectionOptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataCollectionOptions = DiagnosticCollectionConfig.DeserializeDiagnosticCollectionConfig(property.Value, options); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("domain"u8)) + { + domain = property.Value.GetString(); + continue; + } + if (property.NameEquals("enabledEcpuCount"u8)) + { + enabledEcpuCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("exascaleDbStorageVaultId"u8)) + { + exascaleDBStorageVaultId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("gridImageOcid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gridImageOcid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("gridImageType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gridImageType = new GridImageType(property.Value.GetString()); + continue; + } + if (property.NameEquals("giVersion"u8)) + { + giVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("licenseModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + licenseModel = new OracleLicenseModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nodeCount"u8)) + { + nodeCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("nsgCidrs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(CloudVmClusterNsgCidr.DeserializeCloudVmClusterNsgCidr(item, options)); + } + nsgCidrs = array; + continue; + } + if (property.NameEquals("zoneOcid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneOcid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("privateZoneOcid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + privateZoneOcid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("scanListenerPortTcp"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanListenerPortTcp = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("scanListenerPortTcpSsl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanListenerPortTcpSsl = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("listenerPort"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + listenerPort = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("shape"u8)) + { + shape = property.Value.GetString(); + continue; + } + if (property.NameEquals("sshPublicKeys"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + sshPublicKeys = array; + continue; + } + if (property.NameEquals("systemVersion"u8)) + { + systemVersion = property.Value.GetString(); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("totalEcpuCount"u8)) + { + totalEcpuCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("vmFileSystemStorage"u8)) + { + vmFileSystemStorage = ExadbVmClusterStorageDetails.DeserializeExadbVmClusterStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("scanDnsName"u8)) + { + scanDnsName = property.Value.GetString(); + continue; + } + if (property.NameEquals("scanIpIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + scanIPIds = array; + continue; + } + if (property.NameEquals("scanDnsRecordId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + scanDnsRecordId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("snapshotFileSystemStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + snapshotFileSystemStorage = ExadbVmClusterStorageDetails.DeserializeExadbVmClusterStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("totalFileSystemStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalFileSystemStorage = ExadbVmClusterStorageDetails.DeserializeExadbVmClusterStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("vipIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + vipIds = array; + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("iormConfigCache"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + iormConfigCache = ExadataIormConfig.DeserializeExadataIormConfig(property.Value, options); + continue; + } + if (property.NameEquals("backupSubnetOcid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + backupSubnetOcid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("subnetOcid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + subnetOcid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterProperties( + ocid, + clusterName, + backupSubnetCidr, + nsgUrl, + provisioningState, + lifecycleState, + vnetId, + subnetId, + dataCollectionOptions, + displayName, + domain, + enabledEcpuCount, + exascaleDBStorageVaultId, + gridImageOcid, + gridImageType, + giVersion, + hostname, + licenseModel, + memorySizeInGbs, + nodeCount, + nsgCidrs ?? new ChangeTrackingList(), + zoneOcid, + privateZoneOcid, + scanListenerPortTcp, + scanListenerPortTcpSsl, + listenerPort, + shape, + sshPublicKeys, + systemVersion, + timeZone, + totalEcpuCount, + vmFileSystemStorage, + lifecycleDetails, + scanDnsName, + scanIPIds ?? new ChangeTrackingList(), + scanDnsRecordId, + snapshotFileSystemStorage, + totalFileSystemStorage, + vipIds ?? new ChangeTrackingList(), + ociUrl, + iormConfigCache, + backupSubnetOcid, + subnetOcid, + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterProperties)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterProperties 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 DeserializeExadbVmClusterProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.cs new file mode 100644 index 000000000000..2445da01c4f6 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterProperties.cs @@ -0,0 +1,297 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// ExadbVmCluster resource model. + public partial class ExadbVmClusterProperties + { + /// + /// 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 . + /// VNET for network connectivity. + /// Client subnet. + /// Display Name. + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// The Azure Resource ID of the Exadata Database Storage Vault. + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + /// Filesystem storage details. + /// , , , , , , or is null. + public ExadbVmClusterProperties(ResourceIdentifier vnetId, ResourceIdentifier subnetId, string displayName, int enabledEcpuCount, ResourceIdentifier exascaleDBStorageVaultId, string hostname, int nodeCount, string shape, IEnumerable sshPublicKeys, int totalEcpuCount, ExadbVmClusterStorageDetails vmFileSystemStorage) + { + Argument.AssertNotNull(vnetId, nameof(vnetId)); + Argument.AssertNotNull(subnetId, nameof(subnetId)); + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(exascaleDBStorageVaultId, nameof(exascaleDBStorageVaultId)); + Argument.AssertNotNull(hostname, nameof(hostname)); + Argument.AssertNotNull(shape, nameof(shape)); + Argument.AssertNotNull(sshPublicKeys, nameof(sshPublicKeys)); + Argument.AssertNotNull(vmFileSystemStorage, nameof(vmFileSystemStorage)); + + VnetId = vnetId; + SubnetId = subnetId; + DisplayName = displayName; + EnabledEcpuCount = enabledEcpuCount; + ExascaleDBStorageVaultId = exascaleDBStorageVaultId; + Hostname = hostname; + NodeCount = nodeCount; + NsgCidrs = new ChangeTrackingList(); + Shape = shape; + SshPublicKeys = sshPublicKeys.ToList(); + TotalEcpuCount = totalEcpuCount; + VmFileSystemStorage = vmFileSystemStorage; + ScanIPIds = new ChangeTrackingList(); + VipIds = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// ExadbVmCluster ocid. + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// Exadata VM cluster on Exascale Infrastructure provisioning state. + /// CloudVmCluster lifecycle state. + /// VNET for network connectivity. + /// Client subnet. + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// Display Name. + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure. + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// The Azure Resource ID of the Exadata Database Storage Vault. + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API. + /// The type of Grid Image. + /// Oracle Grid Infrastructure (GI) software version. + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// Operating system version of the image. + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + /// Filesystem storage details. + /// Additional information about the current lifecycle state. + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// Snapshot filesystem storage details. + /// Total file system storage details. + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + /// Cluster backup subnet ocid. + /// Cluster subnet ocid. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterProperties(ResourceIdentifier ocid, string clusterName, string backupSubnetCidr, Uri nsgUri, OracleDatabaseProvisioningState? provisioningState, ExadbVmClusterLifecycleState? lifecycleState, ResourceIdentifier vnetId, ResourceIdentifier subnetId, DiagnosticCollectionConfig dataCollectionOptions, string displayName, string domain, int enabledEcpuCount, ResourceIdentifier exascaleDBStorageVaultId, ResourceIdentifier gridImageOcid, GridImageType? gridImageType, string giVersion, string hostname, OracleLicenseModel? licenseModel, int? memorySizeInGbs, int nodeCount, IList nsgCidrs, ResourceIdentifier zoneOcid, ResourceIdentifier privateZoneOcid, int? scanListenerPortTcp, int? scanListenerPortTcpSsl, int? listenerPort, string shape, IList sshPublicKeys, string systemVersion, string timeZone, int totalEcpuCount, ExadbVmClusterStorageDetails vmFileSystemStorage, string lifecycleDetails, string scanDnsName, IReadOnlyList scanIPIds, ResourceIdentifier scanDnsRecordId, ExadbVmClusterStorageDetails snapshotFileSystemStorage, ExadbVmClusterStorageDetails totalFileSystemStorage, IReadOnlyList vipIds, Uri ociUri, ExadataIormConfig iormConfigCache, ResourceIdentifier backupSubnetOcid, ResourceIdentifier subnetOcid, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + ClusterName = clusterName; + BackupSubnetCidr = backupSubnetCidr; + NsgUri = nsgUri; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + VnetId = vnetId; + SubnetId = subnetId; + DataCollectionOptions = dataCollectionOptions; + DisplayName = displayName; + Domain = domain; + EnabledEcpuCount = enabledEcpuCount; + ExascaleDBStorageVaultId = exascaleDBStorageVaultId; + GridImageOcid = gridImageOcid; + GridImageType = gridImageType; + GiVersion = giVersion; + Hostname = hostname; + LicenseModel = licenseModel; + MemorySizeInGbs = memorySizeInGbs; + NodeCount = nodeCount; + NsgCidrs = nsgCidrs; + ZoneOcid = zoneOcid; + PrivateZoneOcid = privateZoneOcid; + ScanListenerPortTcp = scanListenerPortTcp; + ScanListenerPortTcpSsl = scanListenerPortTcpSsl; + ListenerPort = listenerPort; + Shape = shape; + SshPublicKeys = sshPublicKeys; + SystemVersion = systemVersion; + TimeZone = timeZone; + TotalEcpuCount = totalEcpuCount; + VmFileSystemStorage = vmFileSystemStorage; + LifecycleDetails = lifecycleDetails; + ScanDnsName = scanDnsName; + ScanIPIds = scanIPIds; + ScanDnsRecordId = scanDnsRecordId; + SnapshotFileSystemStorage = snapshotFileSystemStorage; + TotalFileSystemStorage = totalFileSystemStorage; + VipIds = vipIds; + OciUri = ociUri; + IormConfigCache = iormConfigCache; + BackupSubnetOcid = backupSubnetOcid; + SubnetOcid = subnetOcid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterProperties() + { + } + + /// ExadbVmCluster ocid. + public ResourceIdentifier Ocid { get; } + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive. + public string ClusterName { get; set; } + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22. + public string BackupSubnetCidr { get; set; } + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + public Uri NsgUri { get; } + /// Exadata VM cluster on Exascale Infrastructure provisioning state. + public OracleDatabaseProvisioningState? ProvisioningState { get; } + /// CloudVmCluster lifecycle state. + public ExadbVmClusterLifecycleState? LifecycleState { get; } + /// VNET for network connectivity. + public ResourceIdentifier VnetId { get; set; } + /// Client subnet. + public ResourceIdentifier SubnetId { get; set; } + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + public DiagnosticCollectionConfig DataCollectionOptions { get; set; } + /// Display Name. + public string DisplayName { get; set; } + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure. + public string Domain { get; set; } + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + public int EnabledEcpuCount { get; set; } + /// The Azure Resource ID of the Exadata Database Storage Vault. + public ResourceIdentifier ExascaleDBStorageVaultId { get; set; } + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API. + public ResourceIdentifier GridImageOcid { get; set; } + /// The type of Grid Image. + public GridImageType? GridImageType { get; } + /// Oracle Grid Infrastructure (GI) software version. + public string GiVersion { get; } + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + public string Hostname { get; set; } + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + public OracleLicenseModel? LicenseModel { get; set; } + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + public int? MemorySizeInGbs { get; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + public int NodeCount { get; set; } + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + public IList NsgCidrs { get; } + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + public ResourceIdentifier ZoneOcid { get; } + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + public ResourceIdentifier PrivateZoneOcid { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + public int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + public int? ScanListenerPortTcpSsl { get; set; } + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + public int? ListenerPort { get; } + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource. + public string Shape { get; set; } + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + public IList SshPublicKeys { get; } + /// Operating system version of the image. + public string SystemVersion { get; set; } + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + public string TimeZone { get; set; } + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + public int TotalEcpuCount { get; set; } + /// Filesystem storage details. + internal ExadbVmClusterStorageDetails VmFileSystemStorage { get; set; } + /// Total Capacity. + public int? VmFileSystemStorageTotalSizeInGbs + { + get => VmFileSystemStorage is null ? default(int?) : VmFileSystemStorage.TotalSizeInGbs; + set + { + VmFileSystemStorage = value.HasValue ? new ExadbVmClusterStorageDetails(value.Value) : null; + } + } + + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + public string ScanDnsName { get; } + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + public IReadOnlyList ScanIPIds { get; } + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + public ResourceIdentifier ScanDnsRecordId { get; } + /// Snapshot filesystem storage details. + internal ExadbVmClusterStorageDetails SnapshotFileSystemStorage { get; } + /// Total Capacity. + public int? SnapshotFileSystemStorageTotalSizeInGbs + { + get => SnapshotFileSystemStorage?.TotalSizeInGbs; + } + + /// Total file system storage details. + internal ExadbVmClusterStorageDetails TotalFileSystemStorage { get; } + /// Total Capacity. + public int? TotalSizeInGbs + { + get => TotalFileSystemStorage?.TotalSizeInGbs; + } + + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty. + public IReadOnlyList VipIds { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + public Uri OciUri { get; } + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + public ExadataIormConfig IormConfigCache { get; } + /// Cluster backup subnet ocid. + public ResourceIdentifier BackupSubnetOcid { get; } + /// Cluster subnet ocid. + public ResourceIdentifier SubnetOcid { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.Serialization.cs new file mode 100644 index 000000000000..03fdfc923ed0 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.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.OracleDatabase.Models +{ + public partial class ExadbVmClusterStorageDetails : 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(ExadbVmClusterStorageDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("totalSizeInGbs"u8); + writer.WriteNumberValue(TotalSizeInGbs); + 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 + } + } + } + + ExadbVmClusterStorageDetails 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(ExadbVmClusterStorageDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterStorageDetails(document.RootElement, options); + } + + internal static ExadbVmClusterStorageDetails DeserializeExadbVmClusterStorageDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int totalSizeInGbs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalSizeInGbs"u8)) + { + totalSizeInGbs = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterStorageDetails(totalSizeInGbs, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterStorageDetails)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterStorageDetails 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 DeserializeExadbVmClusterStorageDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterStorageDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.cs new file mode 100644 index 000000000000..0ba79b60cc13 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterStorageDetails.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.OracleDatabase.Models +{ + /// Storage Details on the Exadata VM cluster. + public partial class ExadbVmClusterStorageDetails + { + /// + /// 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 . + /// Total Capacity. + public ExadbVmClusterStorageDetails(int totalSizeInGbs) + { + TotalSizeInGbs = totalSizeInGbs; + } + + /// Initializes a new instance of . + /// Total Capacity. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterStorageDetails(int totalSizeInGbs, IDictionary serializedAdditionalRawData) + { + TotalSizeInGbs = totalSizeInGbs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExadbVmClusterStorageDetails() + { + } + + /// Total Capacity. + public int TotalSizeInGbs { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.Serialization.cs new file mode 100644 index 000000000000..daf09ea27d5e --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.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.OracleDatabase.Models +{ + internal partial class ExadbVmClusterUpdateProperties : 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(ExadbVmClusterUpdateProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NodeCount)) + { + writer.WritePropertyName("nodeCount"u8); + writer.WriteNumberValue(NodeCount.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 + } + } + } + + ExadbVmClusterUpdateProperties 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(ExadbVmClusterUpdateProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExadbVmClusterUpdateProperties(document.RootElement, options); + } + + internal static ExadbVmClusterUpdateProperties DeserializeExadbVmClusterUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? nodeCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nodeCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExadbVmClusterUpdateProperties(nodeCount, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExadbVmClusterUpdateProperties)} does not support writing '{options.Format}' format."); + } + } + + ExadbVmClusterUpdateProperties 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 DeserializeExadbVmClusterUpdateProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExadbVmClusterUpdateProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.cs new file mode 100644 index 000000000000..3ac212e4beed --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExadbVmClusterUpdateProperties.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.OracleDatabase.Models +{ + /// The updatable properties of the ExadbVmCluster. + internal partial class ExadbVmClusterUpdateProperties + { + /// + /// 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 ExadbVmClusterUpdateProperties() + { + } + + /// Initializes a new instance of . + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + /// Keeps track of any properties unknown to the library. + internal ExadbVmClusterUpdateProperties(int? nodeCount, IDictionary serializedAdditionalRawData) + { + NodeCount = nodeCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + public int? NodeCount { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeListResult.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeListResult.Serialization.cs new file mode 100644 index 000000000000..0a2611db4964 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeListResult.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.OracleDatabase.Models +{ + internal partial class ExascaleDBNodeListResult : 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(ExascaleDBNodeListResult)} 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 + } + } + } + + ExascaleDBNodeListResult 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(ExascaleDBNodeListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBNodeListResult(document.RootElement, options); + } + + internal static ExascaleDBNodeListResult DeserializeExascaleDBNodeListResult(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(ExascaleDBNodeData.DeserializeExascaleDBNodeData(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 ExascaleDBNodeListResult(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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBNodeListResult)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBNodeListResult 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 DeserializeExascaleDBNodeListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBNodeListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeListResult.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeListResult.cs new file mode 100644 index 000000000000..0296070b397d --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeListResult.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.OracleDatabase.Models +{ + /// The response of a ExascaleDbNode list operation. + internal partial class ExascaleDBNodeListResult + { + /// + /// 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 ExascaleDbNode items on this page. + /// is null. + internal ExascaleDBNodeListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ExascaleDbNode items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBNodeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDBNodeListResult() + { + } + + /// The ExascaleDbNode items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeProperties.Serialization.cs new file mode 100644 index 000000000000..abf5bd17ed41 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeProperties.Serialization.cs @@ -0,0 +1,304 @@ +// 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.OracleDatabase.Models +{ + public partial class ExascaleDBNodeProperties : 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(ExascaleDBNodeProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + if (Optional.IsDefined(AdditionalDetails)) + { + writer.WritePropertyName("additionalDetails"u8); + writer.WriteStringValue(AdditionalDetails); + } + if (Optional.IsDefined(CpuCoreCount)) + { + writer.WritePropertyName("cpuCoreCount"u8); + writer.WriteNumberValue(CpuCoreCount.Value); + } + if (Optional.IsDefined(DBNodeStorageSizeInGbs)) + { + writer.WritePropertyName("dbNodeStorageSizeInGbs"u8); + writer.WriteNumberValue(DBNodeStorageSizeInGbs.Value); + } + if (Optional.IsDefined(FaultDomain)) + { + writer.WritePropertyName("faultDomain"u8); + writer.WriteStringValue(FaultDomain); + } + if (Optional.IsDefined(Hostname)) + { + writer.WritePropertyName("hostname"u8); + writer.WriteStringValue(Hostname); + } + if (Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (Optional.IsDefined(MaintenanceType)) + { + writer.WritePropertyName("maintenanceType"u8); + writer.WriteStringValue(MaintenanceType); + } + if (Optional.IsDefined(MemorySizeInGbs)) + { + writer.WritePropertyName("memorySizeInGbs"u8); + writer.WriteNumberValue(MemorySizeInGbs.Value); + } + if (Optional.IsDefined(SoftwareStorageSizeInGb)) + { + writer.WritePropertyName("softwareStorageSizeInGb"u8); + writer.WriteNumberValue(SoftwareStorageSizeInGb.Value); + } + if (Optional.IsDefined(TimeMaintenanceWindowEnd)) + { + writer.WritePropertyName("timeMaintenanceWindowEnd"u8); + writer.WriteStringValue(TimeMaintenanceWindowEnd.Value, "O"); + } + if (Optional.IsDefined(TimeMaintenanceWindowStart)) + { + writer.WritePropertyName("timeMaintenanceWindowStart"u8); + writer.WriteStringValue(TimeMaintenanceWindowStart.Value, "O"); + } + if (Optional.IsDefined(TotalCpuCoreCount)) + { + writer.WritePropertyName("totalCpuCoreCount"u8); + writer.WriteNumberValue(TotalCpuCoreCount.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 + } + } + } + + ExascaleDBNodeProperties 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(ExascaleDBNodeProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBNodeProperties(document.RootElement, options); + } + + internal static ExascaleDBNodeProperties DeserializeExascaleDBNodeProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier ocid = default; + string additionalDetails = default; + int? cpuCoreCount = default; + int? dbNodeStorageSizeInGbs = default; + string faultDomain = default; + string hostname = default; + DBNodeProvisioningState? lifecycleState = default; + string maintenanceType = default; + int? memorySizeInGbs = default; + int? softwareStorageSizeInGb = default; + DateTimeOffset? timeMaintenanceWindowEnd = default; + DateTimeOffset? timeMaintenanceWindowStart = default; + int? totalCpuCoreCount = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("ocid"u8)) + { + ocid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("additionalDetails"u8)) + { + additionalDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("cpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + cpuCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("dbNodeStorageSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dbNodeStorageSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("faultDomain"u8)) + { + faultDomain = property.Value.GetString(); + continue; + } + if (property.NameEquals("hostname"u8)) + { + hostname = property.Value.GetString(); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new DBNodeProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("maintenanceType"u8)) + { + maintenanceType = property.Value.GetString(); + continue; + } + if (property.NameEquals("memorySizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + memorySizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("softwareStorageSizeInGb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + softwareStorageSizeInGb = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("timeMaintenanceWindowEnd"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceWindowEnd = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("timeMaintenanceWindowStart"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeMaintenanceWindowStart = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("totalCpuCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalCpuCoreCount = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDBNodeProperties( + ocid, + additionalDetails, + cpuCoreCount, + dbNodeStorageSizeInGbs, + faultDomain, + hostname, + lifecycleState, + maintenanceType, + memorySizeInGbs, + softwareStorageSizeInGb, + timeMaintenanceWindowEnd, + timeMaintenanceWindowStart, + totalCpuCoreCount, + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBNodeProperties)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBNodeProperties 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 DeserializeExascaleDBNodeProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBNodeProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeProperties.cs new file mode 100644 index 000000000000..422dccb833e2 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBNodeProperties.cs @@ -0,0 +1,124 @@ +// 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.OracleDatabase.Models +{ + /// The properties of DbNodeResource. + public partial class ExascaleDBNodeProperties + { + /// + /// 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 . + /// DbNode OCID. + /// is null. + public ExascaleDBNodeProperties(ResourceIdentifier ocid) + { + Argument.AssertNotNull(ocid, nameof(ocid)); + + Ocid = ocid; + } + + /// Initializes a new instance of . + /// DbNode OCID. + /// Additional information about the planned maintenance. + /// The number of CPU cores enabled on the Db node. + /// The allocated local node storage in GBs on the Db node. + /// The name of the Fault Domain the instance is contained in. + /// The host name for the database node. + /// The current state of the database node. + /// The type of database node maintenance. + /// The allocated memory in GBs on the Db node. + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + /// End date and time of maintenance window. + /// Start date and time of maintenance window. + /// The total number of CPU cores reserved on the Db node. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBNodeProperties(ResourceIdentifier ocid, string additionalDetails, int? cpuCoreCount, int? dbNodeStorageSizeInGbs, string faultDomain, string hostname, DBNodeProvisioningState? lifecycleState, string maintenanceType, int? memorySizeInGbs, int? softwareStorageSizeInGb, DateTimeOffset? timeMaintenanceWindowEnd, DateTimeOffset? timeMaintenanceWindowStart, int? totalCpuCoreCount, IDictionary serializedAdditionalRawData) + { + Ocid = ocid; + AdditionalDetails = additionalDetails; + CpuCoreCount = cpuCoreCount; + DBNodeStorageSizeInGbs = dbNodeStorageSizeInGbs; + FaultDomain = faultDomain; + Hostname = hostname; + LifecycleState = lifecycleState; + MaintenanceType = maintenanceType; + MemorySizeInGbs = memorySizeInGbs; + SoftwareStorageSizeInGb = softwareStorageSizeInGb; + TimeMaintenanceWindowEnd = timeMaintenanceWindowEnd; + TimeMaintenanceWindowStart = timeMaintenanceWindowStart; + TotalCpuCoreCount = totalCpuCoreCount; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDBNodeProperties() + { + } + + /// DbNode OCID. + public ResourceIdentifier Ocid { get; set; } + /// Additional information about the planned maintenance. + public string AdditionalDetails { get; set; } + /// The number of CPU cores enabled on the Db node. + public int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + public int? DBNodeStorageSizeInGbs { get; set; } + /// The name of the Fault Domain the instance is contained in. + public string FaultDomain { get; set; } + /// The host name for the database node. + public string Hostname { get; set; } + /// The current state of the database node. + public DBNodeProvisioningState? LifecycleState { get; set; } + /// The type of database node maintenance. + public string MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + public int? MemorySizeInGbs { get; set; } + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems. + public int? SoftwareStorageSizeInGb { get; set; } + /// End date and time of maintenance window. + public DateTimeOffset? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + public DateTimeOffset? TimeMaintenanceWindowStart { get; set; } + /// The total number of CPU cores reserved on the Db node. + public int? TotalCpuCoreCount { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageDetails.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageDetails.Serialization.cs new file mode 100644 index 000000000000..8be805afa46e --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageDetails.Serialization.cs @@ -0,0 +1,148 @@ +// 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.OracleDatabase.Models +{ + public partial class ExascaleDBStorageDetails : 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(ExascaleDBStorageDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AvailableSizeInGbs)) + { + writer.WritePropertyName("availableSizeInGbs"u8); + writer.WriteNumberValue(AvailableSizeInGbs.Value); + } + if (Optional.IsDefined(TotalSizeInGbs)) + { + writer.WritePropertyName("totalSizeInGbs"u8); + writer.WriteNumberValue(TotalSizeInGbs.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 + } + } + } + + ExascaleDBStorageDetails 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(ExascaleDBStorageDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBStorageDetails(document.RootElement, options); + } + + internal static ExascaleDBStorageDetails DeserializeExascaleDBStorageDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? availableSizeInGbs = default; + int? totalSizeInGbs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("availableSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableSizeInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("totalSizeInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + totalSizeInGbs = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDBStorageDetails(availableSizeInGbs, totalSizeInGbs, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageDetails)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBStorageDetails 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 DeserializeExascaleDBStorageDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageDetails.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageDetails.cs new file mode 100644 index 000000000000..05fea47a195e --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageDetails.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.OracleDatabase.Models +{ + /// Exadata Database Storage Details. + public partial class ExascaleDBStorageDetails + { + /// + /// 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 . + internal ExascaleDBStorageDetails() + { + } + + /// Initializes a new instance of . + /// Available Capacity. + /// Total Capacity. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBStorageDetails(int? availableSizeInGbs, int? totalSizeInGbs, IDictionary serializedAdditionalRawData) + { + AvailableSizeInGbs = availableSizeInGbs; + TotalSizeInGbs = totalSizeInGbs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Available Capacity. + public int? AvailableSizeInGbs { get; } + /// Total Capacity. + public int? TotalSizeInGbs { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageInputDetails.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageInputDetails.Serialization.cs new file mode 100644 index 000000000000..97ec5e0f5130 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageInputDetails.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.OracleDatabase.Models +{ + public partial class ExascaleDBStorageInputDetails : 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(ExascaleDBStorageInputDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("totalSizeInGbs"u8); + writer.WriteNumberValue(TotalSizeInGbs); + 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 + } + } + } + + ExascaleDBStorageInputDetails 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(ExascaleDBStorageInputDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBStorageInputDetails(document.RootElement, options); + } + + internal static ExascaleDBStorageInputDetails DeserializeExascaleDBStorageInputDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int totalSizeInGbs = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("totalSizeInGbs"u8)) + { + totalSizeInGbs = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDBStorageInputDetails(totalSizeInGbs, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageInputDetails)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBStorageInputDetails 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 DeserializeExascaleDBStorageInputDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageInputDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageInputDetails.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageInputDetails.cs new file mode 100644 index 000000000000..8375ebe725dd --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageInputDetails.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.OracleDatabase.Models +{ + /// Create exadata Database Storage Details model. + public partial class ExascaleDBStorageInputDetails + { + /// + /// 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 . + /// Total Capacity. + public ExascaleDBStorageInputDetails(int totalSizeInGbs) + { + TotalSizeInGbs = totalSizeInGbs; + } + + /// Initializes a new instance of . + /// Total Capacity. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBStorageInputDetails(int totalSizeInGbs, IDictionary serializedAdditionalRawData) + { + TotalSizeInGbs = totalSizeInGbs; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDBStorageInputDetails() + { + } + + /// Total Capacity. + public int TotalSizeInGbs { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultLifecycleState.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultLifecycleState.cs new file mode 100644 index 000000000000..59b8a3b9a778 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultLifecycleState.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.OracleDatabase.Models +{ + /// Exadata Database Storage Vault lifecycle state enum. + public readonly partial struct ExascaleDBStorageVaultLifecycleState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ExascaleDBStorageVaultLifecycleState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ProvisioningValue = "Provisioning"; + private const string AvailableValue = "Available"; + private const string UpdatingValue = "Updating"; + private const string TerminatingValue = "Terminating"; + private const string TerminatedValue = "Terminated"; + private const string FailedValue = "Failed"; + + /// Indicates that resource in Provisioning state. + public static ExascaleDBStorageVaultLifecycleState Provisioning { get; } = new ExascaleDBStorageVaultLifecycleState(ProvisioningValue); + /// Indicates that resource in Available state. + public static ExascaleDBStorageVaultLifecycleState Available { get; } = new ExascaleDBStorageVaultLifecycleState(AvailableValue); + /// Indicates that resource in Updating state. + public static ExascaleDBStorageVaultLifecycleState Updating { get; } = new ExascaleDBStorageVaultLifecycleState(UpdatingValue); + /// Indicates that resource in Terminating state. + public static ExascaleDBStorageVaultLifecycleState Terminating { get; } = new ExascaleDBStorageVaultLifecycleState(TerminatingValue); + /// Indicates that resource in Terminated state. + public static ExascaleDBStorageVaultLifecycleState Terminated { get; } = new ExascaleDBStorageVaultLifecycleState(TerminatedValue); + /// Indicates that resource in Failed state. + public static ExascaleDBStorageVaultLifecycleState Failed { get; } = new ExascaleDBStorageVaultLifecycleState(FailedValue); + /// Determines if two values are the same. + public static bool operator ==(ExascaleDBStorageVaultLifecycleState left, ExascaleDBStorageVaultLifecycleState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ExascaleDBStorageVaultLifecycleState left, ExascaleDBStorageVaultLifecycleState right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ExascaleDBStorageVaultLifecycleState(string value) => new ExascaleDBStorageVaultLifecycleState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ExascaleDBStorageVaultLifecycleState other && Equals(other); + /// + public bool Equals(ExascaleDBStorageVaultLifecycleState 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultListResult.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultListResult.Serialization.cs new file mode 100644 index 000000000000..17fabac2e8f0 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultListResult.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.OracleDatabase.Models +{ + internal partial class ExascaleDBStorageVaultListResult : 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(ExascaleDBStorageVaultListResult)} 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 + } + } + } + + ExascaleDBStorageVaultListResult 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(ExascaleDBStorageVaultListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBStorageVaultListResult(document.RootElement, options); + } + + internal static ExascaleDBStorageVaultListResult DeserializeExascaleDBStorageVaultListResult(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(ExascaleDBStorageVaultData.DeserializeExascaleDBStorageVaultData(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 ExascaleDBStorageVaultListResult(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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultListResult)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBStorageVaultListResult 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 DeserializeExascaleDBStorageVaultListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultListResult.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultListResult.cs new file mode 100644 index 000000000000..fed95cf0db48 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultListResult.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.OracleDatabase.Models +{ + /// The response of a ExascaleDbStorageVault list operation. + internal partial class ExascaleDBStorageVaultListResult + { + /// + /// 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 ExascaleDbStorageVault items on this page. + /// is null. + internal ExascaleDBStorageVaultListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The ExascaleDbStorageVault items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBStorageVaultListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDBStorageVaultListResult() + { + } + + /// The ExascaleDbStorageVault items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultPatch.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultPatch.Serialization.cs new file mode 100644 index 000000000000..58a60effd54f --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultPatch.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.OracleDatabase.Models +{ + public partial class ExascaleDBStorageVaultPatch : 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(ExascaleDBStorageVaultPatch)} does not support writing '{format}' format."); + } + + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + 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 + } + } + } + + ExascaleDBStorageVaultPatch 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(ExascaleDBStorageVaultPatch)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBStorageVaultPatch(document.RootElement, options); + } + + internal static ExascaleDBStorageVaultPatch DeserializeExascaleDBStorageVaultPatch(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary tags = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("tags"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()); + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDBStorageVaultPatch(tags ?? 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultPatch)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBStorageVaultPatch 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 DeserializeExascaleDBStorageVaultPatch(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultPatch)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultPatch.cs new file mode 100644 index 000000000000..5f5e771bd067 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultPatch.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The type used for updating tags in ExascaleDbStorageVault resources. + public partial class ExascaleDBStorageVaultPatch + { + /// + /// 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 ExascaleDBStorageVaultPatch() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Resource tags. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBStorageVaultPatch(IDictionary tags, IDictionary serializedAdditionalRawData) + { + Tags = tags; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Resource tags. + public IDictionary Tags { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultProperties.Serialization.cs new file mode 100644 index 000000000000..2b2ea4cdf793 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultProperties.Serialization.cs @@ -0,0 +1,285 @@ +// 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.OracleDatabase.Models +{ + public partial class ExascaleDBStorageVaultProperties : 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(ExascaleDBStorageVaultProperties)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(AdditionalFlashCacheInPercent)) + { + writer.WritePropertyName("additionalFlashCacheInPercent"u8); + writer.WriteNumberValue(AdditionalFlashCacheInPercent.Value); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("highCapacityDatabaseStorageInput"u8); + writer.WriteObjectValue(HighCapacityDatabaseStorageInput, options); + if (options.Format != "W" && Optional.IsDefined(HighCapacityDatabaseStorage)) + { + writer.WritePropertyName("highCapacityDatabaseStorage"u8); + writer.WriteObjectValue(HighCapacityDatabaseStorage, options); + } + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("timeZone"u8); + writer.WriteStringValue(TimeZone); + } + if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleState)) + { + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LifecycleDetails)) + { + writer.WritePropertyName("lifecycleDetails"u8); + writer.WriteStringValue(LifecycleDetails); + } + if (options.Format != "W" && Optional.IsDefined(VmClusterCount)) + { + writer.WritePropertyName("vmClusterCount"u8); + writer.WriteNumberValue(VmClusterCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(Ocid)) + { + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + } + if (options.Format != "W" && Optional.IsDefined(OciUri)) + { + writer.WritePropertyName("ociUrl"u8); + writer.WriteStringValue(OciUri.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 + } + } + } + + ExascaleDBStorageVaultProperties 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(ExascaleDBStorageVaultProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExascaleDBStorageVaultProperties(document.RootElement, options); + } + + internal static ExascaleDBStorageVaultProperties DeserializeExascaleDBStorageVaultProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? additionalFlashCacheInPercent = default; + string description = default; + string displayName = default; + ExascaleDBStorageInputDetails highCapacityDatabaseStorageInput = default; + ExascaleDBStorageDetails highCapacityDatabaseStorage = default; + string timeZone = default; + OracleDatabaseProvisioningState? provisioningState = default; + ExascaleDBStorageVaultLifecycleState? lifecycleState = default; + string lifecycleDetails = default; + int? vmClusterCount = default; + ResourceIdentifier ocid = default; + Uri ociUrl = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("additionalFlashCacheInPercent"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + additionalFlashCacheInPercent = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("highCapacityDatabaseStorageInput"u8)) + { + highCapacityDatabaseStorageInput = ExascaleDBStorageInputDetails.DeserializeExascaleDBStorageInputDetails(property.Value, options); + continue; + } + if (property.NameEquals("highCapacityDatabaseStorage"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + highCapacityDatabaseStorage = ExascaleDBStorageDetails.DeserializeExascaleDBStorageDetails(property.Value, options); + continue; + } + if (property.NameEquals("timeZone"u8)) + { + timeZone = property.Value.GetString(); + continue; + } + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new OracleDatabaseProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + lifecycleState = new ExascaleDBStorageVaultLifecycleState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lifecycleDetails"u8)) + { + lifecycleDetails = property.Value.GetString(); + continue; + } + if (property.NameEquals("vmClusterCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + vmClusterCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("ocid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ocid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("ociUrl"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + ociUrl = new Uri(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ExascaleDBStorageVaultProperties( + additionalFlashCacheInPercent, + description, + displayName, + highCapacityDatabaseStorageInput, + highCapacityDatabaseStorage, + timeZone, + provisioningState, + lifecycleState, + lifecycleDetails, + vmClusterCount, + ocid, + ociUrl, + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultProperties)} does not support writing '{options.Format}' format."); + } + } + + ExascaleDBStorageVaultProperties 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 DeserializeExascaleDBStorageVaultProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExascaleDBStorageVaultProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultProperties.cs new file mode 100644 index 000000000000..0969e7b2b3fd --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ExascaleDBStorageVaultProperties.cs @@ -0,0 +1,133 @@ +// 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.OracleDatabase.Models +{ + /// ExascaleDbStorageVault resource model. + public partial class ExascaleDBStorageVaultProperties + { + /// + /// 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-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// Create exadata Database Storage Details. + /// or is null. + public ExascaleDBStorageVaultProperties(string displayName, ExascaleDBStorageInputDetails highCapacityDatabaseStorageInput) + { + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(highCapacityDatabaseStorageInput, nameof(highCapacityDatabaseStorageInput)); + + DisplayName = displayName; + HighCapacityDatabaseStorageInput = highCapacityDatabaseStorageInput; + } + + /// Initializes a new instance of . + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// Exadata Database Storage Vault description. + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// Create exadata Database Storage Details. + /// Response exadata Database Storage Details. + /// The time zone that you want to use for the Exadata Database Storage Vault. + /// Exadata Database Storage Vault provisioning state. + /// Exadata Database Storage Vault lifecycle state. + /// Additional information about the current lifecycle state. + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + /// The OCID of the Exadata Database Storage Vault. + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + /// Keeps track of any properties unknown to the library. + internal ExascaleDBStorageVaultProperties(int? additionalFlashCacheInPercent, string description, string displayName, ExascaleDBStorageInputDetails highCapacityDatabaseStorageInput, ExascaleDBStorageDetails highCapacityDatabaseStorage, string timeZone, OracleDatabaseProvisioningState? provisioningState, ExascaleDBStorageVaultLifecycleState? lifecycleState, string lifecycleDetails, int? vmClusterCount, ResourceIdentifier ocid, Uri ociUri, IDictionary serializedAdditionalRawData) + { + AdditionalFlashCacheInPercent = additionalFlashCacheInPercent; + Description = description; + DisplayName = displayName; + HighCapacityDatabaseStorageInput = highCapacityDatabaseStorageInput; + HighCapacityDatabaseStorage = highCapacityDatabaseStorage; + TimeZone = timeZone; + ProvisioningState = provisioningState; + LifecycleState = lifecycleState; + LifecycleDetails = lifecycleDetails; + VmClusterCount = vmClusterCount; + Ocid = ocid; + OciUri = ociUri; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ExascaleDBStorageVaultProperties() + { + } + + /// The size of additional Flash Cache in percentage of High Capacity database storage. + public int? AdditionalFlashCacheInPercent { get; set; } + /// Exadata Database Storage Vault description. + public string Description { get; set; } + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + public string DisplayName { get; set; } + /// Create exadata Database Storage Details. + internal ExascaleDBStorageInputDetails HighCapacityDatabaseStorageInput { get; set; } + /// Total Capacity. + public int? HighCapacityDatabaseStorageInputTotalSizeInGbs + { + get => HighCapacityDatabaseStorageInput is null ? default(int?) : HighCapacityDatabaseStorageInput.TotalSizeInGbs; + set + { + HighCapacityDatabaseStorageInput = value.HasValue ? new ExascaleDBStorageInputDetails(value.Value) : null; + } + } + + /// Response exadata Database Storage Details. + public ExascaleDBStorageDetails HighCapacityDatabaseStorage { get; } + /// The time zone that you want to use for the Exadata Database Storage Vault. + public string TimeZone { get; set; } + /// Exadata Database Storage Vault provisioning state. + public OracleDatabaseProvisioningState? ProvisioningState { get; } + /// Exadata Database Storage Vault lifecycle state. + public ExascaleDBStorageVaultLifecycleState? LifecycleState { get; } + /// Additional information about the current lifecycle state. + public string LifecycleDetails { get; } + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + public int? VmClusterCount { get; } + /// The OCID of the Exadata Database Storage Vault. + public ResourceIdentifier Ocid { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + public Uri OciUri { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.Serialization.cs new file mode 100644 index 000000000000..0d82354f0d9d --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.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.OracleDatabase.Models +{ + public partial class FileSystemConfigurationDetails : 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(FileSystemConfigurationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(MountPoint)) + { + writer.WritePropertyName("mountPoint"u8); + writer.WriteStringValue(MountPoint); + } + if (Optional.IsDefined(FileSystemSizeGb)) + { + writer.WritePropertyName("fileSystemSizeGb"u8); + writer.WriteNumberValue(FileSystemSizeGb.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 + } + } + } + + FileSystemConfigurationDetails 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(FileSystemConfigurationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileSystemConfigurationDetails(document.RootElement, options); + } + + internal static FileSystemConfigurationDetails DeserializeFileSystemConfigurationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string mountPoint = default; + int? fileSystemSizeGb = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mountPoint"u8)) + { + mountPoint = property.Value.GetString(); + continue; + } + if (property.NameEquals("fileSystemSizeGb"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + fileSystemSizeGb = property.Value.GetInt32(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FileSystemConfigurationDetails(mountPoint, fileSystemSizeGb, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(FileSystemConfigurationDetails)} does not support writing '{options.Format}' format."); + } + } + + FileSystemConfigurationDetails 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 DeserializeFileSystemConfigurationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileSystemConfigurationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.cs new file mode 100644 index 000000000000..260492d0d899 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FileSystemConfigurationDetails.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.OracleDatabase.Models +{ + /// File configuration options. + public partial class FileSystemConfigurationDetails + { + /// + /// 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 FileSystemConfigurationDetails() + { + } + + /// Initializes a new instance of . + /// Mount path. + /// Size of the VM. + /// Keeps track of any properties unknown to the library. + internal FileSystemConfigurationDetails(string mountPoint, int? fileSystemSizeGb, IDictionary serializedAdditionalRawData) + { + MountPoint = mountPoint; + FileSystemSizeGb = fileSystemSizeGb; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Mount path. + public string MountPoint { get; set; } + /// Size of the VM. + public int? FileSystemSizeGb { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.Serialization.cs new file mode 100644 index 000000000000..7f56667ba406 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.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.OracleDatabase.Models +{ + internal partial class FlexComponentListResult : 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(FlexComponentListResult)} 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 + } + } + } + + FlexComponentListResult 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(FlexComponentListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlexComponentListResult(document.RootElement, options); + } + + internal static FlexComponentListResult DeserializeFlexComponentListResult(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(FlexComponentData.DeserializeFlexComponentData(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 FlexComponentListResult(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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(FlexComponentListResult)} does not support writing '{options.Format}' format."); + } + } + + FlexComponentListResult 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 DeserializeFlexComponentListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlexComponentListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.cs new file mode 100644 index 000000000000..35dd7659fe1f --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentListResult.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.OracleDatabase.Models +{ + /// The response of a FlexComponent list operation. + internal partial class FlexComponentListResult + { + /// + /// 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 FlexComponent items on this page. + /// is null. + internal FlexComponentListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FlexComponent items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FlexComponentListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FlexComponentListResult() + { + } + + /// The FlexComponent items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.Serialization.cs new file mode 100644 index 000000000000..7ea6ed7d441c --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.Serialization.cs @@ -0,0 +1,267 @@ +// 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.OracleDatabase.Models +{ + public partial class FlexComponentProperties : 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(FlexComponentProperties)} does not support writing '{format}' format."); + } + + if (options.Format != "W" && Optional.IsDefined(MinimumCoreCount)) + { + writer.WritePropertyName("minimumCoreCount"u8); + writer.WriteNumberValue(MinimumCoreCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(AvailableCoreCount)) + { + writer.WritePropertyName("availableCoreCount"u8); + writer.WriteNumberValue(AvailableCoreCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(AvailableDBStorageInGbs)) + { + writer.WritePropertyName("availableDbStorageInGbs"u8); + writer.WriteNumberValue(AvailableDBStorageInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(RuntimeMinimumCoreCount)) + { + writer.WritePropertyName("runtimeMinimumCoreCount"u8); + writer.WriteNumberValue(RuntimeMinimumCoreCount.Value); + } + if (options.Format != "W" && Optional.IsDefined(Shape)) + { + writer.WritePropertyName("shape"u8); + writer.WriteStringValue(Shape); + } + if (options.Format != "W" && Optional.IsDefined(AvailableMemoryInGbs)) + { + writer.WritePropertyName("availableMemoryInGbs"u8); + writer.WriteNumberValue(AvailableMemoryInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(AvailableLocalStorageInGbs)) + { + writer.WritePropertyName("availableLocalStorageInGbs"u8); + writer.WriteNumberValue(AvailableLocalStorageInGbs.Value); + } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel); + } + if (options.Format != "W" && Optional.IsDefined(HardwareType)) + { + writer.WritePropertyName("hardwareType"u8); + writer.WriteStringValue(HardwareType.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(DescriptionSummary)) + { + writer.WritePropertyName("descriptionSummary"u8); + writer.WriteStringValue(DescriptionSummary); + } + 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 + } + } + } + + FlexComponentProperties 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(FlexComponentProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFlexComponentProperties(document.RootElement, options); + } + + internal static FlexComponentProperties DeserializeFlexComponentProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + int? minimumCoreCount = default; + int? availableCoreCount = default; + int? availableDBStorageInGbs = default; + int? runtimeMinimumCoreCount = default; + string shape = default; + int? availableMemoryInGbs = default; + int? availableLocalStorageInGbs = default; + string computeModel = default; + HardwareType? hardwareType = default; + string descriptionSummary = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("minimumCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + minimumCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableDbStorageInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableDBStorageInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("runtimeMinimumCoreCount"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + runtimeMinimumCoreCount = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("shape"u8)) + { + shape = property.Value.GetString(); + continue; + } + if (property.NameEquals("availableMemoryInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableMemoryInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("availableLocalStorageInGbs"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + availableLocalStorageInGbs = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("computeModel"u8)) + { + computeModel = property.Value.GetString(); + continue; + } + if (property.NameEquals("hardwareType"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + hardwareType = new HardwareType(property.Value.GetString()); + continue; + } + if (property.NameEquals("descriptionSummary"u8)) + { + descriptionSummary = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FlexComponentProperties( + minimumCoreCount, + availableCoreCount, + availableDBStorageInGbs, + runtimeMinimumCoreCount, + shape, + availableMemoryInGbs, + availableLocalStorageInGbs, + computeModel, + hardwareType, + descriptionSummary, + 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(FlexComponentProperties)} does not support writing '{options.Format}' format."); + } + } + + FlexComponentProperties 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 DeserializeFlexComponentProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FlexComponentProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.cs new file mode 100644 index 000000000000..1622cef77a8d --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/FlexComponentProperties.cs @@ -0,0 +1,101 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// FlexComponent resource model. + public partial class FlexComponentProperties + { + /// + /// 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 FlexComponentProperties() + { + } + + /// Initializes a new instance of . + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// The name of the DB system shape for this Flex Component. + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// The compute model of the DB Server for this Flex Component. + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// The description summary for this Flex Component. + /// Keeps track of any properties unknown to the library. + internal FlexComponentProperties(int? minimumCoreCount, int? availableCoreCount, int? availableDBStorageInGbs, int? runtimeMinimumCoreCount, string shape, int? availableMemoryInGbs, int? availableLocalStorageInGbs, string computeModel, HardwareType? hardwareType, string descriptionSummary, IDictionary serializedAdditionalRawData) + { + MinimumCoreCount = minimumCoreCount; + AvailableCoreCount = availableCoreCount; + AvailableDBStorageInGbs = availableDBStorageInGbs; + RuntimeMinimumCoreCount = runtimeMinimumCoreCount; + Shape = shape; + AvailableMemoryInGbs = availableMemoryInGbs; + AvailableLocalStorageInGbs = availableLocalStorageInGbs; + ComputeModel = computeModel; + HardwareType = hardwareType; + DescriptionSummary = descriptionSummary; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + public int? MinimumCoreCount { get; } + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + public int? AvailableCoreCount { get; } + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + public int? AvailableDBStorageInGbs { get; } + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + public int? RuntimeMinimumCoreCount { get; } + /// The name of the DB system shape for this Flex Component. + public string Shape { get; } + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + public int? AvailableMemoryInGbs { get; } + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + public int? AvailableLocalStorageInGbs { get; } + /// The compute model of the DB Server for this Flex Component. + public string ComputeModel { get; } + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + public HardwareType? HardwareType { get; } + /// The description summary for this Flex Component. + public string DescriptionSummary { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.Serialization.cs new file mode 100644 index 000000000000..af04025de1c5 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.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.OracleDatabase.Models +{ + internal partial class GiMinorVersionListResult : 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(GiMinorVersionListResult)} 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 + } + } + } + + GiMinorVersionListResult 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(GiMinorVersionListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiMinorVersionListResult(document.RootElement, options); + } + + internal static GiMinorVersionListResult DeserializeGiMinorVersionListResult(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(GiMinorVersionData.DeserializeGiMinorVersionData(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 GiMinorVersionListResult(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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(GiMinorVersionListResult)} does not support writing '{options.Format}' format."); + } + } + + GiMinorVersionListResult 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 DeserializeGiMinorVersionListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiMinorVersionListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.cs new file mode 100644 index 000000000000..6f40be5d6c95 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionListResult.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.OracleDatabase.Models +{ + /// The response of a GiMinorVersion list operation. + internal partial class GiMinorVersionListResult + { + /// + /// 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 GiMinorVersion items on this page. + /// is null. + internal GiMinorVersionListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The GiMinorVersion items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal GiMinorVersionListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GiMinorVersionListResult() + { + } + + /// The GiMinorVersion items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.Serialization.cs new file mode 100644 index 000000000000..8b905a9f9168 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.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.OracleDatabase.Models +{ + public partial class GiMinorVersionProperties : 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(GiMinorVersionProperties)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(GridImageOcid)) + { + writer.WritePropertyName("gridImageOcid"u8); + writer.WriteStringValue(GridImageOcid); + } + 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 + } + } + } + + GiMinorVersionProperties 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(GiMinorVersionProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGiMinorVersionProperties(document.RootElement, options); + } + + internal static GiMinorVersionProperties DeserializeGiMinorVersionProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string version = default; + ResourceIdentifier gridImageOcid = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("version"u8)) + { + version = property.Value.GetString(); + continue; + } + if (property.NameEquals("gridImageOcid"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + gridImageOcid = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new GiMinorVersionProperties(version, gridImageOcid, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(GiMinorVersionProperties)} does not support writing '{options.Format}' format."); + } + } + + GiMinorVersionProperties 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 DeserializeGiMinorVersionProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GiMinorVersionProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.cs new file mode 100644 index 000000000000..71a711c4b919 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GiMinorVersionProperties.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 Azure.Core; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// The Oracle Grid Infrastructure (GI) minor version properties. + public partial class GiMinorVersionProperties + { + /// + /// 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 . + /// A valid Oracle Grid Infrastructure (GI) software version. + /// is null. + public GiMinorVersionProperties(string version) + { + Argument.AssertNotNull(version, nameof(version)); + + Version = version; + } + + /// Initializes a new instance of . + /// A valid Oracle Grid Infrastructure (GI) software version. + /// Grid Infrastructure Image Id. + /// Keeps track of any properties unknown to the library. + internal GiMinorVersionProperties(string version, ResourceIdentifier gridImageOcid, IDictionary serializedAdditionalRawData) + { + Version = version; + GridImageOcid = gridImageOcid; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal GiMinorVersionProperties() + { + } + + /// A valid Oracle Grid Infrastructure (GI) software version. + public string Version { get; set; } + /// Grid Infrastructure Image Id. + public ResourceIdentifier GridImageOcid { get; set; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GridImageType.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GridImageType.cs new file mode 100644 index 000000000000..9e8c86a38d34 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/GridImageType.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.OracleDatabase.Models +{ + /// GridImageType enum. + public readonly partial struct GridImageType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public GridImageType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ReleaseUpdateValue = "ReleaseUpdate"; + private const string CustomImageValue = "CustomImage"; + + /// Release update. + public static GridImageType ReleaseUpdate { get; } = new GridImageType(ReleaseUpdateValue); + /// Custom image. + public static GridImageType CustomImage { get; } = new GridImageType(CustomImageValue); + /// Determines if two values are the same. + public static bool operator ==(GridImageType left, GridImageType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(GridImageType left, GridImageType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator GridImageType(string value) => new GridImageType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is GridImageType other && Equals(other); + /// + public bool Equals(GridImageType 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HardwareType.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HardwareType.cs new file mode 100644 index 000000000000..140261dbd4b7 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/HardwareType.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.OracleDatabase.Models +{ + /// Hardware Type enum. + public readonly partial struct HardwareType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public HardwareType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ComputeValue = "COMPUTE"; + private const string CellValue = "CELL"; + + /// Hardware type is Database Server. + public static HardwareType Compute { get; } = new HardwareType(ComputeValue); + /// Hardware type is Storage Server. + public static HardwareType Cell { get; } = new HardwareType(CellValue); + /// Determines if two values are the same. + public static bool operator ==(HardwareType left, HardwareType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(HardwareType left, HardwareType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator HardwareType(string value) => new HardwareType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is HardwareType other && Equals(other); + /// + public bool Equals(HardwareType 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.Serialization.cs index 2a43df69106a..1bf6be4b2abe 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.Serialization.cs @@ -174,6 +174,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("provisioningState"u8); writer.WriteStringValue(ProvisioningState.Value.ToString()); } + if (options.Format != "W" && Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -231,6 +236,7 @@ internal static OracleDBServerProperties DeserializeOracleDBServerProperties(Jso string shape = default; DateTimeOffset? timeCreated = default; OracleDatabaseResourceProvisioningState? provisioningState = default; + AutonomousDatabaseComputeModel? computeModel = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -451,6 +457,15 @@ internal static OracleDBServerProperties DeserializeOracleDBServerProperties(Jso provisioningState = new OracleDatabaseResourceProvisioningState(property.Value.GetString()); continue; } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new AutonomousDatabaseComputeModel(property.Value.GetString()); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -478,6 +493,7 @@ internal static OracleDBServerProperties DeserializeOracleDBServerProperties(Jso shape, timeCreated, provisioningState, + computeModel, serializedAdditionalRawData); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.cs index 5474e675f4e7..036768564c64 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBServerProperties.cs @@ -76,8 +76,9 @@ public OracleDBServerProperties() /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. /// The date and time that the Db Server was created. /// Azure resource provisioning state. + /// The compute model of the Exadata Infrastructure. /// Keeps track of any properties unknown to the library. - internal OracleDBServerProperties(ResourceIdentifier ocid, string displayName, ResourceIdentifier compartmentId, ResourceIdentifier exadataInfrastructureId, int? cpuCoreCount, DBServerPatchingDetails dbServerPatchingDetails, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, IReadOnlyList vmClusterIds, IReadOnlyList dbNodeIds, string lifecycleDetails, DBServerProvisioningState? lifecycleState, int? maxCpuCount, IReadOnlyList autonomousVmClusterIds, IReadOnlyList autonomousVirtualMachineIds, int? maxDBNodeStorageInGbs, int? memorySizeInGbs, string shape, DateTimeOffset? createdOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal OracleDBServerProperties(ResourceIdentifier ocid, string displayName, ResourceIdentifier compartmentId, ResourceIdentifier exadataInfrastructureId, int? cpuCoreCount, DBServerPatchingDetails dbServerPatchingDetails, int? maxMemoryInGbs, int? dbNodeStorageSizeInGbs, IReadOnlyList vmClusterIds, IReadOnlyList dbNodeIds, string lifecycleDetails, DBServerProvisioningState? lifecycleState, int? maxCpuCount, IReadOnlyList autonomousVmClusterIds, IReadOnlyList autonomousVirtualMachineIds, int? maxDBNodeStorageInGbs, int? memorySizeInGbs, string shape, DateTimeOffset? createdOn, OracleDatabaseResourceProvisioningState? provisioningState, AutonomousDatabaseComputeModel? computeModel, IDictionary serializedAdditionalRawData) { Ocid = ocid; DisplayName = displayName; @@ -99,6 +100,7 @@ internal OracleDBServerProperties(ResourceIdentifier ocid, string displayName, R Shape = shape; CreatedOn = createdOn; ProvisioningState = provisioningState; + ComputeModel = computeModel; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -142,5 +144,7 @@ internal OracleDBServerProperties(ResourceIdentifier ocid, string displayName, R public DateTimeOffset? CreatedOn { get; } /// Azure resource provisioning state. public OracleDatabaseResourceProvisioningState? ProvisioningState { get; } + /// The compute model of the Exadata Infrastructure. + public AutonomousDatabaseComputeModel? ComputeModel { get; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs index dccf8777867b..4d961b09d36c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.Serialization.cs @@ -34,106 +34,120 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OracleDBSystemShapeProperties)} does not support writing '{format}' format."); } - if (options.Format != "W" && Optional.IsDefined(ShapeFamily)) + if (Optional.IsDefined(ShapeFamily)) { writer.WritePropertyName("shapeFamily"u8); writer.WriteStringValue(ShapeFamily); } - if (options.Format != "W") - { - writer.WritePropertyName("availableCoreCount"u8); - writer.WriteNumberValue(AvailableCoreCount); - } - if (options.Format != "W" && Optional.IsDefined(MinimumCoreCount)) + writer.WritePropertyName("shapeName"u8); + writer.WriteStringValue(ShapeName); + writer.WritePropertyName("availableCoreCount"u8); + writer.WriteNumberValue(AvailableCoreCount); + if (Optional.IsDefined(MinimumCoreCount)) { writer.WritePropertyName("minimumCoreCount"u8); writer.WriteNumberValue(MinimumCoreCount.Value); } - if (options.Format != "W" && Optional.IsDefined(RuntimeMinimumCoreCount)) + if (Optional.IsDefined(RuntimeMinimumCoreCount)) { writer.WritePropertyName("runtimeMinimumCoreCount"u8); writer.WriteNumberValue(RuntimeMinimumCoreCount.Value); } - if (options.Format != "W" && Optional.IsDefined(CoreCountIncrement)) + if (Optional.IsDefined(CoreCountIncrement)) { writer.WritePropertyName("coreCountIncrement"u8); writer.WriteNumberValue(CoreCountIncrement.Value); } - if (options.Format != "W" && Optional.IsDefined(MinStorageCount)) + if (Optional.IsDefined(MinStorageCount)) { writer.WritePropertyName("minStorageCount"u8); writer.WriteNumberValue(MinStorageCount.Value); } - if (options.Format != "W" && Optional.IsDefined(MaxStorageCount)) + if (Optional.IsDefined(MaxStorageCount)) { writer.WritePropertyName("maxStorageCount"u8); writer.WriteNumberValue(MaxStorageCount.Value); } - if (options.Format != "W" && Optional.IsDefined(AvailableDataStoragePerServerInTbs)) + if (Optional.IsDefined(AvailableDataStoragePerServerInTbs)) { writer.WritePropertyName("availableDataStoragePerServerInTbs"u8); writer.WriteNumberValue(AvailableDataStoragePerServerInTbs.Value); } - if (options.Format != "W" && Optional.IsDefined(AvailableMemoryPerNodeInGbs)) + if (Optional.IsDefined(AvailableMemoryPerNodeInGbs)) { writer.WritePropertyName("availableMemoryPerNodeInGbs"u8); writer.WriteNumberValue(AvailableMemoryPerNodeInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(AvailableDBNodePerNodeInGbs)) + if (Optional.IsDefined(AvailableDBNodePerNodeInGbs)) { writer.WritePropertyName("availableDbNodePerNodeInGbs"u8); writer.WriteNumberValue(AvailableDBNodePerNodeInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(MinCoreCountPerNode)) + if (Optional.IsDefined(MinCoreCountPerNode)) { writer.WritePropertyName("minCoreCountPerNode"u8); writer.WriteNumberValue(MinCoreCountPerNode.Value); } - if (options.Format != "W" && Optional.IsDefined(AvailableMemoryInGbs)) + if (Optional.IsDefined(AvailableMemoryInGbs)) { writer.WritePropertyName("availableMemoryInGbs"u8); writer.WriteNumberValue(AvailableMemoryInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(MinMemoryPerNodeInGbs)) + if (Optional.IsDefined(MinMemoryPerNodeInGbs)) { writer.WritePropertyName("minMemoryPerNodeInGbs"u8); writer.WriteNumberValue(MinMemoryPerNodeInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(AvailableDBNodeStorageInGbs)) + if (Optional.IsDefined(AvailableDBNodeStorageInGbs)) { writer.WritePropertyName("availableDbNodeStorageInGbs"u8); writer.WriteNumberValue(AvailableDBNodeStorageInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(MinDBNodeStoragePerNodeInGbs)) + if (Optional.IsDefined(MinDBNodeStoragePerNodeInGbs)) { writer.WritePropertyName("minDbNodeStoragePerNodeInGbs"u8); writer.WriteNumberValue(MinDBNodeStoragePerNodeInGbs.Value); } - if (options.Format != "W" && Optional.IsDefined(AvailableDataStorageInTbs)) + if (Optional.IsDefined(AvailableDataStorageInTbs)) { writer.WritePropertyName("availableDataStorageInTbs"u8); writer.WriteNumberValue(AvailableDataStorageInTbs.Value); } - if (options.Format != "W" && Optional.IsDefined(MinDataStorageInTbs)) + if (Optional.IsDefined(MinDataStorageInTbs)) { writer.WritePropertyName("minDataStorageInTbs"u8); writer.WriteNumberValue(MinDataStorageInTbs.Value); } - if (options.Format != "W" && Optional.IsDefined(MinimumNodeCount)) + if (Optional.IsDefined(MinimumNodeCount)) { writer.WritePropertyName("minimumNodeCount"u8); writer.WriteNumberValue(MinimumNodeCount.Value); } - if (options.Format != "W" && Optional.IsDefined(MaximumNodeCount)) + if (Optional.IsDefined(MaximumNodeCount)) { writer.WritePropertyName("maximumNodeCount"u8); writer.WriteNumberValue(MaximumNodeCount.Value); } - if (options.Format != "W" && Optional.IsDefined(AvailableCoreCountPerNode)) + if (Optional.IsDefined(AvailableCoreCountPerNode)) { writer.WritePropertyName("availableCoreCountPerNode"u8); writer.WriteNumberValue(AvailableCoreCountPerNode.Value); } + if (Optional.IsDefined(ComputeModel)) + { + writer.WritePropertyName("computeModel"u8); + writer.WriteStringValue(ComputeModel.Value.ToString()); + } + if (Optional.IsDefined(AreServerTypesSupported)) + { + writer.WritePropertyName("areServerTypesSupported"u8); + writer.WriteBooleanValue(AreServerTypesSupported.Value); + } + if (Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -172,6 +186,7 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp return null; } string shapeFamily = default; + string shapeName = default; int availableCoreCount = default; int? minimumCoreCount = default; int? runtimeMinimumCoreCount = default; @@ -191,6 +206,9 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp int? minimumNodeCount = default; int? maximumNodeCount = default; int? availableCoreCountPerNode = default; + AutonomousDatabaseComputeModel? computeModel = default; + bool? areServerTypesSupported = default; + string displayName = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -200,6 +218,11 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp shapeFamily = property.Value.GetString(); continue; } + if (property.NameEquals("shapeName"u8)) + { + shapeName = property.Value.GetString(); + continue; + } if (property.NameEquals("availableCoreCount"u8)) { availableCoreCount = property.Value.GetInt32(); @@ -367,6 +390,29 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp availableCoreCountPerNode = property.Value.GetInt32(); continue; } + if (property.NameEquals("computeModel"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + computeModel = new AutonomousDatabaseComputeModel(property.Value.GetString()); + continue; + } + if (property.NameEquals("areServerTypesSupported"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + areServerTypesSupported = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -375,6 +421,7 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp serializedAdditionalRawData = rawDataDictionary; return new OracleDBSystemShapeProperties( shapeFamily, + shapeName, availableCoreCount, minimumCoreCount, runtimeMinimumCoreCount, @@ -394,6 +441,9 @@ internal static OracleDBSystemShapeProperties DeserializeOracleDBSystemShapeProp minimumNodeCount, maximumNodeCount, availableCoreCountPerNode, + computeModel, + areServerTypesSupported, + displayName, serializedAdditionalRawData); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs index 74ad3267ecf9..8bce83feb76e 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDBSystemShapeProperties.cs @@ -46,14 +46,20 @@ public partial class OracleDBSystemShapeProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . + /// The shape used for the DB system. /// The maximum number of CPU cores that can be enabled on the DB system for this shape. - public OracleDBSystemShapeProperties(int availableCoreCount) + /// is null. + public OracleDBSystemShapeProperties(string shapeName, int availableCoreCount) { + Argument.AssertNotNull(shapeName, nameof(shapeName)); + + ShapeName = shapeName; AvailableCoreCount = availableCoreCount; } /// Initializes a new instance of . /// The family of the shape used for the DB system. + /// The shape used for the DB system. /// The maximum number of CPU cores that can be enabled on the DB system for this shape. /// The minimum number of CPU cores that can be enabled on the DB system for this shape. /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. @@ -73,10 +79,14 @@ public OracleDBSystemShapeProperties(int availableCoreCount) /// The minimum number of database nodes available for this shape. /// The maximum number of database nodes available for this shape. /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. + /// The compute model of the Exadata Infrastructure. + /// Indicates if the shape supports database and storage server types. + /// The display name of the shape used for the DB system. /// Keeps track of any properties unknown to the library. - internal OracleDBSystemShapeProperties(string shapeFamily, int availableCoreCount, int? minimumCoreCount, int? runtimeMinimumCoreCount, int? coreCountIncrement, int? minStorageCount, int? maxStorageCount, double? availableDataStoragePerServerInTbs, int? availableMemoryPerNodeInGbs, int? availableDBNodePerNodeInGbs, int? minCoreCountPerNode, int? availableMemoryInGbs, int? minMemoryPerNodeInGbs, int? availableDBNodeStorageInGbs, int? minDBNodeStoragePerNodeInGbs, int? availableDataStorageInTbs, int? minDataStorageInTbs, int? minimumNodeCount, int? maximumNodeCount, int? availableCoreCountPerNode, IDictionary serializedAdditionalRawData) + internal OracleDBSystemShapeProperties(string shapeFamily, string shapeName, int availableCoreCount, int? minimumCoreCount, int? runtimeMinimumCoreCount, int? coreCountIncrement, int? minStorageCount, int? maxStorageCount, double? availableDataStoragePerServerInTbs, int? availableMemoryPerNodeInGbs, int? availableDBNodePerNodeInGbs, int? minCoreCountPerNode, int? availableMemoryInGbs, int? minMemoryPerNodeInGbs, int? availableDBNodeStorageInGbs, int? minDBNodeStoragePerNodeInGbs, int? availableDataStorageInTbs, int? minDataStorageInTbs, int? minimumNodeCount, int? maximumNodeCount, int? availableCoreCountPerNode, AutonomousDatabaseComputeModel? computeModel, bool? areServerTypesSupported, string displayName, IDictionary serializedAdditionalRawData) { ShapeFamily = shapeFamily; + ShapeName = shapeName; AvailableCoreCount = availableCoreCount; MinimumCoreCount = minimumCoreCount; RuntimeMinimumCoreCount = runtimeMinimumCoreCount; @@ -96,6 +106,9 @@ internal OracleDBSystemShapeProperties(string shapeFamily, int availableCoreCoun MinimumNodeCount = minimumNodeCount; MaximumNodeCount = maximumNodeCount; AvailableCoreCountPerNode = availableCoreCountPerNode; + ComputeModel = computeModel; + AreServerTypesSupported = areServerTypesSupported; + DisplayName = displayName; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -105,44 +118,52 @@ internal OracleDBSystemShapeProperties() } /// The family of the shape used for the DB system. - public string ShapeFamily { get; } + public string ShapeFamily { get; set; } + /// The shape used for the DB system. + public string ShapeName { get; set; } /// The maximum number of CPU cores that can be enabled on the DB system for this shape. - public int AvailableCoreCount { get; } + public int AvailableCoreCount { get; set; } /// The minimum number of CPU cores that can be enabled on the DB system for this shape. - public int? MinimumCoreCount { get; } + public int? MinimumCoreCount { get; set; } /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. - public int? RuntimeMinimumCoreCount { get; } + public int? RuntimeMinimumCoreCount { get; set; } /// The discrete number by which the CPU core count for this shape can be increased or decreased. - public int? CoreCountIncrement { get; } + public int? CoreCountIncrement { get; set; } /// The minimum number of Exadata storage servers available for the Exadata infrastructure. - public int? MinStorageCount { get; } + public int? MinStorageCount { get; set; } /// The maximum number of Exadata storage servers available for the Exadata infrastructure. - public int? MaxStorageCount { get; } + public int? MaxStorageCount { get; set; } /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. - public double? AvailableDataStoragePerServerInTbs { get; } + public double? AvailableDataStoragePerServerInTbs { get; set; } /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. - public int? AvailableMemoryPerNodeInGbs { get; } + public int? AvailableMemoryPerNodeInGbs { get; set; } /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. - public int? AvailableDBNodePerNodeInGbs { get; } + public int? AvailableDBNodePerNodeInGbs { get; set; } /// The minimum number of CPU cores that can be enabled per node for this shape. - public int? MinCoreCountPerNode { get; } + public int? MinCoreCountPerNode { get; set; } /// The maximum memory that can be enabled for this shape. - public int? AvailableMemoryInGbs { get; } + public int? AvailableMemoryInGbs { get; set; } /// The minimum memory that need be allocated per node for this shape. - public int? MinMemoryPerNodeInGbs { get; } + public int? MinMemoryPerNodeInGbs { get; set; } /// The maximum Db Node storage that can be enabled for this shape. - public int? AvailableDBNodeStorageInGbs { get; } + public int? AvailableDBNodeStorageInGbs { get; set; } /// The minimum Db Node storage that need be allocated per node for this shape. - public int? MinDBNodeStoragePerNodeInGbs { get; } + public int? MinDBNodeStoragePerNodeInGbs { get; set; } /// The maximum DATA storage that can be enabled for this shape. - public int? AvailableDataStorageInTbs { get; } + public int? AvailableDataStorageInTbs { get; set; } /// The minimum data storage that need be allocated for this shape. - public int? MinDataStorageInTbs { get; } + public int? MinDataStorageInTbs { get; set; } /// The minimum number of database nodes available for this shape. - public int? MinimumNodeCount { get; } + public int? MinimumNodeCount { get; set; } /// The maximum number of database nodes available for this shape. - public int? MaximumNodeCount { get; } + public int? MaximumNodeCount { get; set; } /// The maximum number of CPU cores per database node that can be enabled for this shape. Only applicable to the flex Exadata shape and ExaCC Elastic shapes. - public int? AvailableCoreCountPerNode { get; } + public int? AvailableCoreCountPerNode { get; set; } + /// The compute model of the Exadata Infrastructure. + public AutonomousDatabaseComputeModel? ComputeModel { get; set; } + /// Indicates if the shape supports database and storage server types. + public bool? AreServerTypesSupported { get; set; } + /// The display name of the shape used for the DB system. + public string DisplayName { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDataBaseType.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDataBaseType.cs index fca1005cf73f..c5a412dda8f1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDataBaseType.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDataBaseType.cs @@ -24,11 +24,17 @@ public OracleDataBaseType(string value) private const string RegularValue = "Regular"; private const string CloneValue = "Clone"; + private const string CloneFromBackupTimestampValue = "CloneFromBackupTimestamp"; + private const string CrossRegionDisasterRecoveryValue = "CrossRegionDisasterRecovery"; /// Regular DB. public static OracleDataBaseType Regular { get; } = new OracleDataBaseType(RegularValue); /// Clone DB. public static OracleDataBaseType Clone { get; } = new OracleDataBaseType(CloneValue); + /// Clone DB from backup timestamp. + public static OracleDataBaseType CloneFromBackupTimestamp { get; } = new OracleDataBaseType(CloneFromBackupTimestampValue); + /// Cross Region Disaster Recovery. + public static OracleDataBaseType CrossRegionDisasterRecovery { get; } = new OracleDataBaseType(CrossRegionDisasterRecoveryValue); /// Determines if two values are the same. public static bool operator ==(OracleDataBaseType left, OracleDataBaseType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs index d0f8aab116dd..3f68d09766fe 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.Serialization.cs @@ -34,41 +34,20 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OracleDnsPrivateViewProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("ocid"u8); - writer.WriteStringValue(Ocid); - } - if (options.Format != "W" && Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (options.Format != "W") - { - writer.WritePropertyName("isProtected"u8); - writer.WriteBooleanValue(IsProtected); - } - if (options.Format != "W" && Optional.IsDefined(LifecycleState)) - { - writer.WritePropertyName("lifecycleState"u8); - writer.WriteStringValue(LifecycleState.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("self"u8); - writer.WriteStringValue(Self); - } - if (options.Format != "W") - { - writer.WritePropertyName("timeCreated"u8); - writer.WriteStringValue(CreatedOn, "O"); - } - if (options.Format != "W") - { - writer.WritePropertyName("timeUpdated"u8); - writer.WriteStringValue(UpdatedOn, "O"); - } + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + writer.WritePropertyName("isProtected"u8); + writer.WriteBooleanValue(IsProtected); + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.ToString()); + writer.WritePropertyName("self"u8); + writer.WriteStringValue(Self); + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(CreatedOn, "O"); + writer.WritePropertyName("timeUpdated"u8); + writer.WriteStringValue(UpdatedOn, "O"); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -114,7 +93,7 @@ internal static OracleDnsPrivateViewProperties DeserializeOracleDnsPrivateViewPr ResourceIdentifier ocid = default; string displayName = default; bool isProtected = default; - DnsPrivateViewsLifecycleState? lifecycleState = default; + DnsPrivateViewsLifecycleState lifecycleState = default; string self = default; DateTimeOffset timeCreated = default; DateTimeOffset timeUpdated = default; @@ -140,10 +119,6 @@ internal static OracleDnsPrivateViewProperties DeserializeOracleDnsPrivateViewPr } if (property.NameEquals("lifecycleState"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } lifecycleState = new DnsPrivateViewsLifecycleState(property.Value.GetString()); continue; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs index c8b26ebd44fd..e47e51026240 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateViewProperties.cs @@ -48,14 +48,23 @@ public partial class OracleDnsPrivateViewProperties /// Initializes a new instance of . /// The OCID of the view. + /// The display name of the view resource. /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Views lifecycleState. /// The canonical absolute URL of the resource. /// views timeCreated. /// views timeCreated. - public OracleDnsPrivateViewProperties(ResourceIdentifier ocid, bool isProtected, string self, DateTimeOffset createdOn, DateTimeOffset updatedOn) + /// , or is null. + public OracleDnsPrivateViewProperties(ResourceIdentifier ocid, string displayName, bool isProtected, DnsPrivateViewsLifecycleState lifecycleState, string self, DateTimeOffset createdOn, DateTimeOffset updatedOn) { + Argument.AssertNotNull(ocid, nameof(ocid)); + Argument.AssertNotNull(displayName, nameof(displayName)); + Argument.AssertNotNull(self, nameof(self)); + Ocid = ocid; + DisplayName = displayName; IsProtected = isProtected; + LifecycleState = lifecycleState; Self = self; CreatedOn = createdOn; UpdatedOn = updatedOn; @@ -71,7 +80,7 @@ public OracleDnsPrivateViewProperties(ResourceIdentifier ocid, bool isProtected, /// views timeCreated. /// Azure resource provisioning state. /// Keeps track of any properties unknown to the library. - internal OracleDnsPrivateViewProperties(ResourceIdentifier ocid, string displayName, bool isProtected, DnsPrivateViewsLifecycleState? lifecycleState, string self, DateTimeOffset createdOn, DateTimeOffset updatedOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal OracleDnsPrivateViewProperties(ResourceIdentifier ocid, string displayName, bool isProtected, DnsPrivateViewsLifecycleState lifecycleState, string self, DateTimeOffset createdOn, DateTimeOffset updatedOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { Ocid = ocid; DisplayName = displayName; @@ -90,19 +99,19 @@ internal OracleDnsPrivateViewProperties() } /// The OCID of the view. - public ResourceIdentifier Ocid { get; } + public ResourceIdentifier Ocid { get; set; } /// The display name of the view resource. - public string DisplayName { get; } + public string DisplayName { get; set; } /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. - public bool IsProtected { get; } + public bool IsProtected { get; set; } /// Views lifecycleState. - public DnsPrivateViewsLifecycleState? LifecycleState { get; } + public DnsPrivateViewsLifecycleState LifecycleState { get; set; } /// The canonical absolute URL of the resource. - public string Self { get; } + public string Self { get; set; } /// views timeCreated. - public DateTimeOffset CreatedOn { get; } + public DateTimeOffset CreatedOn { get; set; } /// views timeCreated. - public DateTimeOffset UpdatedOn { get; } + public DateTimeOffset UpdatedOn { get; set; } /// Azure resource provisioning state. public OracleDatabaseResourceProvisioningState? ProvisioningState { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs index 872b10c91c3b..d748fb27d531 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.Serialization.cs @@ -34,51 +34,27 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OracleDnsPrivateZoneProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("ocid"u8); - writer.WriteStringValue(Ocid); - } - if (options.Format != "W") - { - writer.WritePropertyName("isProtected"u8); - writer.WriteBooleanValue(IsProtected); - } - if (options.Format != "W" && Optional.IsDefined(LifecycleState)) - { - writer.WritePropertyName("lifecycleState"u8); - writer.WriteStringValue(LifecycleState.Value.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("self"u8); - writer.WriteStringValue(Self); - } - if (options.Format != "W") - { - writer.WritePropertyName("serial"u8); - writer.WriteNumberValue(Serial); - } - if (options.Format != "W") - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } - if (options.Format != "W" && Optional.IsDefined(ViewId)) + writer.WritePropertyName("ocid"u8); + writer.WriteStringValue(Ocid); + writer.WritePropertyName("isProtected"u8); + writer.WriteBooleanValue(IsProtected); + writer.WritePropertyName("lifecycleState"u8); + writer.WriteStringValue(LifecycleState.ToString()); + writer.WritePropertyName("self"u8); + writer.WriteStringValue(Self); + writer.WritePropertyName("serial"u8); + writer.WriteNumberValue(Serial); + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (Optional.IsDefined(ViewId)) { writer.WritePropertyName("viewId"u8); writer.WriteStringValue(ViewId); } - if (options.Format != "W") - { - writer.WritePropertyName("zoneType"u8); - writer.WriteStringValue(ZoneType.ToString()); - } - if (options.Format != "W") - { - writer.WritePropertyName("timeCreated"u8); - writer.WriteStringValue(CreatedOn, "O"); - } + writer.WritePropertyName("zoneType"u8); + writer.WriteStringValue(ZoneType.ToString()); + writer.WritePropertyName("timeCreated"u8); + writer.WriteStringValue(CreatedOn, "O"); if (options.Format != "W" && Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"u8); @@ -123,7 +99,7 @@ internal static OracleDnsPrivateZoneProperties DeserializeOracleDnsPrivateZonePr } ResourceIdentifier ocid = default; bool isProtected = default; - DnsPrivateZonesLifecycleState? lifecycleState = default; + DnsPrivateZonesLifecycleState lifecycleState = default; string self = default; int serial = default; string version = default; @@ -147,10 +123,6 @@ internal static OracleDnsPrivateZoneProperties DeserializeOracleDnsPrivateZonePr } if (property.NameEquals("lifecycleState"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } lifecycleState = new DnsPrivateZonesLifecycleState(property.Value.GetString()); continue; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs index 767e429526c0..bb80c4e598d9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleDnsPrivateZoneProperties.cs @@ -49,15 +49,22 @@ public partial class OracleDnsPrivateZoneProperties /// Initializes a new instance of . /// The OCID of the Zone. /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// Zones lifecycleState. /// The canonical absolute URL of the resource. /// The current serial of the zone. As seen in the zone's SOA record. /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. /// Zones timeCreated. - public OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, string self, int serial, string version, OracleDnsPrivateZoneType zoneType, DateTimeOffset createdOn) + /// , or is null. + public OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, DnsPrivateZonesLifecycleState lifecycleState, string self, int serial, string version, OracleDnsPrivateZoneType zoneType, DateTimeOffset createdOn) { + Argument.AssertNotNull(ocid, nameof(ocid)); + Argument.AssertNotNull(self, nameof(self)); + Argument.AssertNotNull(version, nameof(version)); + Ocid = ocid; IsProtected = isProtected; + LifecycleState = lifecycleState; Self = self; Serial = serial; Version = version; @@ -77,7 +84,7 @@ public OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, /// Zones timeCreated. /// Azure resource provisioning state. /// Keeps track of any properties unknown to the library. - internal OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, DnsPrivateZonesLifecycleState? lifecycleState, string self, int serial, string version, ResourceIdentifier viewId, OracleDnsPrivateZoneType zoneType, DateTimeOffset createdOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) + internal OracleDnsPrivateZoneProperties(ResourceIdentifier ocid, bool isProtected, DnsPrivateZonesLifecycleState lifecycleState, string self, int serial, string version, ResourceIdentifier viewId, OracleDnsPrivateZoneType zoneType, DateTimeOffset createdOn, OracleDatabaseResourceProvisioningState? provisioningState, IDictionary serializedAdditionalRawData) { Ocid = ocid; IsProtected = isProtected; @@ -98,23 +105,23 @@ internal OracleDnsPrivateZoneProperties() } /// The OCID of the Zone. - public ResourceIdentifier Ocid { get; } + public ResourceIdentifier Ocid { get; set; } /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. - public bool IsProtected { get; } + public bool IsProtected { get; set; } /// Zones lifecycleState. - public DnsPrivateZonesLifecycleState? LifecycleState { get; } + public DnsPrivateZonesLifecycleState LifecycleState { get; set; } /// The canonical absolute URL of the resource. - public string Self { get; } + public string Self { get; set; } /// The current serial of the zone. As seen in the zone's SOA record. - public int Serial { get; } + public int Serial { get; set; } /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived. - public string Version { get; } + public string Version { get; set; } /// The OCID of the private view containing the zone. This value will be null for zones in the global DNS, which are publicly resolvable and not part of a private view. - public ResourceIdentifier ViewId { get; } + public ResourceIdentifier ViewId { get; set; } /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. - public OracleDnsPrivateZoneType ZoneType { get; } + public OracleDnsPrivateZoneType ZoneType { get; set; } /// Zones timeCreated. - public DateTimeOffset CreatedOn { get; } + public DateTimeOffset CreatedOn { get; set; } /// Azure resource provisioning state. public OracleDatabaseResourceProvisioningState? ProvisioningState { get; } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs index 6ee0a950acc7..9a79d2107fc9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OracleGIVersionProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs index 1fb55ebcb869..8d5d7252ae85 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleGIVersionProperties.cs @@ -47,8 +47,11 @@ internal partial class OracleGIVersionProperties /// Initializes a new instance of . /// A valid Oracle Grid Infrastructure (GI) software version. + /// is null. public OracleGIVersionProperties(string version) { + Argument.AssertNotNull(version, nameof(version)); + Version = version; } @@ -67,6 +70,6 @@ internal OracleGIVersionProperties() } /// A valid Oracle Grid Infrastructure (GI) software version. - public string Version { get; } + public string Version { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs index 86d3ac06d0a0..0c3c8e379f39 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionPatch.cs @@ -53,7 +53,7 @@ public OracleSubscriptionPatch() /// Initializes a new instance of . /// Details of the resource plan. - /// The updatable properties of the OracleSubscription. + /// The resource-specific properties for this resource. /// Keeps track of any properties unknown to the library. internal OracleSubscriptionPatch(ArmPlan plan, OracleSubscriptionUpdateProperties properties, IDictionary serializedAdditionalRawData) { @@ -64,7 +64,7 @@ internal OracleSubscriptionPatch(ArmPlan plan, OracleSubscriptionUpdatePropertie /// Details of the resource plan. public ArmPlan Plan { get; set; } - /// The updatable properties of the OracleSubscription. + /// The resource-specific properties for this resource. public OracleSubscriptionUpdateProperties Properties { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs index a50346ac69f1..ed5ebe897854 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.Serialization.cs @@ -69,6 +69,26 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("intent"u8); writer.WriteStringValue(Intent.Value.ToString()); } + if (options.Format != "W" && Optional.IsCollectionDefined(AzureSubscriptionIds)) + { + writer.WritePropertyName("azureSubscriptionIds"u8); + writer.WriteStartArray(); + foreach (var item in AzureSubscriptionIds) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(AddSubscriptionOperationState)) + { + writer.WritePropertyName("addSubscriptionOperationState"u8); + writer.WriteStringValue(AddSubscriptionOperationState.Value.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(LastOperationStatusDetail)) + { + writer.WritePropertyName("lastOperationStatusDetail"u8); + writer.WriteStringValue(LastOperationStatusDetail); + } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -113,6 +133,9 @@ internal static OracleSubscriptionProperties DeserializeOracleSubscriptionProper string termUnit = default; string productCode = default; OracleSubscriptionUpdateIntent? intent = default; + IReadOnlyList azureSubscriptionIds = default; + AddSubscriptionOperationState? addSubscriptionOperationState = default; + string lastOperationStatusDetail = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -168,6 +191,34 @@ internal static OracleSubscriptionProperties DeserializeOracleSubscriptionProper intent = new OracleSubscriptionUpdateIntent(property.Value.GetString()); continue; } + if (property.NameEquals("azureSubscriptionIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + azureSubscriptionIds = array; + continue; + } + if (property.NameEquals("addSubscriptionOperationState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + addSubscriptionOperationState = new AddSubscriptionOperationState(property.Value.GetString()); + continue; + } + if (property.NameEquals("lastOperationStatusDetail"u8)) + { + lastOperationStatusDetail = property.Value.GetString(); + continue; + } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); @@ -182,6 +233,9 @@ internal static OracleSubscriptionProperties DeserializeOracleSubscriptionProper termUnit, productCode, intent, + azureSubscriptionIds ?? new ChangeTrackingList(), + addSubscriptionOperationState, + lastOperationStatusDetail, serializedAdditionalRawData); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs index 46663dd20aa9..dfc8fdd17f47 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSubscriptionProperties.cs @@ -49,6 +49,7 @@ public partial class OracleSubscriptionProperties /// Initializes a new instance of . public OracleSubscriptionProperties() { + AzureSubscriptionIds = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -59,8 +60,11 @@ public OracleSubscriptionProperties() /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601. /// Product code for the term unit. /// Intent for the update operation. + /// Azure subscriptions to be added. + /// State of the add Azure subscription operation on Oracle subscription. + /// Status details of the last operation on Oracle subscription. /// Keeps track of any properties unknown to the library. - internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, ResourceIdentifier cloudAccountId, CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, OracleSubscriptionUpdateIntent? intent, IDictionary serializedAdditionalRawData) + internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provisioningState, string saasSubscriptionId, ResourceIdentifier cloudAccountId, CloudAccountProvisioningState? cloudAccountState, string termUnit, string productCode, OracleSubscriptionUpdateIntent? intent, IReadOnlyList azureSubscriptionIds, AddSubscriptionOperationState? addSubscriptionOperationState, string lastOperationStatusDetail, IDictionary serializedAdditionalRawData) { ProvisioningState = provisioningState; SaasSubscriptionId = saasSubscriptionId; @@ -69,6 +73,9 @@ internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provi TermUnit = termUnit; ProductCode = productCode; Intent = intent; + AzureSubscriptionIds = azureSubscriptionIds; + AddSubscriptionOperationState = addSubscriptionOperationState; + LastOperationStatusDetail = lastOperationStatusDetail; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -86,5 +93,11 @@ internal OracleSubscriptionProperties(OracleSubscriptionProvisioningState? provi public string ProductCode { get; set; } /// Intent for the update operation. public OracleSubscriptionUpdateIntent? Intent { get; set; } + /// Azure subscriptions to be added. + public IReadOnlyList AzureSubscriptionIds { get; } + /// State of the add Azure subscription operation on Oracle subscription. + public AddSubscriptionOperationState? AddSubscriptionOperationState { get; } + /// Status details of the last operation on Oracle subscription. + public string LastOperationStatusDetail { get; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs index 2ac53ae9ccf0..91a042cccecd 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.Serialization.cs @@ -34,11 +34,8 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(OracleSystemVersionProperties)} does not support writing '{format}' format."); } - if (options.Format != "W") - { - writer.WritePropertyName("systemVersion"u8); - writer.WriteStringValue(SystemVersion); - } + writer.WritePropertyName("systemVersion"u8); + writer.WriteStringValue(SystemVersion); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs index 51122b328aed..5c7f8c510e28 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/OracleSystemVersionProperties.cs @@ -47,8 +47,11 @@ internal partial class OracleSystemVersionProperties /// Initializes a new instance of . /// A valid Oracle System Version. + /// is null. public OracleSystemVersionProperties(string systemVersion) { + Argument.AssertNotNull(systemVersion, nameof(systemVersion)); + SystemVersion = systemVersion; } @@ -67,6 +70,6 @@ internal OracleSystemVersionProperties() } /// A valid Oracle System Version. - public string SystemVersion { get; } + public string SystemVersion { get; set; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.Serialization.cs new file mode 100644 index 000000000000..c2d1a05e664f --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.Serialization.cs @@ -0,0 +1,136 @@ +// 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.OracleDatabase.Models +{ + public partial class RemoveVirtualMachineFromExadbVmClusterDetails : 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(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("dbNodes"u8); + writer.WriteStartArray(); + foreach (var item in DBNodes) + { + 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 + } + } + } + + RemoveVirtualMachineFromExadbVmClusterDetails 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(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRemoveVirtualMachineFromExadbVmClusterDetails(document.RootElement, options); + } + + internal static RemoveVirtualMachineFromExadbVmClusterDetails DeserializeRemoveVirtualMachineFromExadbVmClusterDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList dbNodes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("dbNodes"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(DBNodeDetails.DeserializeDBNodeDetails(item, options)); + } + dbNodes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new RemoveVirtualMachineFromExadbVmClusterDetails(dbNodes, 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, AzureResourceManagerOracleDatabaseContext.Default); + default: + throw new FormatException($"The model {nameof(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support writing '{options.Format}' format."); + } + } + + RemoveVirtualMachineFromExadbVmClusterDetails 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 DeserializeRemoveVirtualMachineFromExadbVmClusterDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RemoveVirtualMachineFromExadbVmClusterDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.cs new file mode 100644 index 000000000000..281e9caa050c --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/RemoveVirtualMachineFromExadbVmClusterDetails.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 System.Linq; + +namespace Azure.ResourceManager.OracleDatabase.Models +{ + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + public partial class RemoveVirtualMachineFromExadbVmClusterDetails + { + /// + /// 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 list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// is null. + public RemoveVirtualMachineFromExadbVmClusterDetails(IEnumerable dbNodes) + { + Argument.AssertNotNull(dbNodes, nameof(dbNodes)); + + DBNodes = dbNodes.ToList(); + } + + /// Initializes a new instance of . + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// Keeps track of any properties unknown to the library. + internal RemoveVirtualMachineFromExadbVmClusterDetails(IList dbNodes, IDictionary serializedAdditionalRawData) + { + DBNodes = dbNodes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal RemoveVirtualMachineFromExadbVmClusterDetails() + { + } + + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + public IList DBNodes { get; } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ShapeFamily.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ShapeFamily.cs new file mode 100644 index 000000000000..5eefe1bf5e62 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/ShapeFamily.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.OracleDatabase.Models +{ + /// Allowed values for GI Minor Versions shapeFamily filter. + public readonly partial struct ShapeFamily : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ShapeFamily(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExadataValue = "EXADATA"; + private const string ExadbXsValue = "EXADB_XS"; + + /// Family value for Exadata Shape. + public static ShapeFamily Exadata { get; } = new ShapeFamily(ExadataValue); + /// Family value for Exadb XS Shape. + public static ShapeFamily ExadbXs { get; } = new ShapeFamily(ExadbXsValue); + /// Determines if two values are the same. + public static bool operator ==(ShapeFamily left, ShapeFamily right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ShapeFamily left, ShapeFamily right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator ShapeFamily(string value) => new ShapeFamily(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ShapeFamily other && Equals(other); + /// + public bool Equals(ShapeFamily 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemShape.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemShape.cs new file mode 100644 index 000000000000..a689ea07dd19 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/SystemShape.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.OracleDatabase.Models +{ + /// Allowed values for System Shapes. + public readonly partial struct SystemShape : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SystemShape(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ExadataX9MValue = "Exadata.X9M"; + private const string ExadataX11MValue = "Exadata.X11M"; + private const string ExaDBXsValue = "ExaDbXS"; + + /// Exadata X9M shape. + public static SystemShape ExadataX9M { get; } = new SystemShape(ExadataX9MValue); + /// Exadata X11M shape. + public static SystemShape ExadataX11M { get; } = new SystemShape(ExadataX11MValue); + /// Exadata DB on Exascale Infrastructure shape. + public static SystemShape ExaDBXs { get; } = new SystemShape(ExaDBXsValue); + /// Determines if two values are the same. + public static bool operator ==(SystemShape left, SystemShape right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SystemShape left, SystemShape right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SystemShape(string value) => new SystemShape(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SystemShape other && Equals(other); + /// + public bool Equals(SystemShape 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/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.Serialization.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.Serialization.cs index 017f9bdbb1c1..11fb48113846 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.Serialization.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.Serialization.cs @@ -77,6 +77,8 @@ internal static UnknownAutonomousDatabaseBaseProperties DeserializeUnknownAutono bool? isLocalDataGuardEnabled = default; bool? isRemoteDataGuardEnabled = default; DisasterRecoveryType? localDisasterRecoveryType = default; + DateTimeOffset? timeDisasterRecoveryRoleChanged = default; + DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration = default; AutonomousDatabaseStandbySummary localStandbyDB = default; int? failedDataRecoveryInSeconds = default; bool? isMtlsConnectionRequired = default; @@ -302,6 +304,24 @@ internal static UnknownAutonomousDatabaseBaseProperties DeserializeUnknownAutono localDisasterRecoveryType = new DisasterRecoveryType(property.Value.GetString()); continue; } + if (property.NameEquals("timeDisasterRecoveryRoleChanged"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + timeDisasterRecoveryRoleChanged = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("remoteDisasterRecoveryConfiguration"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + remoteDisasterRecoveryConfiguration = DisasterRecoveryConfigurationDetails.DeserializeDisasterRecoveryConfigurationDetails(property.Value, options); + continue; + } if (property.NameEquals("localStandbyDb"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -820,6 +840,8 @@ internal static UnknownAutonomousDatabaseBaseProperties DeserializeUnknownAutono isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, + timeDisasterRecoveryRoleChanged, + remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.cs index 41ab62d1d86b..928578fea901 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/UnknownAutonomousDatabaseBaseProperties.cs @@ -30,11 +30,13 @@ internal partial class UnknownAutonomousDatabaseBaseProperties : AutonomousDatab /// The user-friendly name for the Autonomous Database. /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. /// Indicates if auto scaling is enabled for the Autonomous Database storage. - /// The list of [OCIDs](https://docs.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have OCIDs. - /// The database OCID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs. + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. /// Indicates the local disaster recovery (DR) type of the Autonomous Database Serverless instance.Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover.Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// Indicates remote disaster recovery configuration. /// Local Autonomous Disaster Recovery standby database details. /// Indicates the number of seconds of data loss for a Data Guard failover. /// Specifies if the Autonomous Database requires mTLS connections. @@ -91,7 +93,7 @@ internal partial class UnknownAutonomousDatabaseBaseProperties : AutonomousDatab /// Retention period, in days, for long-term backups. /// The client IP access control list (ACL). This is an array of CIDR notations and/or IP addresses. Values should be separate strings, separated by commas. Example: ['1.1.1.1','1.1.1.0/24','1.1.2.25']. /// Keeps track of any properties unknown to the library. - internal UnknownAutonomousDatabaseBaseProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) + internal UnknownAutonomousDatabaseBaseProperties(string adminPassword, OracleDataBaseType dataBaseType, AutonomousMaintenanceScheduleType? autonomousMaintenanceScheduleType, string characterSet, float? computeCount, AutonomousDatabaseComputeModel? computeModel, int? cpuCoreCount, IList customerContacts, int? dataStorageSizeInTbs, int? dataStorageSizeInGbs, string dbVersion, AutonomousDatabaseWorkloadType? dbWorkload, string displayName, bool? isAutoScalingEnabled, bool? isAutoScalingForStorageEnabled, IReadOnlyList peerDBIds, string peerDBId, bool? isLocalDataGuardEnabled, bool? isRemoteDataGuardEnabled, DisasterRecoveryType? localDisasterRecoveryType, DateTimeOffset? timeDisasterRecoveryRoleChanged, DisasterRecoveryConfigurationDetails remoteDisasterRecoveryConfiguration, AutonomousDatabaseStandbySummary localStandbyDB, int? failedDataRecoveryInSeconds, bool? isMtlsConnectionRequired, bool? isPreviewVersionWithServiceTermsAccepted, OracleLicenseModel? licenseModel, string ncharacterSet, string lifecycleDetails, OracleDatabaseProvisioningState? provisioningState, AutonomousDatabaseLifecycleState? lifecycleState, ScheduledOperationsType scheduledOperations, string privateEndpointIP, string privateEndpointLabel, Uri ociUri, ResourceIdentifier subnetId, ResourceIdentifier vnetId, DateTimeOffset? createdOn, DateTimeOffset? maintenanceBeginOn, DateTimeOffset? maintenanceEndOn, double? actualUsedDataStorageSizeInTbs, double? allocatedStorageSizeInTbs, OracleApexDetailsType apexDetails, IReadOnlyList availableUpgradeVersions, AutonomousDatabaseConnectionStrings connectionStrings, AutonomousDatabaseConnectionUrls connectionUrls, DataSafeStatusType? dataSafeStatus, OracleDatabaseEditionType? databaseEdition, ResourceIdentifier autonomousDatabaseId, int? inMemoryAreaInGbs, DateTimeOffset? nextLongTermBackupCreatedOn, LongTermBackUpScheduleDetails longTermBackupSchedule, bool? isPreview, int? localAdgAutoFailoverMaxDataLossLimit, int? memoryPerOracleComputeUnitInGbs, AutonomousDatabaseModeType? openMode, OperationsInsightsStatusType? operationsInsightsStatus, AutonomousDatabasePermissionLevelType? permissionLevel, string privateEndpoint, IReadOnlyList provisionableCpus, DataGuardRoleType? role, Uri serviceConsoleUri, Uri sqlWebDeveloperUri, IReadOnlyList supportedRegionsToCloneTo, DateTimeOffset? dataGuardRoleChangedOn, DateTimeOffset? freeAutonomousDatabaseDeletedOn, string timeLocalDataGuardEnabled, DateTimeOffset? lastFailoverHappenedOn, DateTimeOffset? lastRefreshHappenedOn, DateTimeOffset? lastRefreshPointTimestamp, DateTimeOffset? lastSwitchoverHappenedOn, DateTimeOffset? freeAutonomousDatabaseStoppedOn, int? usedDataStorageSizeInGbs, int? usedDataStorageSizeInTbs, ResourceIdentifier ocid, int? backupRetentionPeriodInDays, IList whitelistedIPs, IDictionary serializedAdditionalRawData) : base(adminPassword, dataBaseType, autonomousMaintenanceScheduleType, characterSet, computeCount, computeModel, cpuCoreCount, customerContacts, dataStorageSizeInTbs, dataStorageSizeInGbs, dbVersion, dbWorkload, displayName, isAutoScalingEnabled, isAutoScalingForStorageEnabled, peerDBIds, peerDBId, isLocalDataGuardEnabled, isRemoteDataGuardEnabled, localDisasterRecoveryType, timeDisasterRecoveryRoleChanged, remoteDisasterRecoveryConfiguration, localStandbyDB, failedDataRecoveryInSeconds, isMtlsConnectionRequired, isPreviewVersionWithServiceTermsAccepted, licenseModel, ncharacterSet, lifecycleDetails, provisioningState, lifecycleState, scheduledOperations, privateEndpointIP, privateEndpointLabel, ociUri, subnetId, vnetId, createdOn, maintenanceBeginOn, maintenanceEndOn, actualUsedDataStorageSizeInTbs, allocatedStorageSizeInTbs, apexDetails, availableUpgradeVersions, connectionStrings, connectionUrls, dataSafeStatus, databaseEdition, autonomousDatabaseId, inMemoryAreaInGbs, nextLongTermBackupCreatedOn, longTermBackupSchedule, isPreview, localAdgAutoFailoverMaxDataLossLimit, memoryPerOracleComputeUnitInGbs, openMode, operationsInsightsStatus, permissionLevel, privateEndpoint, provisionableCpus, role, serviceConsoleUri, sqlWebDeveloperUri, supportedRegionsToCloneTo, dataGuardRoleChangedOn, freeAutonomousDatabaseDeletedOn, timeLocalDataGuardEnabled, lastFailoverHappenedOn, lastRefreshHappenedOn, lastRefreshPointTimestamp, lastSwitchoverHappenedOn, freeAutonomousDatabaseStoppedOn, usedDataStorageSizeInGbs, usedDataStorageSizeInTbs, ocid, backupRetentionPeriodInDays, whitelistedIPs, serializedAdditionalRawData) { DataBaseType = dataBaseType; } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs index 1974818dcd46..495042eb8e7b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(string dbse /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -150,11 +150,11 @@ public virtual Response Get(string dbserverocid, Cancell /// /// /// Operation Id - /// DbServers_ListByCloudExadataInfrastructure + /// DbServers_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -166,8 +166,8 @@ public virtual Response Get(string dbserverocid, Cancell /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBServerDBServersRestClient.CreateListByCloudExadataInfrastructureRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBServerDBServersRestClient.CreateListByCloudExadataInfrastructureNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBServerDBServersRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBServerDBServersRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new OracleDBServerResource(Client, OracleDBServerData.DeserializeOracleDBServerData(e)), _oracleDBServerDBServersClientDiagnostics, Pipeline, "OracleDBServerCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -180,11 +180,11 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// /// /// Operation Id - /// DbServers_ListByCloudExadataInfrastructure + /// DbServers_ListByParent /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -196,8 +196,8 @@ public virtual AsyncPageable GetAllAsync(CancellationTok /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBServerDBServersRestClient.CreateListByCloudExadataInfrastructureRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBServerDBServersRestClient.CreateListByCloudExadataInfrastructureNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBServerDBServersRestClient.CreateListByParentRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBServerDBServersRestClient.CreateListByParentNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new OracleDBServerResource(Client, OracleDBServerData.DeserializeOracleDBServerData(e)), _oracleDBServerDBServersClientDiagnostics, Pipeline, "OracleDBServerCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -214,7 +214,7 @@ public virtual Pageable GetAll(CancellationToken cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string dbserverocid, Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string dbserverocid, CancellationToken canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> GetIfExistsA /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs index d73223aa38b7..f33c326ec5a4 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBServerResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancellatio /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs index cfd4a43143f5..598ee11c72e2 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(string dbsystemshapenam } /// - /// List DbSystemShape resources by Location + /// List DbSystemShape resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +158,7 @@ public virtual Response Get(string dbsystemshapenam /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -166,17 +166,18 @@ public virtual Response Get(string dbsystemshapenam /// /// /// + /// Filters the result for the given Azure Availability Zone. /// 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) + public virtual AsyncPageable GetAllAsync(string zone = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), zone); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new OracleDBSystemShapeResource(Client, OracleDBSystemShapeData.DeserializeOracleDBSystemShapeData(e)), _oracleDBSystemShapeDBSystemShapesClientDiagnostics, Pipeline, "OracleDBSystemShapeCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List DbSystemShape resources by Location + /// List DbSystemShape resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +189,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -196,12 +197,13 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + public virtual Pageable GetAll(string zone = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleDBSystemShapeDBSystemShapesRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), zone); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new OracleDBSystemShapeResource(Client, OracleDBSystemShapeData.DeserializeOracleDBSystemShapeData(e)), _oracleDBSystemShapeDBSystemShapesClientDiagnostics, Pipeline, "OracleDBSystemShapeCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -218,7 +220,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +263,7 @@ public virtual async Task> ExistsAsync(string dbsystemshapename, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +306,7 @@ public virtual Response Exists(string dbsystemshapename, CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +351,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs index 5ad08f145310..00fea7470a2e 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDBSystemShapeResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs index bf4e4e1f9634..e6549140d47d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(string dnsprivateviewo } /// - /// List DnsPrivateView resources by Location + /// List DnsPrivateView resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +158,7 @@ public virtual Response Get(string dnsprivateviewo /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat } /// - /// List DnsPrivateView resources by Location + /// List DnsPrivateView resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string dnsprivateviewocid, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string dnsprivateviewocid, CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs index 06d1a5566821..0e1b1de343d9 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateViewResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs index 640c59409848..f150f42a8b10 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(string dnsprivatezonen } /// - /// List DnsPrivateZone resources by Location + /// List DnsPrivateZone resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +158,7 @@ public virtual Response Get(string dnsprivatezonen /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat } /// - /// List DnsPrivateZone resources by Location + /// List DnsPrivateZone resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string dnsprivatezonename, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string dnsprivatezonename, CancellationToke /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs index 2d439010f542..8f5ac1d711b7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleDnsPrivateZoneResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs index fa4d6ea40d66..90cc62bb1ff1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionCollection.cs @@ -14,6 +14,7 @@ using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; +using Azure.ResourceManager.OracleDatabase.Models; using Azure.ResourceManager.Resources; namespace Azure.ResourceManager.OracleDatabase @@ -68,7 +69,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +114,7 @@ public virtual async Task> GetAsync(string giv /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +147,7 @@ public virtual Response Get(string giversionname, Cance } /// - /// List GiVersion resources by Location + /// List GiVersion resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +159,7 @@ public virtual Response Get(string giversionname, Cance /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -166,17 +167,19 @@ public virtual Response Get(string giversionname, Cance /// /// /// + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. /// 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) + public virtual AsyncPageable GetAllAsync(SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), shape, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape, zone); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new OracleGIVersionResource(Client, OracleGIVersionData.DeserializeOracleGIVersionData(e)), _oracleGIVersionGiVersionsClientDiagnostics, Pipeline, "OracleGIVersionCollection.GetAll", "value", "nextLink", cancellationToken); } /// - /// List GiVersion resources by Location + /// List GiVersion resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +191,7 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -196,12 +199,14 @@ public virtual AsyncPageable GetAllAsync(CancellationTo /// /// /// + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + public virtual Pageable GetAll(SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location)); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location)); + HttpMessage FirstPageRequest(int? pageSizeHint) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationRequest(Id.SubscriptionId, new AzureLocation(_location), shape, zone); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _oracleGIVersionGiVersionsRestClient.CreateListByLocationNextPageRequest(nextLink, Id.SubscriptionId, new AzureLocation(_location), shape, zone); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new OracleGIVersionResource(Client, OracleGIVersionData.DeserializeOracleGIVersionData(e)), _oracleGIVersionGiVersionsClientDiagnostics, Pipeline, "OracleGIVersionCollection.GetAll", "value", "nextLink", cancellationToken); } @@ -218,7 +223,7 @@ public virtual Pageable GetAll(CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +266,7 @@ public virtual async Task> ExistsAsync(string giversionname, Canc /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +309,7 @@ public virtual Response Exists(string giversionname, CancellationToken can /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +354,7 @@ public virtual async Task> GetIfExists /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs index 9e98955a7b92..a3578ef2b460 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleGIVersionResource.cs @@ -88,6 +88,75 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } + /// Gets a collection of GiMinorVersionResources in the OracleGIVersion. + /// An object representing collection of GiMinorVersionResources and their operations over a GiMinorVersionResource. + public virtual GiMinorVersionCollection GetGiMinorVersions() + { + return GetCachedClient(client => new GiMinorVersionCollection(client, Id)); + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetGiMinorVersionAsync(string giMinorVersionName, CancellationToken cancellationToken = default) + { + return await GetGiMinorVersions().GetAsync(giMinorVersionName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get a GiMinorVersion + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName} + /// + /// + /// Operation Id + /// GiMinorVersions_Get + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// Resource + /// + /// + /// + /// + /// The name of the GiMinorVersion. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetGiMinorVersion(string giMinorVersionName, CancellationToken cancellationToken = default) + { + return GetGiMinorVersions().Get(giMinorVersionName, cancellationToken); + } + /// /// Get a GiVersion /// @@ -101,7 +170,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +210,7 @@ public virtual async Task> GetAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs index e54faa78b31c..6b91c6a53671 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSubscriptionResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -222,7 +222,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -264,7 +264,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -310,7 +310,7 @@ public virtual async Task> UpdateAsync( /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -356,7 +356,7 @@ public virtual ArmOperation Update(WaitUntil waitUnt /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -402,7 +402,7 @@ public virtual async Task> CreateOrUpda /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -435,6 +435,98 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil } } + /// + /// Add Azure Subscriptions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions + /// + /// + /// Operation Id + /// OracleSubscriptions_AddAzureSubscriptions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual async Task AddAzureSubscriptionsAsync(WaitUntil waitUntil, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.AddAzureSubscriptions"); + scope.Start(); + try + { + var response = await _oracleSubscriptionRestClient.AddAzureSubscriptionsAsync(Id.SubscriptionId, body, cancellationToken).ConfigureAwait(false); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateAddAzureSubscriptionsRequest(Id.SubscriptionId, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add Azure Subscriptions + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions + /// + /// + /// Operation Id + /// OracleSubscriptions_AddAzureSubscriptions + /// + /// + /// Default Api Version + /// 2025-03-01 + /// + /// + /// 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 content of the action request. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation AddAzureSubscriptions(WaitUntil waitUntil, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(body, nameof(body)); + + using var scope = _oracleSubscriptionClientDiagnostics.CreateScope("OracleSubscriptionResource.AddAzureSubscriptions"); + scope.Start(); + try + { + var response = _oracleSubscriptionRestClient.AddAzureSubscriptions(Id.SubscriptionId, body, cancellationToken); + var operation = new OracleDatabaseArmOperation(_oracleSubscriptionClientDiagnostics, Pipeline, _oracleSubscriptionRestClient.CreateAddAzureSubscriptionsRequest(Id.SubscriptionId, body).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// List Activation Links /// @@ -448,7 +540,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -490,7 +582,7 @@ public virtual async Task> GetActivati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -532,7 +624,7 @@ public virtual ArmOperation GetActivationLinks(Wait /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -574,7 +666,7 @@ public virtual async Task> GetCloudAccountDeta /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -616,7 +708,7 @@ public virtual ArmOperation GetCloudAccountDetails(WaitUnti /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -658,7 +750,7 @@ public virtual async Task> GetSaasSubscrip /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs index c9bee9e10153..9aaf69d449ee 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -146,7 +146,7 @@ public virtual Response Get(string systemversionnam } /// - /// List SystemVersion resources by Location + /// List SystemVersion resources by SubscriptionLocationResource /// /// /// Request Path @@ -158,7 +158,7 @@ public virtual Response Get(string systemversionnam /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -176,7 +176,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati } /// - /// List SystemVersion resources by Location + /// List SystemVersion resources by SubscriptionLocationResource /// /// /// Request Path @@ -188,7 +188,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -218,7 +218,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -261,7 +261,7 @@ public virtual async Task> ExistsAsync(string systemversionname, /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -304,7 +304,7 @@ public virtual Response Exists(string systemversionname, CancellationToken /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -349,7 +349,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs index 3ccef66e54d9..32ea8eb7c388 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/OracleSystemVersionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2023-09-01 + /// 2025-03-01 /// /// /// Resource diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs index d75d85c185e9..31af82096c9b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseBackupsRestOperations.cs @@ -32,11 +32,11 @@ public AutonomousDatabaseBackupsRestOperations(HttpPipeline pipeline, string app { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByAutonomousDatabaseRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateListByAutonomousDatabaseRequestUri(string subsc return uri; } - internal HttpMessage CreateListByAutonomousDatabaseRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename) + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -79,13 +79,13 @@ internal HttpMessage CreateListByAutonomousDatabaseRequest(string subscriptionId /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByAutonomousDatabaseAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); - using var message = CreateListByAutonomousDatabaseRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, autonomousdatabasename); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,13 +108,13 @@ public async Task> ListByAutonomous /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByAutonomousDatabase(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + public Response ListByParent(string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); - using var message = CreateListByAutonomousDatabaseRequest(subscriptionId, resourceGroupName, autonomousdatabasename); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, autonomousdatabasename); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -526,7 +526,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string a } } - internal RequestUriBuilder CreateListByAutonomousDatabaseNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename) + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -534,7 +534,7 @@ internal RequestUriBuilder CreateListByAutonomousDatabaseNextPageRequestUri(stri return uri; } - internal HttpMessage CreateListByAutonomousDatabaseNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename) + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -556,14 +556,14 @@ internal HttpMessage CreateListByAutonomousDatabaseNextPageRequest(string nextLi /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByAutonomousDatabaseNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); - using var message = CreateListByAutonomousDatabaseNextPageRequest(nextLink, subscriptionId, resourceGroupName, autonomousdatabasename); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, autonomousdatabasename); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -587,14 +587,14 @@ public async Task> ListByAutonomous /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByAutonomousDatabaseNextPage(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string autonomousdatabasename, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); - using var message = CreateListByAutonomousDatabaseNextPageRequest(nextLink, subscriptionId, resourceGroupName, autonomousdatabasename); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, autonomousdatabasename); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs index fcc44ef037a1..608f183896d1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseCharacterSetsRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabaseCharacterSetsRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -68,7 +68,7 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc return message; } - /// List AutonomousDatabaseCharacterSet resources by Location. + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -94,7 +94,7 @@ public async Task> ListByLoca } } - /// List AutonomousDatabaseCharacterSet resources by Location. + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -236,7 +236,7 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List AutonomousDatabaseCharacterSet resources by Location. + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. @@ -264,7 +264,7 @@ public async Task> ListByLoca } } - /// List AutonomousDatabaseCharacterSet resources by Location. + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs index 2467abf19e58..ae427015573b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseNationalCharacterSetsRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabaseNationalCharacterSetsRestOperations(HttpPipeline pipeli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -68,7 +68,7 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc return message; } - /// List AutonomousDatabaseNationalCharacterSet resources by Location. + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -94,7 +94,7 @@ public async Task> Li } } - /// List AutonomousDatabaseNationalCharacterSet resources by Location. + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -236,7 +236,7 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List AutonomousDatabaseNationalCharacterSet resources by Location. + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. @@ -264,7 +264,7 @@ public async Task> Li } } - /// List AutonomousDatabaseNationalCharacterSet resources by Location. + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs index 1ea61565ef78..6ac2b4304c8c 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabaseVersionsRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabaseVersionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -68,7 +68,7 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc return message; } - /// List AutonomousDbVersion resources by Location. + /// List AutonomousDbVersion resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -94,7 +94,7 @@ public async Task> ListByLocationAsync(s } } - /// List AutonomousDbVersion resources by Location. + /// List AutonomousDbVersion resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -236,7 +236,7 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List AutonomousDbVersion resources by Location. + /// List AutonomousDbVersion resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. @@ -264,7 +264,7 @@ public async Task> ListByLocationNextPag } } - /// List AutonomousDbVersion resources by Location. + /// List AutonomousDbVersion resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs index 02e1244e50ff..84018fce444a 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/AutonomousDatabasesRestOperations.cs @@ -32,7 +32,7 @@ public AutonomousDatabasesRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -564,6 +564,100 @@ public Response Delete(string subscriptionId, string resourceGroupName, string a } } + internal RequestUriBuilder CreateChangeDisasterRecoveryConfigurationRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details) + { + 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/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/changeDisasterRecoveryConfiguration", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateChangeDisasterRecoveryConfigurationRequest(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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/Oracle.Database/autonomousDatabases/", false); + uri.AppendPath(autonomousdatabasename, true); + uri.AppendPath("/changeDisasterRecoveryConfiguration", false); + 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(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task ChangeDisasterRecoveryConfigurationAsync(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateChangeDisasterRecoveryConfigurationRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ChangeDisasterRecoveryConfiguration(string subscriptionId, string resourceGroupName, string autonomousdatabasename, DisasterRecoveryConfigurationDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(autonomousdatabasename, nameof(autonomousdatabasename)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateChangeDisasterRecoveryConfigurationRequest(subscriptionId, resourceGroupName, autonomousdatabasename, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateFailoverRequestUri(string subscriptionId, string resourceGroupName, string autonomousdatabasename, AutonomousDatabaseActionContent content) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs index d610bcaacee5..920f7478161b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudExadataInfrastructuresRestOperations.cs @@ -32,7 +32,7 @@ public CloudExadataInfrastructuresRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs index 11661c395a2a..b1ac9c5fa054 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/CloudVmClustersRestOperations.cs @@ -33,7 +33,7 @@ public CloudVmClustersRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs index 80be1139e4ad..1e5ae8cc83d3 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbNodesRestOperations.cs @@ -32,11 +32,11 @@ public DbNodesRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByCloudVmClusterRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateListByCloudVmClusterRequestUri(string subscript return uri; } - internal HttpMessage CreateListByCloudVmClusterRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -79,13 +79,13 @@ internal HttpMessage CreateListByCloudVmClusterRequest(string subscriptionId, st /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByCloudVmClusterAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterRequest(subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,13 +108,13 @@ public async Task> ListByCloudVmClusterAsync(string s /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByCloudVmCluster(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public Response ListByParent(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterRequest(subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -336,7 +336,7 @@ public Response Action(string subscriptionId, string resourceGroupName, string c } } - internal RequestUriBuilder CreateListByCloudVmClusterNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -344,7 +344,7 @@ internal RequestUriBuilder CreateListByCloudVmClusterNextPageRequestUri(string n return uri; } - internal HttpMessage CreateListByCloudVmClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -366,14 +366,14 @@ internal HttpMessage CreateListByCloudVmClusterNextPageRequest(string nextLink, /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByCloudVmClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -397,14 +397,14 @@ public async Task> ListByCloudVmClusterNextPageAsync( /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByCloudVmClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs index f99411674f17..90b3c68885e1 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbServersRestOperations.cs @@ -32,11 +32,11 @@ public DbServersRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByCloudExadataInfrastructureRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateListByCloudExadataInfrastructureRequestUri(stri return uri; } - internal HttpMessage CreateListByCloudExadataInfrastructureRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -79,13 +79,13 @@ internal HttpMessage CreateListByCloudExadataInfrastructureRequest(string subscr /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByCloudExadataInfrastructureAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); - using var message = CreateListByCloudExadataInfrastructureRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,13 +108,13 @@ public async Task> ListByCloudExadataInfrastructure /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByCloudExadataInfrastructure(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + public Response ListByParent(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); - using var message = CreateListByCloudExadataInfrastructureRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudexadatainfrastructurename); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -234,7 +234,7 @@ public Response Get(string subscriptionId, string resourceGr } } - internal RequestUriBuilder CreateListByCloudExadataInfrastructureNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -242,7 +242,7 @@ internal RequestUriBuilder CreateListByCloudExadataInfrastructureNextPageRequest return uri; } - internal HttpMessage CreateListByCloudExadataInfrastructureNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -264,14 +264,14 @@ internal HttpMessage CreateListByCloudExadataInfrastructureNextPageRequest(strin /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByCloudExadataInfrastructureNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); - using var message = CreateListByCloudExadataInfrastructureNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudexadatainfrastructurename); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -295,14 +295,14 @@ public async Task> ListByCloudExadataInfrastructure /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByCloudExadataInfrastructureNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudexadatainfrastructurename, nameof(cloudexadatainfrastructurename)); - using var message = CreateListByCloudExadataInfrastructureNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudexadatainfrastructurename); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudexadatainfrastructurename); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs index bed041b8c7d6..63997a78c710 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DbSystemShapesRestOperations.cs @@ -32,11 +32,11 @@ public DbSystemShapesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location, string zone) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,10 +46,14 @@ internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, uri.AppendPath(location, true); uri.AppendPath("/dbSystemShapes", false); uri.AppendQuery("api-version", _apiVersion, true); + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } return uri; } - internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location, string zone) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,23 +66,28 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc uri.AppendPath(location, true); uri.AppendPath("/dbSystemShapes", false); uri.AppendQuery("api-version", _apiVersion, true); + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// List DbSystemShape resources by Location. + /// List DbSystemShape resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationRequest(subscriptionId, location); + using var message = CreateListByLocationRequest(subscriptionId, location, zone); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -94,17 +103,18 @@ public async Task> ListByLocationAsync(string } } - /// List DbSystemShape resources by Location. + /// List DbSystemShape resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public Response ListByLocation(string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationRequest(subscriptionId, location); + using var message = CreateListByLocationRequest(subscriptionId, location, zone); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -214,7 +224,7 @@ public Response Get(string subscriptionId, AzureLocatio } } - internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, string zone) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -222,7 +232,7 @@ internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLin return uri; } - internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, string zone) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -236,19 +246,20 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List DbSystemShape resources by Location. + /// List DbSystemShape resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, zone); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -264,19 +275,20 @@ public async Task> ListByLocationNextPageAsync } } - /// List DbSystemShape resources by Location. + /// List DbSystemShape resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, zone); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs index 3bc53cc29f7d..43fa0bcee50d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateViewsRestOperations.cs @@ -32,7 +32,7 @@ public DnsPrivateViewsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -68,7 +68,7 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc return message; } - /// List DnsPrivateView resources by Location. + /// List DnsPrivateView resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -94,7 +94,7 @@ public async Task> ListByLocationAsync(string } } - /// List DnsPrivateView resources by Location. + /// List DnsPrivateView resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -236,7 +236,7 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List DnsPrivateView resources by Location. + /// List DnsPrivateView resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. @@ -264,7 +264,7 @@ public async Task> ListByLocationNextPageAsyn } } - /// List DnsPrivateView resources by Location. + /// List DnsPrivateView resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs index c57ffa235af3..e1d46b1ad645 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/DnsPrivateZonesRestOperations.cs @@ -32,7 +32,7 @@ public DnsPrivateZonesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -68,7 +68,7 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc return message; } - /// List DnsPrivateZone resources by Location. + /// List DnsPrivateZone resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -94,7 +94,7 @@ public async Task> ListByLocationAsync(string } } - /// List DnsPrivateZone resources by Location. + /// List DnsPrivateZone resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -236,7 +236,7 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List DnsPrivateZone resources by Location. + /// List DnsPrivateZone resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. @@ -264,7 +264,7 @@ public async Task> ListByLocationNextPageAsyn } } - /// List DnsPrivateZone resources by Location. + /// List DnsPrivateZone resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExadbVmClustersRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExadbVmClustersRestOperations.cs new file mode 100644 index 000000000000..1ea6679d149c --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExadbVmClustersRestOperations.cs @@ -0,0 +1,817 @@ +// 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.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class ExadbVmClustersRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ExadbVmClustersRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ExadbVmClustersRestOperations(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-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + 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("/providers/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExadbVmCluster resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + 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/Oracle.Database/exadbVmClusters", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExadbVmCluster resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// 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 exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterData.DeserializeExadbVmClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExadbVmClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// 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 exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterData.DeserializeExadbVmClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExadbVmClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterData 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterData 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, 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 ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// 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 exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, 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 ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// 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 exadbVmClusterName, ExadbVmClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string exadbVmClusterName, ExadbVmClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exadbVmClusterName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// 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 exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + 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 ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// 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 exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRemoveVmsRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/removeVms", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRemoveVmsRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/removeVms", false); + 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(details, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Remove VMs from the VM Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task RemoveVmsAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateRemoveVmsRequest(subscriptionId, resourceGroupName, exadbVmClusterName, details); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Remove VMs from the VM Cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The content of the action request. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response RemoveVms(string subscriptionId, string resourceGroupName, string exadbVmClusterName, RemoveVirtualMachineFromExadbVmClusterDetails details, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNull(details, nameof(details)); + + using var message = CreateRemoveVmsRequest(subscriptionId, resourceGroupName, exadbVmClusterName, details); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + 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 ExadbVmCluster resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + 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 ExadbVmCluster resources by resource group. + /// 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. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExadbVmCluster resources by resource group. + /// 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. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExadbVmClusterListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExadbVmClusterListResult.DeserializeExadbVmClusterListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbNodesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbNodesRestOperations.cs new file mode 100644 index 000000000000..74f890836799 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbNodesRestOperations.cs @@ -0,0 +1,423 @@ +// 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.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class ExascaleDbNodesRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ExascaleDbNodesRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ExascaleDbNodesRestOperations(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-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbNode resources by ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBNodeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBNodeListResult.DeserializeExascaleDBNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbNode resources by ExadbVmCluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBNodeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBNodeListResult.DeserializeExascaleDBNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDBNodeName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDBNodeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDBNodeName) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDBNodeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ExascaleDbNode. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// 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 exadbVmClusterName, string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDBNodeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBNodeData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBNodeData.DeserializeExascaleDBNodeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDBNodeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ExascaleDbNode. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// 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 exadbVmClusterName, string exascaleDBNodeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDBNodeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBNodeData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBNodeData.DeserializeExascaleDBNodeData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDBNodeData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateActionRequestUri(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDBNodeName, DBNodeAction body) + { + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDBNodeName, true); + uri.AppendPath("/action", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateActionRequest(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDBNodeName, DBNodeAction body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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/Oracle.Database/exadbVmClusters/", false); + uri.AppendPath(exadbVmClusterName, true); + uri.AppendPath("/dbNodes/", false); + uri.AppendPath(exascaleDBNodeName, true); + uri.AppendPath("/action", false); + 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(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// VM actions on DbNode of ExadbVmCluster by the provided filter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ActionAsync(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDBNodeName, DBNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateActionRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDBNodeName, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// VM actions on DbNode of ExadbVmCluster by the provided filter. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster. + /// The name of the ExascaleDbNode. + /// The content of the action request. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Action(string subscriptionId, string resourceGroupName, string exadbVmClusterName, string exascaleDBNodeName, DBNodeAction body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + Argument.AssertNotNullOrEmpty(exascaleDBNodeName, nameof(exascaleDBNodeName)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateActionRequest(subscriptionId, resourceGroupName, exadbVmClusterName, exascaleDBNodeName, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName) + { + 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 ExascaleDbNode resources by ExadbVmCluster. + /// 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. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, exadbVmClusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBNodeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBNodeListResult.DeserializeExascaleDBNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbNode resources by ExadbVmCluster. + /// 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. + /// The name of the ExadbVmCluster. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string exadbVmClusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exadbVmClusterName, nameof(exadbVmClusterName)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, exadbVmClusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBNodeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBNodeListResult.DeserializeExascaleDBNodeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbStorageVaultsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbStorageVaultsRestOperations.cs new file mode 100644 index 000000000000..81b14904c7b7 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/ExascaleDbStorageVaultsRestOperations.cs @@ -0,0 +1,723 @@ +// 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.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class ExascaleDbStorageVaultsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ExascaleDbStorageVaultsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ExascaleDbStorageVaultsRestOperations(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-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListBySubscriptionRequestUri(string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) + { + 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("/providers/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbStorageVault resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by subscription ID. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionRequest(subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) + { + 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/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName) + { + 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/Oracle.Database/exascaleDbStorageVaults", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List ExascaleDbStorageVault resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName) + { + 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName) + { + 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// 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 exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBStorageVaultData.DeserializeExascaleDBStorageVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDBStorageVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// 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 exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBStorageVaultData.DeserializeExascaleDBStorageVaultData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ExascaleDBStorageVaultData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateRequestUri(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultData 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateRequest(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultData 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, 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 ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// 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 CreateAsync(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName, 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 ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// 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 Create(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultPatch patch) + { + 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update a ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update a ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// The resource properties to be updated. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName, ExascaleDBStorageVaultPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName) + { + 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string exascaleDBStorageVaultName) + { + 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/Oracle.Database/exascaleDbStorageVaults/", false); + uri.AppendPath(exascaleDBStorageVaultName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// 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 exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName); + 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 ExascaleDbStorageVault. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault. + /// 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 exascaleDBStorageVaultName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(exascaleDBStorageVaultName, nameof(exascaleDBStorageVaultName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, exascaleDBStorageVaultName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListBySubscriptionNextPageRequestUri(string nextLink, string subscriptionId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId) + { + 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 ExascaleDbStorageVault resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by subscription ID. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByResourceGroupNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName) + { + 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 ExascaleDbStorageVault resources by resource group. + /// 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. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List ExascaleDbStorageVault resources by resource group. + /// 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. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + + using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ExascaleDBStorageVaultListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ExascaleDBStorageVaultListResult.DeserializeExascaleDBStorageVaultListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/FlexComponentsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/FlexComponentsRestOperations.cs new file mode 100644 index 000000000000..278b8999e589 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/FlexComponentsRestOperations.cs @@ -0,0 +1,307 @@ +// 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.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class FlexComponentsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of FlexComponentsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public FlexComponentsRestOperations(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-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, AzureLocation location, SystemShape? shape) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, AzureLocation location, SystemShape? shape) + { + 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("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List FlexComponent resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentRequest(subscriptionId, location, shape); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List FlexComponent resources by SubscriptionLocationResource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentRequest(subscriptionId, location, shape); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string flexComponentName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents/", false); + uri.AppendPath(flexComponentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string flexComponentName) + { + 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("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/flexComponents/", false); + uri.AppendPath(flexComponentName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a FlexComponent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// 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, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var message = CreateGetRequest(subscriptionId, location, flexComponentName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FlexComponentData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FlexComponentData.DeserializeFlexComponentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FlexComponentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a FlexComponent. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name of the FlexComponent. + /// 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, AzureLocation location, string flexComponentName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(flexComponentName, nameof(flexComponentName)); + + using var message = CreateGetRequest(subscriptionId, location, flexComponentName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FlexComponentData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FlexComponentData.DeserializeFlexComponentData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((FlexComponentData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape) + { + 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 FlexComponent resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, shape); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List FlexComponent resources by SubscriptionLocationResource. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, shape); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FlexComponentListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FlexComponentListResult.DeserializeFlexComponentListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiMinorVersionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiMinorVersionsRestOperations.cs new file mode 100644 index 000000000000..03ac2cb16440 --- /dev/null +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiMinorVersionsRestOperations.cs @@ -0,0 +1,339 @@ +// 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.OracleDatabase.Models; + +namespace Azure.ResourceManager.OracleDatabase +{ + internal partial class GiMinorVersionsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of GiMinorVersionsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public GiMinorVersionsRestOperations(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-03-01"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shapeFamily != null) + { + uri.AppendQuery("shapeFamily", shapeFamily.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + return uri; + } + + internal HttpMessage CreateListByParentRequest(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + 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("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions", false); + uri.AppendQuery("api-version", _apiVersion, true); + if (shapeFamily != null) + { + uri.AppendQuery("shapeFamily", shapeFamily.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List GiMinorVersion resources by GiVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByParentAsync(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentRequest(subscriptionId, location, giversionname, shapeFamily, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GiMinorVersion resources by GiVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByParent(string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentRequest(subscriptionId, location, giversionname, shapeFamily, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions/", false); + uri.AppendPath(giMinorVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string giversionname, string giMinorVersionName) + { + 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("/providers/Oracle.Database/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/giVersions/", false); + uri.AppendPath(giversionname, true); + uri.AppendPath("/giMinorVersions/", false); + uri.AppendPath(giMinorVersionName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a GiMinorVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// The name of the GiMinorVersion. + /// 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, AzureLocation location, string giversionname, string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var message = CreateGetRequest(subscriptionId, location, giversionname, giMinorVersionName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiMinorVersionData.DeserializeGiMinorVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GiMinorVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a GiMinorVersion. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// The name of the GiMinorVersion. + /// 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, AzureLocation location, string giversionname, string giMinorVersionName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + Argument.AssertNotNullOrEmpty(giMinorVersionName, nameof(giMinorVersionName)); + + using var message = CreateGetRequest(subscriptionId, location, giversionname, giMinorVersionName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiMinorVersionData.DeserializeGiMinorVersionData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((GiMinorVersionData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily, string zone) + { + 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 GiMinorVersion resources by GiVersion. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, giversionname, shapeFamily, zone); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List GiMinorVersion resources by GiVersion. + /// The URL to the next page of results. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name. + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// Filters the result for the given Azure Availability Zone. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ListByParentNextPage(string nextLink, string subscriptionId, AzureLocation location, string giversionname, ShapeFamily? shapeFamily = null, string zone = null, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(giversionname, nameof(giversionname)); + + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, location, giversionname, shapeFamily, zone); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + GiMinorVersionListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = GiMinorVersionListResult.DeserializeGiMinorVersionListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs index d15c336951ca..5f32b201c59b 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/GiVersionsRestOperations.cs @@ -32,11 +32,11 @@ public GiVersionsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, AzureLocation location, SystemShape? shape, string zone) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,10 +46,18 @@ internal RequestUriBuilder CreateListByLocationRequestUri(string subscriptionId, uri.AppendPath(location, true); uri.AppendPath("/giVersions", false); uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } return uri; } - internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLocation location, SystemShape? shape, string zone) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -62,23 +70,33 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc uri.AppendPath(location, true); uri.AppendPath("/giVersions", false); uri.AppendQuery("api-version", _apiVersion, true); + if (shape != null) + { + uri.AppendQuery("shape", shape.Value.ToString(), true); + } + if (zone != null) + { + uri.AppendQuery("zone", zone, true); + } request.Uri = uri; request.Headers.Add("Accept", "application/json"); _userAgent.Apply(message); return message; } - /// List GiVersion resources by Location. + /// List GiVersion resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public async Task> ListByLocationAsync(string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationRequest(subscriptionId, location); + using var message = CreateListByLocationRequest(subscriptionId, location, shape, zone); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -94,17 +112,19 @@ public async Task> ListByLocationAsync(string subs } } - /// List GiVersion resources by Location. + /// List GiVersion resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. - public Response ListByLocation(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public Response ListByLocation(string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationRequest(subscriptionId, location); + using var message = CreateListByLocationRequest(subscriptionId, location, shape, zone); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -214,7 +234,7 @@ public Response Get(string subscriptionId, AzureLocation lo } } - internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape, string zone) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -222,7 +242,7 @@ internal RequestUriBuilder CreateListByLocationNextPageRequestUri(string nextLin return uri; } - internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape, string zone) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -236,19 +256,21 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List GiVersion resources by Location. + /// List GiVersion resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public async Task> ListByLocationNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, shape, zone); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -264,19 +286,21 @@ public async Task> ListByLocationNextPageAsync(str } } - /// List GiVersion resources by Location. + /// List GiVersion resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. + /// If provided, filters the results for the given shape. + /// Filters the result for the given Azure Availability Zone. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. - public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + public Response ListByLocationNextPage(string nextLink, string subscriptionId, AzureLocation location, SystemShape? shape = null, string zone = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateListByLocationNextPageRequest(nextLink, subscriptionId, location, shape, zone); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs index e720ff3dfd13..4ccb1f0c447d 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/OracleSubscriptionsRestOperations.cs @@ -32,7 +32,7 @@ public OracleSubscriptionsRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -422,6 +422,82 @@ public Response Delete(string subscriptionId, CancellationToken cancellationToke } } + internal RequestUriBuilder CreateAddAzureSubscriptionsRequestUri(string subscriptionId, AzureSubscriptions body) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateAddAzureSubscriptionsRequest(string subscriptionId, AzureSubscriptions body) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", false); + 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(body, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Add Azure Subscriptions. + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task AddAzureSubscriptionsAsync(string subscriptionId, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddAzureSubscriptionsRequest(subscriptionId, body); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Add Azure Subscriptions. + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response AddAzureSubscriptions(string subscriptionId, AzureSubscriptions body, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(body, nameof(body)); + + using var message = CreateAddAzureSubscriptionsRequest(subscriptionId, body); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListActivationLinksRequestUri(string subscriptionId) { var uri = new RawRequestUriBuilder(); diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs index c40247cb5139..01a748fdd3ad 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/SystemVersionsRestOperations.cs @@ -32,7 +32,7 @@ public SystemVersionsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -68,7 +68,7 @@ internal HttpMessage CreateListByLocationRequest(string subscriptionId, AzureLoc return message; } - /// List SystemVersion resources by Location. + /// List SystemVersion resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -94,7 +94,7 @@ public async Task> ListByLocationAsync(string } } - /// List SystemVersion resources by Location. + /// List SystemVersion resources by SubscriptionLocationResource. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. /// The cancellation token to use. @@ -236,7 +236,7 @@ internal HttpMessage CreateListByLocationNextPageRequest(string nextLink, string return message; } - /// List SystemVersion resources by Location. + /// List SystemVersion resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. @@ -264,7 +264,7 @@ public async Task> ListByLocationNextPageAsync } } - /// List SystemVersion resources by Location. + /// List SystemVersion resources by SubscriptionLocationResource. /// The URL to the next page of results. /// The ID of the target subscription. The value must be an UUID. /// The name of the Azure region. diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs index 7dae9afb5899..f34f512d8cdc 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/RestOperations/VirtualNetworkAddressesRestOperations.cs @@ -32,11 +32,11 @@ public VirtualNetworkAddressesRestOperations(HttpPipeline pipeline, string appli { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2023-09-01"; + _apiVersion = apiVersion ?? "2025-03-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByCloudVmClusterRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal RequestUriBuilder CreateListByParentRequestUri(string subscriptionId, string resourceGroupName, string cloudvmclustername) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateListByCloudVmClusterRequestUri(string subscript return uri; } - internal HttpMessage CreateListByCloudVmClusterRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal HttpMessage CreateListByParentRequest(string subscriptionId, string resourceGroupName, string cloudvmclustername) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -79,13 +79,13 @@ internal HttpMessage CreateListByCloudVmClusterRequest(string subscriptionId, st /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByCloudVmClusterAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public async Task> ListByParentAsync(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterRequest(subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,13 +108,13 @@ public async Task> ListByCloudVmCluste /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByCloudVmCluster(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public Response ListByParent(string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterRequest(subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentRequest(subscriptionId, resourceGroupName, cloudvmclustername); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -426,7 +426,7 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c } } - internal RequestUriBuilder CreateListByCloudVmClusterNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal RequestUriBuilder CreateListByParentNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -434,7 +434,7 @@ internal RequestUriBuilder CreateListByCloudVmClusterNextPageRequestUri(string n return uri; } - internal HttpMessage CreateListByCloudVmClusterNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) + internal HttpMessage CreateListByParentNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -456,14 +456,14 @@ internal HttpMessage CreateListByCloudVmClusterNextPageRequest(string nextLink, /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByCloudVmClusterNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public async Task> ListByParentNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -487,14 +487,14 @@ public async Task> ListByCloudVmCluste /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response ListByCloudVmClusterNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) + public Response ListByParentNextPage(string nextLink, string subscriptionId, string resourceGroupName, string cloudvmclustername, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(cloudvmclustername, nameof(cloudvmclustername)); - using var message = CreateListByCloudVmClusterNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); + using var message = CreateListByParentNextPageRequest(nextLink, subscriptionId, resourceGroupName, cloudvmclustername); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md index 943d602bc377..332430c2adf7 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md +++ b/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: OracleDatabase namespace: Azure.ResourceManager.OracleDatabase -require: https://github.com/Azure/azure-rest-api-specs/blob/ec7ee8842bf615c2f0354bf8b5b8725fdac9454a/specification/oracle/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/oracle/resource-manager/readme.md #tag: package-2023-09-01 output-folder: $(this-folder)/Generated clear-output-folder: true diff --git a/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md index 45ccf1bbc0bc..e96af4e879cc 100644 --- a/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Account/src/autorest.md @@ -4,7 +4,9 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewAccount -input-file: https://github.com/Azure/azure-rest-api-specs/blob/b2bddfe2e59b5b14e559e0433b6e6d057bcff95d/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md + namespace: Azure.Analytics.Purview.Account security: AADToken security-scopes: https://purview.azure.net/.default @@ -57,3 +59,4 @@ directive: $.operationId = (mappingTable[$.operationId] ?? $.operationId); ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md index 44b3da58b988..36b601a6cfe2 100644 --- a/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Administration/src/autorest.md @@ -4,9 +4,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewAdministration -input-file: - - https://github.com/Azure/azure-rest-api-specs/blob/0ebd4949e8e1cd9537ca5a07384c7661162cc7a6/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json - - https://github.com/Azure/azure-rest-api-specs/blob/0ebd4949e8e1cd9537ca5a07384c7661162cc7a6/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01-preview/purviewMetadataPolicy.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md namespace: Azure.Analytics.Purview.Administration modelerfour: lenient-model-deduplication: true @@ -83,3 +82,4 @@ directive: $.operationId = "Purview" + $.operationId; } ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md index 77f2f0c5b7da..75916e7bcf0a 100644 --- a/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Catalog/src/autorest.md @@ -4,9 +4,8 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewCatalog -input-file: - -- https://github.com/Azure/azure-rest-api-specs/blob/ccbe894f6b012ca2000184307ed453fd68797b86/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2022-03-01-preview/purviewcatalog.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md namespace: Azure.Analytics.Purview.Catalog @@ -81,3 +80,4 @@ directive: transform: > $.operationId = $.operationId.replace("_List", "_Get"); ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md index bed111da105c..e7c627cfaf15 100644 --- a/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Scanning/src/autorest.md @@ -4,7 +4,9 @@ Run `dotnet build /t:GenerateCode` to generate code. ```yaml title: PurviewScanningService -input-file: https://github.com/Azure/azure-rest-api-specs/blob/1c7df99f6a84335cfd7bf5be8c800d72c1dddbc2/specification/purview/data-plane/Azure.Analytics.Purview.Scanning/preview/2018-12-01-preview/scanningService.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md + namespace: Azure.Analytics.Purview.Scanning security: AADToken security-scopes: https://purview.azure.net/.default @@ -115,3 +117,4 @@ directive: $.operationId = (mappingTable[$.operationId] ?? $.operationId); ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md index c34814b2486c..3b72af89f344 100644 --- a/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Sharing/src/autorest.md @@ -6,8 +6,8 @@ Run `dotnet build /t:GenerateCode` to generate code. > see https://aka.ms/autorest ``` yaml -input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/40a953243ea428918de6e63758e853b7a24aa59a/specification/purview/data-plane/Azure.Analytics.Purview.Share/preview/2023-05-30-preview/share.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md namespace: Azure.Analytics.Purview.Sharing ``` @@ -60,3 +60,4 @@ directive: from: ShareResources_List to: ShareResources_GetAllShareResources ``` + diff --git a/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md b/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md index cde9e738e415..d8da73e6e629 100644 --- a/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md +++ b/sdk/purview/Azure.Analytics.Purview.Workflows/src/autorest.md @@ -6,8 +6,8 @@ Run `dotnet build /t:GenerateCode` to generate code. > see https://aka.ms/autorest ``` yaml -input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/afa158ef56a05f6603924f4a493817cec332b113/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2023-10-01-preview/purviewWorkflow.json +require: +- /mnt/vss/_work/1/s/azure-rest-api-specs/specification/purview/data-plane/readme.md security: AADToken security-scopes: https://purview.azure.net/.default @@ -20,3 +20,4 @@ security-scopes: https://purview.azure.net/.default + diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs similarity index 78% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs index f93bc022e2e0..84b9e5db92e0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationCollection.cs @@ -7,10 +7,8 @@ using System; using System.Threading.Tasks; -using System.Xml; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -21,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_max.json - // this example is just showing the usage of "Applications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPutOperation_example_max.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -42,41 +40,7 @@ public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() // invoke the operation string applicationName = "myApp"; - ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(new AzureLocation("eastus")) - { - Version = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - Parameters = -{ -["param1"] = "value1" -}, - UpgradePolicy = new ApplicationUpgradePolicy - { - ApplicationHealthPolicy = new ApplicationHealthPolicy(true, 0) - { - DefaultServiceTypeHealthPolicy = new ServiceTypeHealthPolicy(0, 0, 0), - ServiceTypeHealthPolicyMap = -{ -["service1"] = new ServiceTypeHealthPolicy(30, 30, 30) -}, - }, - ForceRestart = false, - RollingUpgradeMonitoringPolicy = new RollingUpgradeMonitoringPolicy( - PolicyViolationCompensationAction.Rollback, - XmlConvert.ToTimeSpan("00:02:00"), - XmlConvert.ToTimeSpan("00:05:00"), - XmlConvert.ToTimeSpan("00:10:00"), - XmlConvert.ToTimeSpan("01:00:00"), - XmlConvert.ToTimeSpan("00:15:00")), - InstanceCloseDelayDurationInSeconds = 600L, - UpgradeMode = RollingUpgradeMode.UnmonitoredAuto, - UpgradeReplicaSetCheckTimeout = 3600L, - RecreateApplication = false, - }, - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationName, data); ServiceFabricManagedApplicationResource result = lro.Value; @@ -91,8 +55,8 @@ public async Task CreateOrUpdate_PutAnApplicationWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPutOperation_example_min.json - // this example is just showing the usage of "Applications_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPutOperation_example_min.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -112,10 +76,7 @@ public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() // invoke the operation string applicationName = "myApp"; - ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(new AzureLocation("eastus")) - { - Version = "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applicationTypes/myAppType/versions/1.0", - }; + ServiceFabricManagedApplicationData data = new ServiceFabricManagedApplicationData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationName, data); ServiceFabricManagedApplicationResource result = lro.Value; @@ -130,8 +91,8 @@ public async Task CreateOrUpdate_PutAnApplicationWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -164,8 +125,8 @@ public async Task Get_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationListOperation_example.json - // this example is just showing the usage of "Applications_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationListOperation_example.json + // this example is just showing the usage of "ApplicationResource_List" 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(); @@ -200,8 +161,8 @@ public async Task GetAll_GetAListOfApplicationResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -230,8 +191,8 @@ public async Task Exists_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs similarity index 86% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs index 984161f5498b..1d336c0f4fa5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationGetOperation_example.json - // this example is just showing the usage of "Applications_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationGetOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -51,8 +51,8 @@ public async Task Get_GetAnApplication() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationDeleteOperation_example.json - // this example is just showing the usage of "Applications_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationDeleteOperation_example.json + // this example is just showing the usage of "ApplicationResource_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(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAnApplication() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplication() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationPatchOperation_example.json - // this example is just showing the usage of "Applications_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationPatchOperation_example.json + // this example is just showing the usage of "ApplicationResource_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 TokenCredential cred = new DefaultAzureCredential(); @@ -96,13 +96,7 @@ public async Task Update_PatchAnApplication() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - ServiceFabricManagedApplicationPatch patch = new ServiceFabricManagedApplicationPatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationPatch patch = new ServiceFabricManagedApplicationPatch(); ServiceFabricManagedApplicationResource result = await serviceFabricManagedApplication.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well @@ -116,7 +110,7 @@ public async Task Update_PatchAnApplication() [Ignore("Only validating compilation of examples")] public async Task ReadUpgrade_GetAnApplicationUpgrade() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionGetUpgrade_example.json + // Generated from example definition: 2025-03-01-preview/ApplicationActionGetUpgrade_example.json // this example is just showing the usage of "Applications_ReadUpgrade" 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 @@ -141,10 +135,10 @@ public async Task ReadUpgrade_GetAnApplicationUpgrade() [Test] [Ignore("Only validating compilation of examples")] - public async Task StartRollback_StartAnApplicationUpgradeRollback() + public async Task ResumeUpgrade_ResumeUpgrade() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionStartRollback_example.json - // this example is just showing the usage of "Applications_StartRollback" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationActionResumeUpgrade_example.json + // this example is just showing the usage of "Applications_ResumeUpgrade" 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(); @@ -161,17 +155,18 @@ public async Task StartRollback_StartAnApplicationUpgradeRollback() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - await serviceFabricManagedApplication.StartRollbackAsync(WaitUntil.Completed); + RuntimeResumeApplicationUpgradeContent content = new RuntimeResumeApplicationUpgradeContent(); + await serviceFabricManagedApplication.ResumeUpgradeAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task ResumeUpgrade_ResumeUpgrade() + public async Task StartRollback_StartAnApplicationUpgradeRollback() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationActionResumeUpgrade_example.json - // this example is just showing the usage of "Applications_ResumeUpgrade" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationActionStartRollback_example.json + // this example is just showing the usage of "Applications_StartRollback" 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(); @@ -188,11 +183,7 @@ public async Task ResumeUpgrade_ResumeUpgrade() ServiceFabricManagedApplicationResource serviceFabricManagedApplication = client.GetServiceFabricManagedApplicationResource(serviceFabricManagedApplicationResourceId); // invoke the operation - RuntimeResumeApplicationUpgradeContent content = new RuntimeResumeApplicationUpgradeContent - { - UpgradeDomainName = "UD1", - }; - await serviceFabricManagedApplication.ResumeUpgradeAsync(WaitUntil.Completed, content); + await serviceFabricManagedApplication.StartRollbackAsync(WaitUntil.Completed); Console.WriteLine("Succeeded"); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs similarity index 87% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs index 44dcc5178039..f89ba3d5db81 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePutOperation_example.json - // this example is just showing the usage of "ApplicationTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNamePutOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -40,7 +40,7 @@ public async Task CreateOrUpdate_PutAnApplicationType() // invoke the operation string applicationTypeName = "myAppType"; - ServiceFabricManagedApplicationTypeData data = new ServiceFabricManagedApplicationTypeData(new AzureLocation("eastus")); + ServiceFabricManagedApplicationTypeData data = new ServiceFabricManagedApplicationTypeData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, applicationTypeName, data); ServiceFabricManagedApplicationTypeResource result = lro.Value; @@ -55,8 +55,8 @@ public async Task CreateOrUpdate_PutAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -89,8 +89,8 @@ public async Task Get_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationTypeNameResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameListOperation_example.json - // this example is just showing the usage of "ApplicationTypes_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameListOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_List" 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(); @@ -125,8 +125,8 @@ public async Task GetAll_GetAListOfApplicationTypeNameResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -155,8 +155,8 @@ public async Task Exists_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs similarity index 85% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs index cc07507171b4..572b52eff874 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameGetOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -51,8 +51,8 @@ public async Task Get_GetAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNameDeleteOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNameDeleteOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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(); @@ -78,8 +78,8 @@ public async Task Delete_DeleteAnApplicationType() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplicationType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeNamePatchOperation_example.json - // this example is just showing the usage of "ApplicationTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeNamePatchOperation_example.json + // this example is just showing the usage of "ApplicationTypeResource_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 TokenCredential cred = new DefaultAzureCredential(); @@ -96,13 +96,7 @@ public async Task Update_PatchAnApplicationType() ServiceFabricManagedApplicationTypeResource serviceFabricManagedApplicationType = client.GetServiceFabricManagedApplicationTypeResource(serviceFabricManagedApplicationTypeResourceId); // invoke the operation - ServiceFabricManagedApplicationTypePatch patch = new ServiceFabricManagedApplicationTypePatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationTypePatch patch = new ServiceFabricManagedApplicationTypePatch(); ServiceFabricManagedApplicationTypeResource result = await serviceFabricManagedApplicationType.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs similarity index 87% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs index 2c05e6979767..a13e71f11c4d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionCollection.cs @@ -19,8 +19,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeVersionCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPutOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionPutOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -41,10 +41,7 @@ public async Task CreateOrUpdate_PutAnApplicationTypeVersion() // invoke the operation string version = "1.0"; - ServiceFabricManagedApplicationTypeVersionData data = new ServiceFabricManagedApplicationTypeVersionData(new AzureLocation("eastus")) - { - AppPackageUri = new Uri("http://fakelink.test.com/MyAppType"), - }; + ServiceFabricManagedApplicationTypeVersionData data = new ServiceFabricManagedApplicationTypeVersionData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, version, data); ServiceFabricManagedApplicationTypeVersionResource result = lro.Value; @@ -59,8 +56,8 @@ public async Task CreateOrUpdate_PutAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -94,8 +91,8 @@ public async Task Get_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfApplicationTypeVersionResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionListOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_ListByApplicationTypes" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionListOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_ListByApplicationTypes" 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(); @@ -131,8 +128,8 @@ public async Task GetAll_GetAListOfApplicationTypeVersionResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -162,8 +159,8 @@ public async Task Exists_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs similarity index 85% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs index 3e6d04f5d223..754e61f68d13 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedApplicationTypeVersionResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedApplicationTypeVersionResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionGetOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionGetOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -52,8 +52,8 @@ public async Task Get_GetAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionDeleteOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionDeleteOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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(); @@ -80,8 +80,8 @@ public async Task Delete_DeleteAnApplicationTypeVersion() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAnApplicationTypeVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ApplicationTypeVersionPatchOperation_example.json - // this example is just showing the usage of "ApplicationTypeVersions_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ApplicationTypeVersionPatchOperation_example.json + // this example is just showing the usage of "ApplicationTypeVersionResource_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 TokenCredential cred = new DefaultAzureCredential(); @@ -99,13 +99,7 @@ public async Task Update_PatchAnApplicationTypeVersion() ServiceFabricManagedApplicationTypeVersionResource serviceFabricManagedApplicationTypeVersion = client.GetServiceFabricManagedApplicationTypeVersionResource(serviceFabricManagedApplicationTypeVersionResourceId); // invoke the operation - ServiceFabricManagedApplicationTypeVersionPatch patch = new ServiceFabricManagedApplicationTypeVersionPatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedApplicationTypeVersionPatch patch = new ServiceFabricManagedApplicationTypeVersionPatch(); ServiceFabricManagedApplicationTypeVersionResource result = await serviceFabricManagedApplicationTypeVersion.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs similarity index 62% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs index 0836901ac378..2e9969295105 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterCollection.cs @@ -7,7 +7,6 @@ using System; using System.Threading.Tasks; -using System.Xml; using Azure.Core; using Azure.Identity; using Azure.ResourceManager.Resources; @@ -22,8 +21,8 @@ public partial class Sample_ServiceFabricManagedClusterCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_max.json - // this example is just showing the usage of "ManagedClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPutOperation_example_max.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -42,84 +41,7 @@ public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() // invoke the operation string clusterName = "mycluster"; - ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("eastus"), new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Basic)) - { - DnsName = "mycluster", - ClientConnectionPort = 19000, - HttpGatewayConnectionPort = 19080, - AdminUserName = "vmadmin", - AdminPassword = "{vm-password}", - LoadBalancingRules = {new ManagedClusterLoadBalancingRule(80, 80, new ManagedClusterLoadBalancingRuleTransportProtocol("http"), ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 80, -}, new ManagedClusterLoadBalancingRule(443, 443, new ManagedClusterLoadBalancingRuleTransportProtocol("http"), ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 443, -}, new ManagedClusterLoadBalancingRule(10000, 10000, ManagedClusterLoadBalancingRuleTransportProtocol.Tcp, ManagedClusterLoadBalanceProbeProtocol.Http) -{ -ProbePort = 10000, -LoadDistribution = "Default", -}}, - IsRdpAccessAllowed = true, - NetworkSecurityRules = {new ServiceFabricManagedNetworkSecurityRule("TestName", ServiceFabricManagedNsgProtocol.Tcp, ServiceFabricManagedNetworkTrafficAccess.Allow, 1010, ServiceFabricManagedNetworkSecurityRuleDirection.Inbound) -{ -Description = "Test description", -SourceAddressPrefixes = {"*"}, -DestinationAddressPrefixes = {"*"}, -SourcePortRanges = {"*"}, -DestinationPortRanges = {"*"}, -}, new ServiceFabricManagedNetworkSecurityRule("AllowARM", new ServiceFabricManagedNsgProtocol("*"), ServiceFabricManagedNetworkTrafficAccess.Allow, 2002, ServiceFabricManagedNetworkSecurityRuleDirection.Inbound) -{ -SourceAddressPrefix = "AzureResourceManager", -DestinationAddressPrefix = "*", -SourcePortRange = "*", -DestinationPortRange = "33500-33699", -}}, - FabricSettings = {new ClusterFabricSettingsSection("ManagedIdentityTokenService", new ClusterFabricSettingsParameterDescription[] -{ -new ClusterFabricSettingsParameterDescription("IsEnabled", "true") -})}, - ClusterCodeVersion = "7.1.168.9494", - ClusterUpgradeMode = ManagedClusterUpgradeMode.Manual, - AddOnFeatures = { ManagedClusterAddOnFeature.DnsService, ManagedClusterAddOnFeature.BackupRestoreService, ManagedClusterAddOnFeature.ResourceMonitorService }, - IsAutoOSUpgradeEnabled = true, - HasZoneResiliency = true, - MaxUnusedVersionsToKeep = 3, - IsIPv6Enabled = true, - IPTags = { new ManagedClusterIPTag("FirstPartyUsage", "SQL") }, - AuxiliarySubnets = {new ManagedClusterSubnet("testSubnet1") -{ -IsIPv6Enabled = true, -PrivateEndpointNetworkPolicies = ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.Enabled, -PrivateLinkServiceNetworkPolicies = ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.Enabled, -NetworkSecurityGroupId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/networkSecurityGroups/sn1"), -}}, - ServiceEndpoints = {new ManagedClusterServiceEndpoint("Microsoft.Storage") -{ -Locations = {new AzureLocation("eastus2"), new AzureLocation("usnorth")}, -}}, - ZonalUpdateMode = ZonalUpdateMode.Fast, - UseCustomVnet = true, - PublicIPPrefixId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPPrefix"), - PublicIPv6PrefixId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.Network/publicIPPrefixes/myPublicIPv6Prefix"), - DdosProtectionPlanId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/ddosProtectionPlans/myDDoSProtectionPlan"), - UpgradeDescription = new ManagedClusterUpgradePolicy - { - ForceRestart = false, - HealthPolicy = new ManagedClusterHealthPolicy(10, 30), - DeltaHealthPolicy = new ManagedClusterUpgradeDeltaHealthPolicy(20) - { - MaxPercentUpgradeDomainDeltaUnhealthyNodes = 40, - MaxPercentDeltaUnhealthyApplications = 40, - }, - MonitoringPolicy = new ManagedClusterMonitoringPolicy(XmlConvert.ToTimeSpan("00:05:00"), XmlConvert.ToTimeSpan("00:45:00"), "00:55:00", "12:00:00", "03:00:00"), - }, - HttpGatewayTokenAuthConnectionPort = 19081, - IsHttpGatewayExclusiveAuthModeEnabled = true, - AutoGeneratedDomainNameLabelScope = AutoGeneratedDomainNameLabelScope.SubscriptionReuse, - AllocatedOutboundPorts = 0, - Tags = { }, - }; + ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(default, null); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); ServiceFabricManagedClusterResource result = lro.Value; @@ -134,8 +56,8 @@ public async Task CreateOrUpdate_PutAClusterWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPutOperation_example_min.json - // this example is just showing the usage of "ManagedClusters_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPutOperation_example_min.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -154,18 +76,7 @@ public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() // invoke the operation string clusterName = "myCluster"; - ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(new AzureLocation("eastus"), new ServiceFabricManagedClustersSku(ServiceFabricManagedClustersSkuName.Basic)) - { - DnsName = "myCluster", - AdminUserName = "vmadmin", - AdminPassword = "{vm-password}", - FabricSettings = {new ClusterFabricSettingsSection("ManagedIdentityTokenService", new ClusterFabricSettingsParameterDescription[] -{ -new ClusterFabricSettingsParameterDescription("IsEnabled", "true") -})}, - ClusterUpgradeMode = ManagedClusterUpgradeMode.Automatic, - ClusterUpgradeCadence = ManagedClusterUpgradeCadence.Wave1, - }; + ServiceFabricManagedClusterData data = new ServiceFabricManagedClusterData(default, null); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, clusterName, data); ServiceFabricManagedClusterResource result = lro.Value; @@ -180,8 +91,8 @@ public async Task CreateOrUpdate_PutAClusterWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -213,8 +124,8 @@ public async Task Get_GetACluster() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListClusterByResourceGroup() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListByResourceGroupOperation_example.json - // this example is just showing the usage of "ManagedClusters_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterListByResourceGroupOperation_example.json + // this example is just showing the usage of "ManagedCluster_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 TokenCredential cred = new DefaultAzureCredential(); @@ -248,8 +159,8 @@ public async Task GetAll_ListClusterByResourceGroup() [Ignore("Only validating compilation of examples")] public async Task Exists_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -277,8 +188,8 @@ public async Task Exists_GetACluster() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs similarity index 82% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs index 0bd17f608f82..f11f0cd9fc89 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedClusterResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedClusterResource [Ignore("Only validating compilation of examples")] public async Task Get_GetACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterGetOperation_example.json - // this example is just showing the usage of "ManagedClusters_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterGetOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -50,8 +50,8 @@ public async Task Get_GetACluster() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteACluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterDeleteOperation_example.json - // this example is just showing the usage of "ManagedClusters_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterDeleteOperation_example.json + // this example is just showing the usage of "ManagedCluster_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(); @@ -76,8 +76,8 @@ public async Task Delete_DeleteACluster() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAManagedCluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterPatchOperation_example.json - // this example is just showing the usage of "ManagedClusters_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterPatchOperation_example.json + // this example is just showing the usage of "ManagedCluster_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 TokenCredential cred = new DefaultAzureCredential(); @@ -93,13 +93,7 @@ public async Task Update_PatchAManagedCluster() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - ServiceFabricManagedClusterPatch patch = new ServiceFabricManagedClusterPatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedClusterPatch patch = new ServiceFabricManagedClusterPatch(); ServiceFabricManagedClusterResource result = await serviceFabricManagedCluster.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well @@ -113,8 +107,8 @@ public async Task Update_PatchAManagedCluster() [Ignore("Only validating compilation of examples")] public async Task GetManagedAzResiliencyStatus_AzResiliencyStatusOfBaseResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedAzResiliencyStatusGet_example.json - // this example is just showing the usage of "managedAzResiliencyStatus_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/managedAzResiliencyStatusGet_example.json + // this example is just showing the usage of "ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus" 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(); @@ -137,10 +131,10 @@ public async Task GetManagedAzResiliencyStatus_AzResiliencyStatusOfBaseResources [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedMaintenanceWindowStatu_MaintenanceWindowStatus() + public async Task PostManagedApplyMaintenanceWindow_ApplyMaintenanceWindowStatus() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedMaintenanceWindowStatusGet_example.json - // this example is just showing the usage of "managedMaintenanceWindowStatus_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedApplyMaintenanceWindowPost_example.json + // this example is just showing the usage of "ManagedApplyMaintenanceWindow_Post" 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(); @@ -156,17 +150,17 @@ public async Task GetManagedMaintenanceWindowStatu_MaintenanceWindowStatus() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - ManagedMaintenanceWindowStatus result = await serviceFabricManagedCluster.GetManagedMaintenanceWindowStatuAsync(); + await serviceFabricManagedCluster.PostManagedApplyMaintenanceWindowAsync(); - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task PostManagedApplyMaintenanceWindow_MaintenanceWindowStatus() + public async Task GetManagedMaintenanceWindowStatu_GetMaintenanceWindowStatus() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedApplyMaintenanceWindowPost_example.json - // this example is just showing the usage of "managedApplyMaintenanceWindow_Post" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedMaintenanceWindowStatusGet_example.json + // this example is just showing the usage of "ManagedMaintenanceWindowStatus_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(); @@ -182,9 +176,9 @@ public async Task PostManagedApplyMaintenanceWindow_MaintenanceWindowStatus() ServiceFabricManagedClusterResource serviceFabricManagedCluster = client.GetServiceFabricManagedClusterResource(serviceFabricManagedClusterResourceId); // invoke the operation - await serviceFabricManagedCluster.PostManagedApplyMaintenanceWindowAsync(); + ManagedMaintenanceWindowStatus result = await serviceFabricManagedCluster.GetManagedMaintenanceWindowStatuAsync(); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs similarity index 63% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs index c26b9a8525cc..ccf71141da5b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeCollection.cs @@ -9,8 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.Resources.Models; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -21,8 +19,8 @@ public partial class Sample_ServiceFabricManagedNodeTypeCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationAutoScale_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationAutoScale_example.json + // this example is just showing the usage of "NodeType_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(); @@ -42,43 +40,7 @@ public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = -1, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.PremiumLrs, - PlacementProperties = -{ -["HasSSD"] = "true", -["NodeColor"] = "green", -["SomeProperty"] = "5" -}, - Capacities = -{ -["ClientConnections"] = "65536" -}, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmSecrets = {new NodeTypeVaultSecretGroup(new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault"), -}, new NodeTypeVaultCertificate[] -{ -new NodeTypeVaultCertificate(new Uri("https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c"), "My") -})}, - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -}}, - UserAssignedIdentities = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2") }, - IsStateless = true, - HasMultiplePlacementGroups = true, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -91,10 +53,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithAutoScaleParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() + public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_max.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationCustomImage_example.json + // this example is just showing the usage of "NodeType_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(); @@ -113,110 +75,8 @@ public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() ServiceFabricManagedNodeTypeCollection collection = serviceFabricManagedCluster.GetServiceFabricManagedNodeTypes(); // invoke the operation - string nodeTypeName = "BE-testResourceGroup-testRegion-test"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.PremiumLrs, - DataDiskLetter = "S", - PlacementProperties = -{ -["HasSSD"] = "true", -["NodeColor"] = "green", -["SomeProperty"] = "5" -}, - Capacities = -{ -["ClientConnections"] = "65536" -}, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmSecrets = {new NodeTypeVaultSecretGroup(new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.KeyVault/vaults/myVault"), -}, new NodeTypeVaultCertificate[] -{ -new NodeTypeVaultCertificate(new Uri("https://myVault.vault.azure.net:443/secrets/myCert/ef1a31d39e1f46bca33def54b6cda54c"), "My") -})}, - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -ForceUpdateTag = "v.1.0", -IsAutomaticUpgradeEnabled = true, -SetupOrder = {VmssExtensionSetupOrder.BeforeSFRuntime}, -}}, - UserAssignedIdentities = { new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity"), new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myIdentity2") }, - IsStateless = true, - HasMultiplePlacementGroups = true, - FrontendConfigurations = {new NodeTypeFrontendConfiguration -{ -LoadBalancerBackendAddressPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"), -LoadBalancerInboundNatPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"), -ApplicationGatewayBackendAddressPoolId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"), -}}, - AdditionalDataDisks = { new NodeTypeVmssDataDisk(1, 256, ServiceFabricManagedDataDiskType.StandardSsdLrs, "F"), new NodeTypeVmssDataDisk(2, 150, ServiceFabricManagedDataDiskType.PremiumLrs, "G") }, - IsEncryptionAtHostEnabled = true, - IsAcceleratedNetworkingEnabled = true, - UseDefaultPublicLoadBalancer = true, - IsOverProvisioningEnabled = false, - IsSpotVm = true, - UseEphemeralOSDisk = true, - SpotRestoreTimeout = "PT30M", - EvictionPolicy = SpotNodeVmEvictionPolicyType.Deallocate, - SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), - VmSetupActions = { VmSetupAction.EnableContainers, VmSetupAction.EnableHyperV }, - SecurityType = ServiceFabricManagedClusterSecurityType.TrustedLaunch, - IsSecureBootEnabled = true, - IsNodePublicIPEnabled = true, - IsNodePublicIPv6Enabled = true, - NatGatewayId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/natGateways/myNatGateway"), - ServiceArtifactReferenceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/serviceArtifacts/myServiceArtifact/vmArtifactsProfiles/myVmArtifactProfile"), - DscpConfigurationId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig"), - AdditionalNetworkInterfaceConfigurations = {new AdditionalNetworkInterfaceConfiguration("nic-1", new ServiceFabricManagedClusterIPConfiguration[] -{ -new ServiceFabricManagedClusterIPConfiguration("ipconfig-1") -{ -ApplicationGatewayBackendAddressPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/applicationGateways/appgw-test/backendAddressPools/appgwBepoolTest"), -}}, -LoadBalancerBackendAddressPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/backendAddressPools/LoadBalancerBEAddressPool"), -}}, -LoadBalancerInboundNatPools = {new WritableSubResource -{ -Id = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/loadBalancers/test-LB/inboundNatPools/LoadBalancerNATPool"), -}}, -SubnetId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/virtualNetworks/vnet1/subnets/subnet1"), -PrivateIPAddressVersion = ServiceFabricManagedClusterPrivateIPAddressVersion.IPv4, -PublicIPAddressConfiguration = new ServiceFabricManagedClusterPublicIPAddressConfiguration("publicip-1") -{ -IPTags = {new ManagedClusterIPTag("RoutingPreference", "Internet")}, -PublicIPAddressVersion = ServiceFabricManagedClusterPublicIPAddressVersion.IPv4, -}, -} -}) -{ -EnableAcceleratedNetworking = true, -DscpConfigurationId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Network/dscpConfigurations/myDscpConfig"), -}}, - ComputerNamePrefix = "BE", - VmApplications = {new ServiceFabricManagedVmApplication(new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resRg/providers/Microsoft.Compute/galleries/myGallery/applications/myApplication/versions/1.0.0")) -{ -ConfigurationReference = new Uri("https://mystorageaccount.blob.core.windows.net/containername/blobname"), -EnableAutomaticUpgrade = true, -Order = 1, -VmGalleryTags = "{\"Tag1\":\"Value1\",\"Tag2\":\"Value2\"}", -TreatFailureAsDeploymentFailure = false, -}}, - }; + string nodeTypeName = "BE"; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -229,10 +89,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() + public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperation_example_min.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationCustomSharedGalleriesImage_example.json + // this example is just showing the usage of "NodeType_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(); @@ -252,17 +112,7 @@ public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -275,10 +125,10 @@ public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() + public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationStateless_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationDedicatedHost_example.json + // this example is just showing the usage of "NodeType_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(); @@ -298,25 +148,7 @@ public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServi // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - VmSize = "Standard_DS3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2016-Datacenter-Server-Core", - VmImageVersion = "latest", - VmExtensions = {new NodeTypeVmssExtension("Microsoft.Azure.Geneva.GenevaMonitoring", "Microsoft.Azure.Geneva", "GenevaMonitoring", "2.0") -{ -AutoUpgradeMinorVersion = true, -Settings = BinaryData.FromObjectAsJson(new object()), -}}, - IsStateless = true, - HasMultiplePlacementGroups = true, - IsEncryptionAtHostEnabled = true, - UseTempDataDisk = true, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -329,10 +161,10 @@ public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServi [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() + public async Task CreateOrUpdate_PutAnStatelessNodeTypeWithTemporaryDiskForServiceFabric() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomImage_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationStateless_example.json + // this example is just showing the usage of "NodeType_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(); @@ -352,14 +184,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImageResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/galleries/myCustomImages/images/Win2019DC"), - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -372,10 +197,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithCustomVmImage() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() + public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationDedicatedHost_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperationVmImagePlan_example.json + // this example is just showing the usage of "NodeType_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(); @@ -395,22 +220,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - DataDiskType = ServiceFabricManagedDataDiskType.StandardSsdLrs, - PlacementProperties = { }, - Capacities = { }, - VmSize = "Standard_D8s_v3", - VmImagePublisher = "MicrosoftWindowsServer", - VmImageOffer = "WindowsServer", - VmImageSku = "2019-Datacenter", - VmImageVersion = "latest", - Zones = { "1" }, - HostGroupId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/testhostgroupRG/providers/Microsoft.Compute/hostGroups/testHostGroup", - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -423,10 +233,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithDedicatedHosts() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() + public async Task CreateOrUpdate_PutANodeTypeWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationCustomSharedGalleriesImage_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperation_example_max.json + // this example is just showing the usage of "NodeType_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(); @@ -445,15 +255,8 @@ public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() ServiceFabricManagedNodeTypeCollection collection = serviceFabricManagedCluster.GetServiceFabricManagedNodeTypes(); // invoke the operation - string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmSharedGalleryImageId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-custom-image/providers/Microsoft.Compute/sharedGalleries/35349201-a0b3-405e-8a23-9f1450984307-SFSHAREDGALLERY/images/TestNoProdContainerDImage/versions/latest"), - }; + string nodeTypeName = "BE-testResourceGroup-testRegion-test"; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -466,10 +269,10 @@ public async Task CreateOrUpdate_PutNodeTypeWithSharedGalleriesCustomVmImage() [Test] [Ignore("Only validating compilation of examples")] - public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() + public async Task CreateOrUpdate_PutANodeTypeWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePutOperationVmImagePlan_example.json - // this example is just showing the usage of "NodeTypes_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePutOperation_example_min.json + // this example is just showing the usage of "NodeType_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(); @@ -489,23 +292,7 @@ public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() // invoke the operation string nodeTypeName = "BE"; - ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData - { - IsPrimary = false, - VmInstanceCount = 10, - DataDiskSizeInGB = 200, - VmSize = "Standard_D3", - VmImagePublisher = "testpublisher", - VmImageOffer = "windows_2022_test", - VmImageSku = "win_2022_test_20_10_gen2", - VmImageVersion = "latest", - VmImagePlan = new VmImagePlan - { - Name = "win_2022_test_20_10_gen2", - Product = "windows_2022_test", - Publisher = "testpublisher", - }, - }; + ServiceFabricManagedNodeTypeData data = new ServiceFabricManagedNodeTypeData(); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, nodeTypeName, data); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -520,8 +307,8 @@ public async Task CreateOrUpdate_PutNodeTypeWithVmImagePlan() [Ignore("Only validating compilation of examples")] public async Task Get_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -554,8 +341,8 @@ public async Task Get_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task GetAll_ListNodeTypeOfTheSpecifiedManagedCluster() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeListOperation_example.json - // this example is just showing the usage of "NodeTypes_ListByManagedClusters" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeListOperation_example.json + // this example is just showing the usage of "NodeType_ListByManagedClusters" 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(); @@ -590,8 +377,8 @@ public async Task GetAll_ListNodeTypeOfTheSpecifiedManagedCluster() [Ignore("Only validating compilation of examples")] public async Task Exists_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -620,8 +407,8 @@ public async Task Exists_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs similarity index 65% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs index d2d06d2fa684..a43aea0d4ab0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedNodeTypeResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedNodeTypeResource [Ignore("Only validating compilation of examples")] public async Task Get_GetANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeGetOperation_example.json - // this example is just showing the usage of "NodeTypes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeGetOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -51,8 +51,8 @@ public async Task Get_GetANodeType() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeDeleteOperation_example.json - // this example is just showing the usage of "NodeTypes_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeDeleteOperation_example.json + // this example is just showing the usage of "NodeType_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(); @@ -76,10 +76,10 @@ public async Task Delete_DeleteANodeType() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_PatchANodeType() + public async Task Update_PatchANodeTypeWhileAutoScaling() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperation_example.json - // this example is just showing the usage of "NodeTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePatchOperationAutoScale_example.json + // this example is just showing the usage of "NodeType_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 TokenCredential cred = new DefaultAzureCredential(); @@ -96,13 +96,7 @@ public async Task Update_PatchANodeType() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch(); ArmOperation lro = await serviceFabricManagedNodeType.UpdateAsync(WaitUntil.Completed, patch); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -115,10 +109,10 @@ public async Task Update_PatchANodeType() [Test] [Ignore("Only validating compilation of examples")] - public async Task Update_PatchANodeTypeWhileAutoScaling() + public async Task Update_PatchANodeType() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypePatchOperationAutoScale_example.json - // this example is just showing the usage of "NodeTypes_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypePatchOperation_example.json + // this example is just showing the usage of "NodeType_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 TokenCredential cred = new DefaultAzureCredential(); @@ -135,18 +129,7 @@ public async Task Update_PatchANodeTypeWhileAutoScaling() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch - { - Tags = -{ -["a"] = "b" -}, - Sku = new NodeTypeSku(10) - { - Name = "Standard_S0", - Tier = "Standard", - }, - }; + ServiceFabricManagedNodeTypePatch patch = new ServiceFabricManagedNodeTypePatch(); ArmOperation lro = await serviceFabricManagedNodeType.UpdateAsync(WaitUntil.Completed, patch); ServiceFabricManagedNodeTypeResource result = lro.Value; @@ -159,10 +142,10 @@ public async Task Update_PatchANodeTypeWhileAutoScaling() [Test] [Ignore("Only validating compilation of examples")] - public async Task Restart_RestartNodes() + public async Task Deallocate_DeallocateNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/RestartNodes_example.json - // this example is just showing the usage of "NodeTypes_Restart" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/DeallocateNodes_example.json + // this example is just showing the usage of "NodeTypes_Deallocate" 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(); @@ -179,11 +162,92 @@ public async Task Restart_RestartNodes() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - Nodes = { "BE_0", "BE_3" }, - }; - await serviceFabricManagedNodeType.RestartAsync(WaitUntil.Completed, content); + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.DeallocateAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task DeleteNode_DeleteNodes() + { + // Generated from example definition: 2025-03-01-preview/DeleteNodes_example.json + // this example is just showing the usage of "NodeTypes_DeleteNode" 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 ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.DeleteNodeAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Redeploy_RedeployAllNodesByUpgradeDomain() + { + // Generated from example definition: 2025-03-01-preview/RedeployNodes_UD_example.json + // this example is just showing the usage of "NodeTypes_Redeploy" 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 ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.RedeployAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Redeploy_RedeployNodes() + { + // Generated from example definition: 2025-03-01-preview/RedeployNodes_example.json + // this example is just showing the usage of "NodeTypes_Redeploy" 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 ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.RedeployAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } @@ -192,7 +256,7 @@ public async Task Restart_RestartNodes() [Ignore("Only validating compilation of examples")] public async Task Reimage_ReimageAllNodesByUpgradeDomain() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_UD_example.json + // Generated from example definition: 2025-03-01-preview/ReimageNodes_UD_example.json // this example is just showing the usage of "NodeTypes_Reimage" 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 @@ -210,10 +274,7 @@ public async Task Reimage_ReimageAllNodesByUpgradeDomain() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - UpdateType = ServiceFabricManagedClusterUpdateType.ByUpgradeDomain, - }; + NodeTypeActionContent content = new NodeTypeActionContent(); await serviceFabricManagedNodeType.ReimageAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); @@ -223,7 +284,7 @@ public async Task Reimage_ReimageAllNodesByUpgradeDomain() [Ignore("Only validating compilation of examples")] public async Task Reimage_ReimageNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ReimageNodes_example.json + // Generated from example definition: 2025-03-01-preview/ReimageNodes_example.json // this example is just showing the usage of "NodeTypes_Reimage" 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,10 +302,7 @@ public async Task Reimage_ReimageNodes() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - Nodes = { "BE_0", "BE_3" }, - }; + NodeTypeActionContent content = new NodeTypeActionContent(); await serviceFabricManagedNodeType.ReimageAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); @@ -252,10 +310,10 @@ public async Task Reimage_ReimageNodes() [Test] [Ignore("Only validating compilation of examples")] - public async Task DeleteNode_DeleteNodes() + public async Task Restart_RestartNodes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/DeleteNodes_example.json - // this example is just showing the usage of "NodeTypes_DeleteNode" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/RestartNodes_example.json + // this example is just showing the usage of "NodeTypes_Restart" 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(); @@ -272,11 +330,36 @@ public async Task DeleteNode_DeleteNodes() ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); // invoke the operation - NodeTypeActionContent content = new NodeTypeActionContent - { - Nodes = { "BE_0", "BE_3" }, - }; - await serviceFabricManagedNodeType.DeleteNodeAsync(WaitUntil.Completed, content); + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.RestartAsync(WaitUntil.Completed, content); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Start_StartNodes() + { + // Generated from example definition: 2025-03-01-preview/StartNodes_example.json + // this example is just showing the usage of "NodeTypes_Start" 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 ServiceFabricManagedNodeTypeResource created on azure + // for more information of creating ServiceFabricManagedNodeTypeResource, please refer to the document of ServiceFabricManagedNodeTypeResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + string resourceGroupName = "resRg"; + string clusterName = "myCluster"; + string nodeTypeName = "BE"; + ResourceIdentifier serviceFabricManagedNodeTypeResourceId = ServiceFabricManagedNodeTypeResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + ServiceFabricManagedNodeTypeResource serviceFabricManagedNodeType = client.GetServiceFabricManagedNodeTypeResource(serviceFabricManagedNodeTypeResourceId); + + // invoke the operation + NodeTypeActionContent content = new NodeTypeActionContent(); + await serviceFabricManagedNodeType.StartAsync(WaitUntil.Completed, content); Console.WriteLine("Succeeded"); } @@ -285,8 +368,8 @@ public async Task DeleteNode_DeleteNodes() [Ignore("Only validating compilation of examples")] public async Task GetAvailableSkus_ListANodeTypeSKUs() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/NodeTypeSkusListOperation_example.json - // this example is just showing the usage of "NodeTypeSkus_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/NodeTypeSkusListOperation_example.json + // this example is just showing the usage of "NodeTypeSkus_GetAvailableSkus" 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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs similarity index 80% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs index 040de985dfa1..e5ba908b63cd 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceCollection.cs @@ -9,7 +9,6 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; -using Azure.ResourceManager.ServiceFabricManagedClusters.Models; using NUnit.Framework; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples @@ -20,8 +19,8 @@ public partial class Sample_ServiceFabricManagedServiceCollection [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_max.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePutOperation_example_max.json + // this example is just showing the usage of "ServiceResource_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(); @@ -42,30 +41,7 @@ public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() // invoke the operation string serviceName = "myService"; - ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(new AzureLocation("eastus")) - { - Properties = new StatelessServiceProperties("myServiceType", new SingletonPartitionScheme(), 5) - { - MinInstanceCount = 3, - MinInstancePercentage = 30, - ServicePackageActivationMode = ManagedServicePackageActivationMode.SharedProcess, - ServiceDnsName = "myservicednsname.myApp", - PlacementConstraints = "NodeType==frontend", - CorrelationScheme = { new ManagedServiceCorrelation(ManagedServiceCorrelationScheme.AlignedAffinity, "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/resRg/providers/Microsoft.ServiceFabric/managedclusters/myCluster/applications/myApp/services/myService1") }, - ServiceLoadMetrics = {new ManagedServiceLoadMetric("metric1") -{ -Weight = ManagedServiceLoadMetricWeight.Low, -DefaultLoad = 3, -}}, - ServicePlacementPolicies = { new ServicePlacementNonPartiallyPlaceServicePolicy() }, - DefaultMoveCost = ServiceFabricManagedServiceMoveCost.Medium, - ScalingPolicies = { new ManagedServiceScalingPolicy(new PartitionInstanceCountScalingMechanism(3, 9, 2), new AveragePartitionLoadScalingTrigger("metricName", 2, 8, "00:01:00")) }, - }, - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); ServiceFabricManagedServiceResource result = lro.Value; @@ -80,8 +56,8 @@ public async Task CreateOrUpdate_PutAServiceWithMaximumParameters() [Ignore("Only validating compilation of examples")] public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePutOperation_example_min.json - // this example is just showing the usage of "Services_CreateOrUpdate" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePutOperation_example_min.json + // this example is just showing the usage of "ServiceResource_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(); @@ -102,10 +78,7 @@ public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() // invoke the operation string serviceName = "myService"; - ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(new AzureLocation("eastus")) - { - Properties = new StatelessServiceProperties("myServiceType", new SingletonPartitionScheme(), 1), - }; + ServiceFabricManagedServiceData data = new ServiceFabricManagedServiceData(default); ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, serviceName, data); ServiceFabricManagedServiceResource result = lro.Value; @@ -120,8 +93,8 @@ public async Task CreateOrUpdate_PutAServiceWithMinimumParameters() [Ignore("Only validating compilation of examples")] public async Task Get_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_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(); @@ -155,8 +128,8 @@ public async Task Get_GetAService() [Ignore("Only validating compilation of examples")] public async Task GetAll_GetAListOfServiceResources() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceListOperation_example.json - // this example is just showing the usage of "Services_ListByApplications" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceListOperation_example.json + // this example is just showing the usage of "ServiceResource_ListByApplications" 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(); @@ -192,8 +165,8 @@ public async Task GetAll_GetAListOfServiceResources() [Ignore("Only validating compilation of examples")] public async Task Exists_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_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(); @@ -223,8 +196,8 @@ public async Task Exists_GetAService() [Ignore("Only validating compilation of examples")] public async Task GetIfExists_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_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(); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs similarity index 86% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs index 9a829cfa3055..5759f07d68e2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_ServiceFabricManagedServiceResource.cs @@ -20,8 +20,8 @@ public partial class Sample_ServiceFabricManagedServiceResource [Ignore("Only validating compilation of examples")] public async Task Get_GetAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceGetOperation_example.json - // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceGetOperation_example.json + // this example is just showing the usage of "ServiceResource_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(); @@ -52,8 +52,8 @@ public async Task Get_GetAService() [Ignore("Only validating compilation of examples")] public async Task Delete_DeleteAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServiceDeleteOperation_example.json - // this example is just showing the usage of "Services_Delete" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServiceDeleteOperation_example.json + // this example is just showing the usage of "ServiceResource_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(); @@ -80,8 +80,8 @@ public async Task Delete_DeleteAService() [Ignore("Only validating compilation of examples")] public async Task Update_PatchAService() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ServicePatchOperation_example.json - // this example is just showing the usage of "Services_Update" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ServicePatchOperation_example.json + // this example is just showing the usage of "ServiceResource_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 TokenCredential cred = new DefaultAzureCredential(); @@ -99,13 +99,7 @@ public async Task Update_PatchAService() ServiceFabricManagedServiceResource serviceFabricManagedService = client.GetServiceFabricManagedServiceResource(serviceFabricManagedServiceResourceId); // invoke the operation - ServiceFabricManagedServicePatch patch = new ServiceFabricManagedServicePatch - { - Tags = -{ -["a"] = "b" -}, - }; + ServiceFabricManagedServicePatch patch = new ServiceFabricManagedServicePatch(); ServiceFabricManagedServiceResource result = await serviceFabricManagedService.UpdateAsync(patch); // the variable result is a resource, you could call other operations on this instance as well diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs similarity index 64% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index 180082f38b89..41307a2d1792 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tests/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -19,10 +19,10 @@ public partial class Sample_SubscriptionResourceExtensions { [Test] [Ignore("Only validating compilation of examples")] - public async Task GetServiceFabricManagedClusters_ListManagedClusters() + public async Task GetManagedClusterVersion_GetClusterVersion() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterListBySubscriptionOperation_example.json - // this example is just showing the usage of "ManagedClusters_ListBySubscription" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionGet_example.json + // this example is just showing the usage of "ManagedClusterVersion_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(); @@ -35,25 +35,20 @@ public async Task GetServiceFabricManagedClusters_ListManagedClusters() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation and iterate over the result - await foreach (ServiceFabricManagedClusterResource item in subscriptionResource.GetServiceFabricManagedClustersAsync()) - { - // 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 - ServiceFabricManagedClusterData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } + // invoke the operation + string location = "eastus"; + string clusterVersion = "7.2.477.9590"; + ServiceFabricManagedClusterVersion result = await subscriptionResource.GetManagedClusterVersionAsync(location, clusterVersion); - Console.WriteLine("Succeeded"); + Console.WriteLine($"Succeeded: {result}"); } [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersion_GetClusterVersion() + public async Task GetManagedClusterVersions_ListClusterVersions() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGet_example.json - // this example is just showing the usage of "ManagedClusterVersion_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionList_example.json + // this example is just showing the usage of "ManagedClusterVersion_List" 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(); @@ -66,20 +61,22 @@ public async Task GetManagedClusterVersion_GetClusterVersion() ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - // invoke the operation - AzureLocation location = new AzureLocation("eastus"); - string clusterVersion = "7.2.477.9590"; - ServiceFabricManagedClusterVersion result = await subscriptionResource.GetManagedClusterVersionAsync(location, clusterVersion); + // invoke the operation and iterate over the result + string location = "eastus"; + await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsAsync(location)) + { + Console.WriteLine($"Succeeded: {item}"); + } - Console.WriteLine($"Succeeded: {result}"); + Console.WriteLine("Succeeded"); } [Test] [Ignore("Only validating compilation of examples")] public async Task GetManagedClusterVersionByEnvironment_GetClusterVersionByEnvironment() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionGetByEnvironment_example.json - // this example is just showing the usage of "ManagedClusterVersion_GetByEnvironment" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionGetByEnvironment_example.json + // this example is just showing the usage of "ManagedClusterVersion_GetManagedClusterVersionByEnvironment" 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(); @@ -93,7 +90,7 @@ public async Task GetManagedClusterVersionByEnvironment_GetClusterVersionByEnvir SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation - AzureLocation location = new AzureLocation("eastus"); + string location = "eastus"; ManagedClusterVersionEnvironment environment = ManagedClusterVersionEnvironment.Windows; string clusterVersion = "7.2.477.9590"; ServiceFabricManagedClusterVersion result = await subscriptionResource.GetManagedClusterVersionByEnvironmentAsync(location, environment, clusterVersion); @@ -103,10 +100,10 @@ public async Task GetManagedClusterVersionByEnvironment_GetClusterVersionByEnvir [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersions_ListClusterVersions() + public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEnvironment() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionList_example.json - // this example is just showing the usage of "ManagedClusterVersion_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterVersionListByEnvironment.json + // this example is just showing the usage of "ManagedClusterVersion_ListByEnvironment" 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(); @@ -120,8 +117,9 @@ public async Task GetManagedClusterVersions_ListClusterVersions() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation location = new AzureLocation("eastus"); - await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsAsync(location)) + string location = "eastus"; + ManagedClusterVersionEnvironment environment = ManagedClusterVersionEnvironment.Windows; + await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsByEnvironmentAsync(location, environment)) { Console.WriteLine($"Succeeded: {item}"); } @@ -131,10 +129,36 @@ public async Task GetManagedClusterVersions_ListClusterVersions() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEnvironment() + public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/ManagedClusterVersionListByEnvironment.json - // this example is just showing the usage of "ManagedClusterVersion_ListByEnvironment" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/managedUnsupportedVMSizesGet_example.json + // this example is just showing the usage of "ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize" 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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + string location = "eastus"; + string vmSize = "Standard_B1ls1"; + ServiceFabricManagedUnsupportedVmSize result = await subscriptionResource.GetManagedUnsupportedVmSizeAsync(location, vmSize); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() + { + // Generated from example definition: 2025-03-01-preview/managedUnsupportedVMSizesList_example.json + // this example is just showing the usage of "ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes" 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(); @@ -148,9 +172,8 @@ public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEn SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation location = new AzureLocation("eastus"); - ManagedClusterVersionEnvironment environment = ManagedClusterVersionEnvironment.Windows; - await foreach (ServiceFabricManagedClusterVersion item in subscriptionResource.GetManagedClusterVersionsByEnvironmentAsync(location, environment)) + string location = "eastus"; + await foreach (ServiceFabricManagedUnsupportedVmSize item in subscriptionResource.GetManagedUnsupportedVmSizesAsync(location)) { Console.WriteLine($"Succeeded: {item}"); } @@ -160,10 +183,10 @@ public async Task GetManagedClusterVersionsByEnvironment_ListClusterVersionsByEn [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() + public async Task GetServiceFabricManagedClusters_ListManagedClusters() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesList_example.json - // this example is just showing the usage of "managedUnsupportedVMSizes_List" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/ManagedClusterListBySubscriptionOperation_example.json + // this example is just showing the usage of "ManagedCluster_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 TokenCredential cred = new DefaultAzureCredential(); @@ -177,10 +200,13 @@ public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); // invoke the operation and iterate over the result - AzureLocation location = new AzureLocation("eastus"); - await foreach (ServiceFabricManagedUnsupportedVmSize item in subscriptionResource.GetManagedUnsupportedVmSizesAsync(location)) + await foreach (ServiceFabricManagedClusterResource item in subscriptionResource.GetServiceFabricManagedClustersAsync()) { - Console.WriteLine($"Succeeded: {item}"); + // 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 + ServiceFabricManagedClusterData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } Console.WriteLine("Succeeded"); @@ -188,10 +214,10 @@ public async Task GetManagedUnsupportedVmSizes_ListUnsupportedVmSizes() [Test] [Ignore("Only validating compilation of examples")] - public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() + public async Task GetOperationResult_GetLongRunningOperationResult() { - // Generated from example definition: specification/servicefabricmanagedclusters/resource-manager/Microsoft.ServiceFabric/preview/2024-09-01-preview/examples/managedUnsupportedVMSizesGet_example.json - // this example is just showing the usage of "managedUnsupportedVMSizes_Get" operation, for the dependent resources, they will have to be created separately. + // Generated from example definition: 2025-03-01-preview/OperationResultsGet_example.json + // this example is just showing the usage of "OperationResults_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(); @@ -206,8 +232,60 @@ public async Task GetManagedUnsupportedVmSize_GetUnsupportedVmSizes() // invoke the operation AzureLocation location = new AzureLocation("eastus"); - string vmSize = "Standard_B1ls1"; - ServiceFabricManagedUnsupportedVmSize result = await subscriptionResource.GetManagedUnsupportedVmSizeAsync(location, vmSize); + string operationId = "00000000-0000-0000-0000-000000001234"; + await subscriptionResource.GetOperationResultAsync(WaitUntil.Completed, location, operationId); + + Console.WriteLine("Succeeded"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperationStatu_ErrorResponseDescribingWhyTheOperationFailed() + { + // Generated from example definition: 2025-03-01-preview/OperationStatusFailed_example.json + // this example is just showing the usage of "OperationStatus_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + string operationId = "00000000-0000-0000-0000-000000001234"; + LongRunningOperationResult result = await subscriptionResource.GetOperationStatuAsync(location, operationId); + + Console.WriteLine($"Succeeded: {result}"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperationStatu_OKTheRequestHasSucceeded() + { + // Generated from example definition: 2025-03-01-preview/OperationStatusSucceeded_example.json + // this example is just showing the usage of "OperationStatus_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 SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + AzureLocation location = new AzureLocation("eastus"); + string operationId = "00000000-0000-0000-0000-000000001234"; + LongRunningOperationResult result = await subscriptionResource.GetOperationStatuAsync(location, operationId); Console.WriteLine($"Succeeded: {result}"); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_TenantResourceExtensions.cs new file mode 100644 index 000000000000..09f73e427457 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -0,0 +1,43 @@ +// 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.Resources; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; +using NUnit.Framework; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Samples +{ + public partial class Sample_TenantResourceExtensions + { + [Test] + [Ignore("Only validating compilation of examples")] + public async Task GetOperations_ListTheOperationsForTheProvider() + { + // Generated from example definition: 2025-03-01-preview/OperationsList_example.json + // this example is just showing the usage of "Operations_List" 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); + + TenantResource tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation and iterate over the result + await foreach (OperationResult item in tenantResource.GetOperationsAsync()) + { + Console.WriteLine($"Succeeded: {item}"); + } + + Console.WriteLine("Succeeded"); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs index 7e369b07153d..19900c0c486e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ArmServiceFabricManagedClustersModelFactory.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; using System.Net; using Azure.Core; @@ -18,7 +17,36 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// Model factory for models. public static partial class ArmServiceFabricManagedClustersModelFactory { - /// Initializes a new instance of . + /// Initializes a new instance of . + /// The name of the operation. + /// Indicates whether the operation is a data action. + /// The object that represents the operation. + /// Origin result. + /// The URL to use for getting the next set of results. + /// A new instance for mocking. + public static OperationResult OperationResult(string name = null, bool? isDataAction = null, AvailableOperationDisplay display = null, string origin = null, string nextLink = null) + { + return new OperationResult( + name, + isDataAction, + display, + origin, + nextLink, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The name of the provider. + /// The resource on which the operation is performed. + /// The operation that can be performed. + /// Operation description. + /// A new instance for mocking. + public static AvailableOperationDisplay AvailableOperationDisplay(string provider = null, string resource = null, string operation = null, string description = null) + { + return new AvailableOperationDisplay(provider, resource, operation, description, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -26,12 +54,22 @@ public static partial class ArmServiceFabricManagedClustersModelFactory /// The tags. /// The location. /// The current deployment or provisioning state, which only appears in the response. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null) + /// + /// The version of the application type as defined in the application manifest. + /// This name must be the full Arm Resource ID for the referenced application type version. + /// + /// List of application parameters with overridden values from their default values specified in the application manifest. + /// Describes the policy for a monitored application upgrade. + /// List of user assigned identities for the application, each mapped to a friendly name. + /// Describes the managed identities for an Azure resource. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, IEnumerable managedIdentities = null, ManagedServiceIdentity identity = null) { tags ??= new Dictionary(); + parameters ??= new Dictionary(); + managedIdentities ??= new List(); - return new ServiceFabricManagedApplicationTypeData( + return new ServiceFabricManagedApplicationData( id, name, resourceType, @@ -39,10 +77,15 @@ public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplic tags, location, provisioningState, + version, + parameters, + upgradePolicy, + managedIdentities?.ToList(), + identity, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. @@ -50,13 +93,12 @@ public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplic /// The tags. /// The location. /// The current deployment or provisioning state, which only appears in the response. - /// The URL to the application package. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, Uri appPackageUri = null) + /// A new instance for mocking. + public static ServiceFabricManagedApplicationTypeData ServiceFabricManagedApplicationTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null) { tags ??= new Dictionary(); - return new ServiceFabricManagedApplicationTypeVersionData( + return new ServiceFabricManagedApplicationTypeData( id, name, resourceType, @@ -64,47 +106,32 @@ public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManage tags, location, provisioningState, - appPackageUri, serializedAdditionalRawData: null); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. /// The tags. /// The location. - /// Describes the managed identities for an Azure resource. /// The current deployment or provisioning state, which only appears in the response. - /// - /// The version of the application type as defined in the application manifest. - /// This name must be the full Arm Resource ID for the referenced application type version. - /// - /// - /// List of application parameters with overridden values from their default values specified in the application manifest. - /// Describes the policy for a monitored application upgrade. - /// List of user assigned identities for the application, each mapped to a friendly name. - /// A new instance for mocking. - public static ServiceFabricManagedApplicationData ServiceFabricManagedApplicationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ManagedServiceIdentity identity = null, string provisioningState = null, string version = null, IDictionary parameters = null, ApplicationUpgradePolicy upgradePolicy = null, IEnumerable managedIdentities = null) + /// The URL to the application package. + /// A new instance for mocking. + public static ServiceFabricManagedApplicationTypeVersionData ServiceFabricManagedApplicationTypeVersionData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string provisioningState = null, Uri appPackageUri = null) { tags ??= new Dictionary(); - parameters ??= new Dictionary(); - managedIdentities ??= new List(); - return new ServiceFabricManagedApplicationData( + return new ServiceFabricManagedApplicationTypeVersionData( id, name, resourceType, systemData, tags, location, - identity, provisioningState, - version, - parameters, - upgradePolicy, - managedIdentities?.ToList(), + appPackageUri, serializedAdditionalRawData: null); } @@ -160,7 +187,6 @@ public static ServiceFabricManagedServiceData ServiceFabricManagedServiceData(Re /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// A new instance for mocking. public static ManagedServiceProperties ManagedServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceKind = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null) @@ -170,7 +196,7 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement servicePlacementPolicies ??= new List(); scalingPolicies ??= new List(); - return new ManagedServiceProperties( + return new UnknownManagedServiceProperties( placementConstraints, correlationScheme?.ToList(), serviceLoadMetrics?.ToList(), @@ -186,6 +212,162 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement serviceDnsName); } + /// Initializes a new instance of . + /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + /// A list that describes the correlation of the service with other services. + /// The service load metrics is given as an array of ServiceLoadMetric objects. + /// + /// A list that describes the correlation of the service with other services. + /// 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 . + /// + /// Specifies the move cost for the service. + /// Scaling policies for this service. + /// The current deployment or provisioning state, which only appears in the response. + /// The name of the service type. + /// + /// Describes how the service is partitioned. + /// 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 activation Mode of the service package. + /// + /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). + /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. + /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. + /// + /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. + /// The target replica set size as a number. + /// The minimum replica set size as a number. + /// The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". + /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". + /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". + /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". + /// A new instance for mocking. + public static StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, bool? hasPersistedState = null, int? targetReplicaSetSize = null, int? minReplicaSetSize = null, string replicaRestartWaitDuration = null, string quorumLossWaitDuration = null, string standByReplicaKeepDuration = null, string servicePlacementTimeLimit = null) + { + correlationScheme ??= new List(); + serviceLoadMetrics ??= new List(); + servicePlacementPolicies ??= new List(); + scalingPolicies ??= new List(); + + return new StatefulServiceProperties( + placementConstraints, + correlationScheme?.ToList(), + serviceLoadMetrics?.ToList(), + servicePlacementPolicies?.ToList(), + defaultMoveCost, + scalingPolicies?.ToList(), + serializedAdditionalRawData: null, + provisioningState, + ServiceKind.Stateful, + serviceTypeName, + partitionDescription, + servicePackageActivationMode, + serviceDnsName, + hasPersistedState, + targetReplicaSetSize, + minReplicaSetSize, + replicaRestartWaitDuration, + quorumLossWaitDuration, + standByReplicaKeepDuration, + servicePlacementTimeLimit); + } + + /// Initializes a new instance of . + /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". + /// A list that describes the correlation of the service with other services. + /// The service load metrics is given as an array of ServiceLoadMetric objects. + /// + /// A list that describes the correlation of the service with other services. + /// 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 . + /// + /// Specifies the move cost for the service. + /// Scaling policies for this service. + /// The current deployment or provisioning state, which only appears in the response. + /// The name of the service type. + /// + /// Describes how the service is partitioned. + /// 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 activation Mode of the service package. + /// + /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). + /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. + /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. + /// + /// The instance count. + /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + /// MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. + /// A new instance for mocking. + public static StatelessServiceProperties StatelessServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, int instanceCount = default, int? minInstanceCount = null, int? minInstancePercentage = null) + { + correlationScheme ??= new List(); + serviceLoadMetrics ??= new List(); + servicePlacementPolicies ??= new List(); + scalingPolicies ??= new List(); + + return new StatelessServiceProperties( + placementConstraints, + correlationScheme?.ToList(), + serviceLoadMetrics?.ToList(), + servicePlacementPolicies?.ToList(), + defaultMoveCost, + scalingPolicies?.ToList(), + serializedAdditionalRawData: null, + provisioningState, + ServiceKind.Stateless, + serviceTypeName, + partitionDescription, + servicePackageActivationMode, + serviceDnsName, + instanceCount, + minInstanceCount, + minInstancePercentage); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// The Service Fabric runtime version of the cluster. + /// The date of expiry of support of the version. + /// Cluster operating system, the default will be Windows. + /// A new instance for mocking. + public static ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterCodeVersion = null, DateTimeOffset? versionSupportExpireOn = null, ServiceFabricManagedClusterOSType? osType = null) + { + return new ServiceFabricManagedClusterVersion( + id, + name, + resourceType, + systemData, + clusterCodeVersion, + versionSupportExpireOn, + osType, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// VM Size properties. + /// A new instance for mocking. + public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vmSize = null) + { + return new ServiceFabricManagedUnsupportedVmSize( + id, + name, + resourceType, + systemData, + vmSize != null ? new VmSize(vmSize, serializedAdditionalRawData: null) : null, + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The id. /// The name. @@ -193,13 +375,12 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// The systemData. /// The tags. /// The location. - /// The sku of the managed cluster. /// The cluster dns name. /// The fully qualified domain name associated with the public load balancer of the cluster. /// The IPv4 address associated with the public load balancer of the cluster. - /// A service generated unique identifier for the cluster resource. + /// A service generated unique identifier for the cluster resource. /// The current state of the cluster. - /// List of thumbprints of the cluster certificates. + /// List of thumbprints of the cluster certificates. /// The port used for client connections to the cluster. /// The port used for HTTP connections to the cluster. /// VM admin user name. @@ -212,10 +393,7 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// The list of custom fabric settings to configure the cluster. /// The provisioning state of the managed cluster resource. /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. /// List of add-on features to enable on the cluster. /// Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. @@ -238,12 +416,14 @@ public static ManagedServiceProperties ManagedServiceProperties(string placement /// If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. /// This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",. + /// The sku of the managed cluster. /// A new instance for mocking. - public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, ServiceFabricManagedClustersSkuName? skuName = null, string dnsName = null, string fqdn = null, IPAddress ipv4Address = null, Guid? clusterId = null, ServiceFabricManagedClusterState? clusterState = null, IEnumerable clusterCertificateThumbprints = null, int? clientConnectionPort = null, int? httpGatewayConnectionPort = null, string adminUserName = null, string adminPassword = null, IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = null, IEnumerable networkSecurityRules = null, IEnumerable clients = null, ManagedClusterAzureActiveDirectory azureActiveDirectory = null, IEnumerable fabricSettings = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, string clusterCodeVersion = null, ManagedClusterUpgradeMode? clusterUpgradeMode = null, ManagedClusterUpgradeCadence? clusterUpgradeCadence = null, IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = null, bool? hasZoneResiliency = null, int? maxUnusedVersionsToKeep = null, bool? isIPv6Enabled = null, string subnetId = null, IEnumerable ipTags = null, IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = null, IEnumerable auxiliarySubnets = null, IEnumerable serviceEndpoints = null, ZonalUpdateMode? zonalUpdateMode = null, bool? useCustomVnet = null, ResourceIdentifier publicIPPrefixId = null, ResourceIdentifier publicIPv6PrefixId = null, ResourceIdentifier ddosProtectionPlanId = null, ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = null, bool? isHttpGatewayExclusiveAuthModeEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, int? allocatedOutboundPorts = null, ETag? etag = null) + public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, IDictionary tags = null, AzureLocation location = default, string dnsName = null, string fqdn = null, IPAddress ipv4Address = null, Guid? uuid = null, ServiceFabricManagedClusterState? clusterState = null, IEnumerable any = null, int? clientConnectionPort = null, int? httpGatewayConnectionPort = null, string adminUserName = null, string adminPassword = null, IEnumerable loadBalancingRules = null, bool? isRdpAccessAllowed = null, IEnumerable networkSecurityRules = null, IEnumerable clients = null, ManagedClusterAzureActiveDirectory azureActiveDirectory = null, IEnumerable fabricSettings = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, string clusterCodeVersion = null, ManagedClusterUpgradeMode? clusterUpgradeMode = null, ManagedClusterUpgradeCadence? clusterUpgradeCadence = null, IEnumerable addOnFeatures = null, bool? isAutoOSUpgradeEnabled = null, bool? hasZoneResiliency = null, int? maxUnusedVersionsToKeep = null, bool? isIPv6Enabled = null, string subnetId = null, IEnumerable ipTags = null, IPAddress ipv6Address = null, bool? isServicePublicIPEnabled = null, IEnumerable auxiliarySubnets = null, IEnumerable serviceEndpoints = null, ZonalUpdateMode? zonalUpdateMode = null, bool? useCustomVnet = null, ResourceIdentifier publicIPPrefixId = null, ResourceIdentifier publicIPv6PrefixId = null, ResourceIdentifier ddosProtectionPlanId = null, ManagedClusterUpgradePolicy upgradeDescription = null, int? httpGatewayTokenAuthConnectionPort = null, bool? isHttpGatewayExclusiveAuthModeEnabled = null, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = null, int? allocatedOutboundPorts = null, string vmImage = null, string etag = null, ServiceFabricManagedClustersSkuName? skuName = null) { tags ??= new Dictionary(); - clusterCertificateThumbprints ??= new List(); + any ??= new List(); loadBalancingRules ??= new List(); networkSecurityRules ??= new List(); clients ??= new List(); @@ -260,13 +440,12 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re systemData, tags, location, - skuName.HasValue ? new ServiceFabricManagedClustersSku(skuName.Value, serializedAdditionalRawData: null) : null, dnsName, fqdn, ipv4Address, - clusterId, + uuid, clusterState, - clusterCertificateThumbprints?.ToList(), + any?.ToList(), clientConnectionPort, httpGatewayConnectionPort, adminUserName, @@ -302,10 +481,58 @@ public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(Re isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope, allocatedOutboundPorts, + vmImage, etag, + skuName.HasValue ? new ServiceFabricManagedClustersSku(skuName.Value, serializedAdditionalRawData: null) : null, serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// A new instance for mocking. + public static FaultSimulation FaultSimulation(string simulationId = null, FaultSimulationStatus? status = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, FaultSimulationDetails details = null) + { + return new FaultSimulation( + simulationId, + status, + startOn, + endOn, + details, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// + /// Fault simulation parameters. + /// 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 . + /// + /// A new instance for mocking. + public static FaultSimulationDetails FaultSimulationDetails(string clusterId = null, string operationId = null, IEnumerable nodeTypeFaultSimulation = null, FaultSimulationContent parameters = null) + { + nodeTypeFaultSimulation ??= new List(); + + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation?.ToList(), parameters, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// A new instance for mocking. + public static NodeTypeFaultSimulation NodeTypeFaultSimulation(string nodeTypeName = null, FaultSimulationStatus? status = null, string operationId = null, SfmcOperationStatus? operationStatus = null) + { + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// List of Managed VM Sizes for Service Fabric Managed Clusters. /// URL to get the next set of Managed VM Sizes if there are any. @@ -350,54 +577,13 @@ public static ManagedMaintenanceWindowStatus ManagedMaintenanceWindowStatus(bool serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The Service Fabric runtime version of the cluster. - /// The date of expiry of support of the version. - /// Cluster operating system, the default will be Windows. - /// A new instance for mocking. - public static ServiceFabricManagedClusterVersion ServiceFabricManagedClusterVersion(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string clusterCodeVersion = null, DateTimeOffset? versionSupportExpireOn = null, ServiceFabricManagedClusterOSType? osType = null) - { - return new ServiceFabricManagedClusterVersion( - id, - name, - resourceType, - systemData, - clusterCodeVersion, - versionSupportExpireOn, - osType, - serializedAdditionalRawData: null); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// VM Size properties. - /// A new instance for mocking. - public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsupportedVmSize(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string vmSize = null) - { - return new ServiceFabricManagedUnsupportedVmSize( - id, - name, - resourceType, - systemData, - vmSize != null ? new VmSize(vmSize, serializedAdditionalRawData: null) : null, - serializedAdditionalRawData: null); - } - /// Initializes a new instance of . /// The id. /// The name. /// The resourceType. /// The systemData. - /// The node type sku. /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. /// Disk size for the managed disk attached to the vms on the node type in GBs. /// Managed data disk type. Specifies the storage account type for the managed disk. /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. @@ -412,7 +598,7 @@ public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsuppor /// The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. /// The secrets to install in the virtual machines. /// Set of extensions that should be installed onto the virtual machines. - /// Identities to assign to the virtual machine scale set under the node type. + /// Identities to assign to the virtual machine scale set under the node type. /// Indicates if the node type can only host Stateless workloads. /// Indicates if scale set associated with the node type can be composed of multiple placement groups. /// Indicates the node type uses its own frontend configurations instead of the default one for the cluster. This setting can only be specified for non-primary node types and can not be added or removed after the node type is created. @@ -433,8 +619,9 @@ public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsuppor /// Indicates the resource id of the vm image. This parameter is used for custom vm image. /// Indicates the resource id of the subnet for the node type. /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. @@ -446,15 +633,17 @@ public static ServiceFabricManagedUnsupportedVmSize ServiceFabricManagedUnsuppor /// Specifies the settings for any additional secondary network interfaces to attach to the node type. /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. /// Specifies the gallery applications that should be made available to the underlying VMSS. - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + /// Resource tags. + /// The node type sku. /// A new instance for mocking. - public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NodeTypeSku sku = null, bool? isPrimary = null, int? vmInstanceCount = null, int? dataDiskSizeInGB = null, ServiceFabricManagedDataDiskType? dataDiskType = null, string dataDiskLetter = null, IDictionary placementProperties = null, IDictionary capacities = null, EndpointRangeDescription applicationPorts = null, EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, IEnumerable vmSecrets = null, IEnumerable vmExtensions = null, IEnumerable userAssignedIdentities = null, bool? isStateless = null, bool? hasMultiplePlacementGroups = null, IEnumerable frontendConfigurations = null, IEnumerable networkSecurityRules = null, IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, bool? isAcceleratedNetworkingEnabled = null, bool? useDefaultPublicLoadBalancer = null, bool? useTempDataDisk = null, bool? isOverProvisioningEnabled = null, IEnumerable zones = null, bool? isSpotVm = null, string hostGroupId = null, bool? useEphemeralOSDisk = null, string spotRestoreTimeout = null, SpotNodeVmEvictionPolicyType? evictionPolicy = null, ResourceIdentifier vmImageResourceId = null, ResourceIdentifier subnetId = null, IEnumerable vmSetupActions = null, ServiceFabricManagedClusterSecurityType? securityType = null, bool? isSecureBootEnabled = null, bool? isNodePublicIPEnabled = null, bool? isNodePublicIPv6Enabled = null, ResourceIdentifier vmSharedGalleryImageId = null, ResourceIdentifier natGatewayId = null, IEnumerable natConfigurations = null, VmImagePlan vmImagePlan = null, ResourceIdentifier serviceArtifactReferenceId = null, ResourceIdentifier dscpConfigurationId = null, IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, IEnumerable vmApplications = null, IDictionary tags = null) + public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, bool? isPrimary = null, int? vmInstanceCount = null, int? dataDiskSizeInGB = null, ServiceFabricManagedDataDiskType? dataDiskType = null, string dataDiskLetter = null, IDictionary placementProperties = null, IDictionary capacities = null, EndpointRangeDescription applicationPorts = null, EndpointRangeDescription ephemeralPorts = null, string vmSize = null, string vmImagePublisher = null, string vmImageOffer = null, string vmImageSku = null, string vmImageVersion = null, IEnumerable vmSecrets = null, IEnumerable vmExtensions = null, IEnumerable vmManagedIdentityArmId = null, bool? isStateless = null, bool? hasMultiplePlacementGroups = null, IEnumerable frontendConfigurations = null, IEnumerable networkSecurityRules = null, IEnumerable additionalDataDisks = null, bool? isEncryptionAtHostEnabled = null, ServiceFabricManagedResourceProvisioningState? provisioningState = null, bool? isAcceleratedNetworkingEnabled = null, bool? useDefaultPublicLoadBalancer = null, bool? useTempDataDisk = null, bool? isOverProvisioningEnabled = null, IEnumerable zones = null, bool? isSpotVm = null, string hostGroupId = null, bool? useEphemeralOSDisk = null, string spotRestoreTimeout = null, SpotNodeVmEvictionPolicyType? evictionPolicy = null, ResourceIdentifier vmImageResourceId = null, ResourceIdentifier subnetId = null, IEnumerable vmSetupActions = null, ServiceFabricManagedClusterSecurityType? securityType = null, SecurityEncryptionType? securityEncryptionType = null, bool? isSecureBootEnabled = null, bool? isNodePublicIPEnabled = null, bool? isNodePublicIPv6Enabled = null, ResourceIdentifier vmSharedGalleryImageId = null, ResourceIdentifier natGatewayId = null, IEnumerable natConfigurations = null, VmImagePlan vmImagePlan = null, ResourceIdentifier serviceArtifactReferenceId = null, ResourceIdentifier dscpConfigurationId = null, IEnumerable additionalNetworkInterfaceConfigurations = null, string computerNamePrefix = null, IEnumerable vmApplications = null, bool? zoneBalance = null, IDictionary tags = null, NodeTypeSku sku = null) { placementProperties ??= new Dictionary(); capacities ??= new Dictionary(); vmSecrets ??= new List(); vmExtensions ??= new List(); - userAssignedIdentities ??= new List(); + vmManagedIdentityArmId ??= new List(); frontendConfigurations ??= new List(); networkSecurityRules ??= new List(); additionalDataDisks ??= new List(); @@ -470,7 +659,6 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( name, resourceType, systemData, - sku, isPrimary, vmInstanceCount, dataDiskSizeInGB, @@ -487,7 +675,7 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( vmImageVersion, vmSecrets?.ToList(), vmExtensions?.ToList(), - userAssignedIdentities != null ? new VmManagedIdentity(userAssignedIdentities?.ToList(), serializedAdditionalRawData: null) : null, + vmManagedIdentityArmId != null ? new VmManagedIdentity(vmManagedIdentityArmId?.ToList(), serializedAdditionalRawData: null) : null, isStateless, hasMultiplePlacementGroups, frontendConfigurations?.ToList(), @@ -509,6 +697,7 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( subnetId, vmSetupActions?.ToList(), securityType, + securityEncryptionType, isSecureBootEnabled, isNodePublicIPEnabled, isNodePublicIPv6Enabled, @@ -521,14 +710,16 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( additionalNetworkInterfaceConfigurations?.ToList(), computerNamePrefix, vmApplications?.ToList(), + zoneBalance, tags, + sku, serializedAdditionalRawData: null); } /// Initializes a new instance of . /// The name of the extension. /// The name of the extension handler publisher. - /// Specifies the type of the extension; an example is "CustomScriptExtension". + /// Specifies the type of the extension; an example is "CustomScriptExtension". /// Specifies the version of the script handler. /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. /// Json formatted public settings for the extension. @@ -539,7 +730,7 @@ public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData( /// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. /// Indicates the setup order for the extension. /// A new instance for mocking. - public static NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, string publisher = null, string vmssExtensionPropertiesType = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = null, BinaryData settings = null, BinaryData protectedSettings = null, string forceUpdateTag = null, IEnumerable provisionAfterExtensions = null, string provisioningState = null, bool? isAutomaticUpgradeEnabled = null, IEnumerable setupOrder = null) + public static NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, string publisher = null, string type = null, string typeHandlerVersion = null, bool? autoUpgradeMinorVersion = null, VmSSExtensionPropertiesSettings settings = null, VmSSExtensionPropertiesProtectedSettings protectedSettings = null, string forceUpdateTag = null, IEnumerable provisionAfterExtensions = null, string provisioningState = null, bool? isAutomaticUpgradeEnabled = null, IEnumerable setupOrder = null) { provisionAfterExtensions ??= new List(); setupOrder ??= new List(); @@ -547,7 +738,7 @@ public static NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, st return new NodeTypeVmssExtension( name, publisher, - vmssExtensionPropertiesType, + type, typeHandlerVersion, autoUpgradeMinorVersion, settings, @@ -561,7 +752,7 @@ public static NodeTypeVmssExtension NodeTypeVmssExtension(string name = null, st } /// Initializes a new instance of . - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. /// The supported SKU for a for node type. /// Provides information about how the node count can be scaled. /// A new instance for mocking. @@ -572,7 +763,7 @@ public static NodeTypeAvailableSku NodeTypeAvailableSku(ResourceType? resourceTy /// Initializes a new instance of . /// The sku name. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. /// A new instance for mocking. public static NodeTypeSupportedSku NodeTypeSupportedSku(string name = null, string tier = null) { @@ -590,242 +781,33 @@ public static NodeTypeSkuCapacity NodeTypeSkuCapacity(int? minimum = null, int? return new NodeTypeSkuCapacity(minimum, maximum, @default, scaleType, serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". - /// A list that describes the correlation of the service with other services. - /// The service load metrics is given as an array of ServiceLoadMetric objects. - /// - /// A list that describes the correlation of the service with other services. - /// 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 . - /// - /// Specifies the move cost for the service. - /// Scaling policies for this service. - /// The current deployment or provisioning state, which only appears in the response. - /// The name of the service type. - /// - /// Describes how the service is partitioned. - /// 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 activation Mode of the service package. - /// - /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). - /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. - /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// - /// - /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. - /// The target replica set size as a number. - /// The minimum replica set size as a number. - /// The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". - /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". - /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". - /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". - /// A new instance for mocking. - public static StatefulServiceProperties StatefulServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, bool? hasPersistedState = null, int? targetReplicaSetSize = null, int? minReplicaSetSize = null, TimeSpan? replicaRestartWaitDuration = null, TimeSpan? quorumLossWaitDuration = null, TimeSpan? standByReplicaKeepDuration = null, TimeSpan? servicePlacementTimeLimit = null) + /// Initializes a new instance of . + /// The name of the operation. + /// The start time of the operation. + /// The end time of the operation. + /// The completion percentage of the operation. + /// The status of the operation. + /// The operation error. + /// A new instance for mocking. + public static LongRunningOperationResult LongRunningOperationResult(string name = null, DateTimeOffset? startOn = null, DateTimeOffset? endOn = null, double? percentComplete = null, string status = null, ErrorModelError error = null) { - correlationScheme ??= new List(); - serviceLoadMetrics ??= new List(); - servicePlacementPolicies ??= new List(); - scalingPolicies ??= new List(); - - return new StatefulServiceProperties( - placementConstraints, - correlationScheme?.ToList(), - serviceLoadMetrics?.ToList(), - servicePlacementPolicies?.ToList(), - defaultMoveCost, - scalingPolicies?.ToList(), - serializedAdditionalRawData: null, - provisioningState, - ServiceKind.Stateful, - serviceTypeName, - partitionDescription, - servicePackageActivationMode, - serviceDnsName, - hasPersistedState, - targetReplicaSetSize, - minReplicaSetSize, - replicaRestartWaitDuration, - quorumLossWaitDuration, - standByReplicaKeepDuration, - servicePlacementTimeLimit); - } - - /// Initializes a new instance of . - /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". - /// A list that describes the correlation of the service with other services. - /// The service load metrics is given as an array of ServiceLoadMetric objects. - /// - /// A list that describes the correlation of the service with other services. - /// 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 . - /// - /// Specifies the move cost for the service. - /// Scaling policies for this service. - /// The current deployment or provisioning state, which only appears in the response. - /// The name of the service type. - /// - /// Describes how the service is partitioned. - /// 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 activation Mode of the service package. - /// - /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). - /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. - /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// - /// - /// The instance count. - /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. - /// MinInstancePercentage is the minimum percentage of InstanceCount that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. - /// A new instance for mocking. - public static StatelessServiceProperties StatelessServiceProperties(string placementConstraints = null, IEnumerable correlationScheme = null, IEnumerable serviceLoadMetrics = null, IEnumerable servicePlacementPolicies = null, ServiceFabricManagedServiceMoveCost? defaultMoveCost = null, IEnumerable scalingPolicies = null, string provisioningState = null, string serviceTypeName = null, ManagedServicePartitionScheme partitionDescription = null, ManagedServicePackageActivationMode? servicePackageActivationMode = null, string serviceDnsName = null, int instanceCount = default, int? minInstanceCount = null, int? minInstancePercentage = null) - { - correlationScheme ??= new List(); - serviceLoadMetrics ??= new List(); - servicePlacementPolicies ??= new List(); - scalingPolicies ??= new List(); - - return new StatelessServiceProperties( - placementConstraints, - correlationScheme?.ToList(), - serviceLoadMetrics?.ToList(), - servicePlacementPolicies?.ToList(), - defaultMoveCost, - scalingPolicies?.ToList(), - serializedAdditionalRawData: null, - provisioningState, - ServiceKind.Stateless, - serviceTypeName, - partitionDescription, - servicePackageActivationMode, - serviceDnsName, - instanceCount, - minInstanceCount, - minInstancePercentage); - } - - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The tags. - /// The location. - /// The sku of the managed cluster. - /// The cluster dns name. - /// The fully qualified domain name associated with the public load balancer of the cluster. - /// The IPv4 address associated with the public load balancer of the cluster. - /// A service generated unique identifier for the cluster resource. - /// The current state of the cluster. - /// List of thumbprints of the cluster certificates. - /// The port used for client connections to the cluster. - /// The port used for HTTP connections to the cluster. - /// VM admin user name. - /// VM admin user password. - /// Load balancing rules that are applied to the public load balancer of the cluster. - /// Setting this to true enables RDP access to the VM. The default NSG rule opens RDP port to Internet which can be overridden with custom Network Security Rules. The default value for this setting is false. - /// Custom Network Security Rules that are applied to the Virtual Network of the cluster. - /// Client certificates that are allowed to manage the cluster. - /// The AAD authentication settings of the cluster. - /// The list of custom fabric settings to configure the cluster. - /// The provisioning state of the managed cluster resource. - /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. - /// List of add-on features to enable on the cluster. - /// Setting this to true enables automatic OS upgrade for the node types that are created using any platform OS image with version 'latest'. The default value for this setting is false. - /// Indicates if the cluster has zone resiliency. - /// The policy used to clean up unused versions. - /// Setting this to true creates IPv6 address space for the default VNet used by the cluster. This setting cannot be changed once the cluster is created. The default value for this setting is false. - /// If specified, the node types for the cluster are created in this subnet instead of the default VNet. The **networkSecurityRules** specified for the cluster are also applied to this subnet. This setting cannot be changed once the cluster is created. - /// The list of IP tags associated with the default public IP address of the cluster. - /// IPv6 address for the cluster if IPv6 is enabled. - /// Setting this to true will link the IPv4 address as the ServicePublicIP of the IPv6 address. It can only be set to True if IPv6 is enabled on the cluster. - /// Auxiliary subnets for the cluster. - /// Service endpoints for subnets in the cluster. - /// Indicates the update mode for Cross Az clusters. - /// For new clusters, this parameter indicates that it uses Bring your own VNet, but the subnet is specified at node type level; and for such clusters, the subnetId property is required for node types. - /// Specify the resource id of a public IPv4 prefix that the load balancer will allocate a public IPv4 address from. This setting cannot be changed once the cluster is created. - /// Specify the resource id of a public IPv6 prefix that the load balancer will allocate a public IPv6 address from. This setting cannot be changed once the cluster is created. - /// Specify the resource id of a DDoS network protection plan that will be associated with the virtual network of the cluster. - /// The policy to use when upgrading the cluster. - /// The port used for token-auth based HTTPS connections to the cluster. Cannot be set to the same port as HttpGatewayEndpoint. - /// If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. - /// Azure resource etag. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static ServiceFabricManagedClusterData ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ServiceFabricManagedClustersSkuName? skuName, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IEnumerable clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IEnumerable loadBalancingRules, bool? isRdpAccessAllowed, IEnumerable networkSecurityRules, IEnumerable clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IEnumerable fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IEnumerable addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, int? maxUnusedVersionsToKeep, bool? isIPv6Enabled, string subnetId, IEnumerable ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IEnumerable auxiliarySubnets, IEnumerable serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, ETag? etag) - { - return ServiceFabricManagedClusterData(id: id, name: name, resourceType: resourceType, systemData: systemData, tags: tags, location: location, skuName: skuName, dnsName: dnsName, fqdn: fqdn, ipv4Address: ipv4Address, clusterId: clusterId, clusterState: clusterState, clusterCertificateThumbprints: clusterCertificateThumbprints, clientConnectionPort: clientConnectionPort, httpGatewayConnectionPort: httpGatewayConnectionPort, adminUserName: adminUserName, adminPassword: adminPassword, loadBalancingRules: loadBalancingRules, isRdpAccessAllowed: isRdpAccessAllowed, networkSecurityRules: networkSecurityRules, clients: clients, azureActiveDirectory: azureActiveDirectory, fabricSettings: fabricSettings, provisioningState: provisioningState, clusterCodeVersion: clusterCodeVersion, clusterUpgradeMode: clusterUpgradeMode, clusterUpgradeCadence: clusterUpgradeCadence, addOnFeatures: addOnFeatures, isAutoOSUpgradeEnabled: isAutoOSUpgradeEnabled, hasZoneResiliency: hasZoneResiliency, maxUnusedVersionsToKeep: maxUnusedVersionsToKeep, isIPv6Enabled: isIPv6Enabled, subnetId: subnetId, ipTags: ipTags, ipv6Address: ipv6Address, isServicePublicIPEnabled: isServicePublicIPEnabled, auxiliarySubnets: auxiliarySubnets, serviceEndpoints: serviceEndpoints, zonalUpdateMode: zonalUpdateMode, useCustomVnet: useCustomVnet, publicIPPrefixId: publicIPPrefixId, publicIPv6PrefixId: publicIPv6PrefixId, ddosProtectionPlanId: ddosProtectionPlanId, upgradeDescription: upgradeDescription, httpGatewayTokenAuthConnectionPort: httpGatewayTokenAuthConnectionPort, isHttpGatewayExclusiveAuthModeEnabled: isHttpGatewayExclusiveAuthModeEnabled, autoGeneratedDomainNameLabelScope: default, allocatedOutboundPorts: default, etag: etag); + return new LongRunningOperationResult( + name, + startOn, + endOn, + percentComplete, + status, + error, + serializedAdditionalRawData: null); } - /// Initializes a new instance of . - /// The id. - /// The name. - /// The resourceType. - /// The systemData. - /// The node type sku. - /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. - /// Disk size for the managed disk attached to the vms on the node type in GBs. - /// Managed data disk type. Specifies the storage account type for the managed disk. - /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. - /// The placement tags applied to nodes in the node type, which can be used to indicate where certain services (workload) should run. - /// The capacity tags applied to the nodes in the node type, the cluster resource manager uses these tags to understand how much resource a node has. - /// The range of ports from which cluster assigned port to Service Fabric applications. - /// The range of ephemeral ports that nodes in this node type should be configured with. - /// The size of virtual machines in the pool. All virtual machines in a pool are the same size. For example, Standard_D3. - /// The publisher of the Azure Virtual Machines Marketplace image. For example, Canonical or MicrosoftWindowsServer. - /// The offer type of the Azure Virtual Machines Marketplace image. For example, UbuntuServer or WindowsServer. - /// The SKU of the Azure Virtual Machines Marketplace image. For example, 14.04.0-LTS or 2012-R2-Datacenter. - /// The version of the Azure Virtual Machines Marketplace image. A value of 'latest' can be specified to select the latest version of an image. If omitted, the default is 'latest'. - /// The secrets to install in the virtual machines. - /// Set of extensions that should be installed onto the virtual machines. - /// Identities to assign to the virtual machine scale set under the node type. - /// Indicates if the node type can only host Stateless workloads. - /// Indicates if scale set associated with the node type can be composed of multiple placement groups. - /// Indicates the node type uses its own frontend configurations instead of the default one for the cluster. This setting can only be specified for non-primary node types and can not be added or removed after the node type is created. - /// The Network Security Rules for this node type. This setting can only be specified for node types that are configured with frontend configurations. - /// Additional managed data disks. - /// Enable or disable the Host Encryption for the virtual machines on the node type. This will enable the encryption for all the disks including Resource/Temp disk at host itself. Default: The Encryption at host will be disabled unless this property is set to true for the resource. - /// The provisioning state of the node type resource. - /// Specifies whether the network interface is accelerated networking-enabled. - /// Specifies whether the use public load balancer. If not specified and the node type doesn't have its own frontend configuration, it will be attached to the default load balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is true, then the frontend has to be an Internal Load Balancer. If the node type uses its own Load balancer and useDefaultPublicLoadBalancer is false or not set, then the custom load balancer must include a public load balancer to provide outbound connectivity. - /// Specifies whether to use the temporary disk for the service fabric data root, in which case no managed data disk will be attached and the temporary disk will be used. It is only allowed for stateless node types. - /// Specifies whether the node type should be overprovisioned. It is only allowed for stateless node types. - /// Specifies the availability zones where the node type would span across. If the cluster is not spanning across availability zones, initiates az migration for the cluster. - /// Indicates whether the node type will be Spot Virtual Machines. Azure will allocate the VMs if there is capacity available and the VMs can be evicted at any time. - /// Specifies the full host group resource Id. This property is used for deploying on azure dedicated hosts. - /// Indicates whether to use ephemeral os disk. The sku selected on the vmSize property needs to support this feature. - /// Indicates the time duration after which the platform will not try to restore the VMSS SPOT instances specified as ISO 8601. - /// Specifies the eviction policy for virtual machines in a SPOT node type. Default is Delete. - /// Indicates the resource id of the vm image. This parameter is used for custom vm image. - /// Indicates the resource id of the subnet for the node type. - /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. - /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. - /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. - /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. - /// Specifies the resource id of a NAT Gateway to attach to the subnet of this node type. Node type must use custom load balancer. - /// Specifies the NAT configuration on default public Load Balancer for the node type. This is only supported for node types use the default public Load Balancer. - /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. - /// Specifies the service artifact reference id used to set same image version for all virtual machines in the scale set when using 'latest' image version. - /// Specifies the resource id of the DSCP configuration to apply to the node type network interface. - /// Specifies the settings for any additional secondary network interfaces to attach to the node type. - /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. - /// Azure resource tags. - /// A new instance for mocking. - [EditorBrowsable(EditorBrowsableState.Never)] - public static ServiceFabricManagedNodeTypeData ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IEnumerable vmSecrets, IEnumerable vmExtensions, IEnumerable userAssignedIdentities, bool? isStateless, bool? hasMultiplePlacementGroups, IEnumerable frontendConfigurations, IEnumerable networkSecurityRules, IEnumerable additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IEnumerable zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IEnumerable vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IEnumerable natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IEnumerable additionalNetworkInterfaceConfigurations, string computerNamePrefix, IDictionary tags) + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// A new instance for mocking. + public static ErrorModelError ErrorModelError(string code = null, string message = null) { - return ServiceFabricManagedNodeTypeData(id: id, name: name, resourceType: resourceType, systemData: systemData, sku: sku, isPrimary: isPrimary, vmInstanceCount: vmInstanceCount, dataDiskSizeInGB: dataDiskSizeInGB, dataDiskType: dataDiskType, dataDiskLetter: dataDiskLetter, placementProperties: placementProperties, capacities: capacities, applicationPorts: applicationPorts, ephemeralPorts: ephemeralPorts, vmSize: vmSize, vmImagePublisher: vmImagePublisher, vmImageOffer: vmImageOffer, vmImageSku: vmImageSku, vmImageVersion: vmImageVersion, vmSecrets: vmSecrets, vmExtensions: vmExtensions, userAssignedIdentities: userAssignedIdentities, isStateless: isStateless, hasMultiplePlacementGroups: hasMultiplePlacementGroups, frontendConfigurations: frontendConfigurations, networkSecurityRules: networkSecurityRules, additionalDataDisks: additionalDataDisks, isEncryptionAtHostEnabled: isEncryptionAtHostEnabled, provisioningState: provisioningState, isAcceleratedNetworkingEnabled: isAcceleratedNetworkingEnabled, useDefaultPublicLoadBalancer: useDefaultPublicLoadBalancer, useTempDataDisk: useTempDataDisk, isOverProvisioningEnabled: isOverProvisioningEnabled, zones: zones, isSpotVm: isSpotVm, hostGroupId: hostGroupId, useEphemeralOSDisk: useEphemeralOSDisk, spotRestoreTimeout: spotRestoreTimeout, evictionPolicy: evictionPolicy, vmImageResourceId: vmImageResourceId, subnetId: subnetId, vmSetupActions: vmSetupActions, securityType: securityType, isSecureBootEnabled: isSecureBootEnabled, isNodePublicIPEnabled: isNodePublicIPEnabled, isNodePublicIPv6Enabled: isNodePublicIPv6Enabled, vmSharedGalleryImageId: vmSharedGalleryImageId, natGatewayId: natGatewayId, natConfigurations: natConfigurations, vmImagePlan: vmImagePlan, serviceArtifactReferenceId: serviceArtifactReferenceId, dscpConfigurationId: dscpConfigurationId, additionalNetworkInterfaceConfigurations: additionalNetworkInterfaceConfigurations, computerNamePrefix: computerNamePrefix, vmApplications: default, tags: tags); + return new ErrorModelError(code, message, serializedAdditionalRawData: null); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs index 7d80fd5be0e9..a0e589cecd55 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersArmClient.cs @@ -34,6 +34,18 @@ private string GetApiVersionOrNull(ResourceType resourceType) return apiVersion; } + /// + /// 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 ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(ResourceIdentifier id) + { + ServiceFabricManagedApplicationResource.ValidateResourceId(id); + return new ServiceFabricManagedApplicationResource(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. @@ -58,18 +70,6 @@ public virtual ServiceFabricManagedApplicationTypeVersionResource GetServiceFabr return new ServiceFabricManagedApplicationTypeVersionResource(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 ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(ResourceIdentifier id) - { - ServiceFabricManagedApplicationResource.ValidateResourceId(id); - return new ServiceFabricManagedApplicationResource(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. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs index e77ca51e1c64..c1d7741186f2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersResourceGroupResource.cs @@ -49,11 +49,11 @@ public virtual ServiceFabricManagedClusterCollection GetServiceFabricManagedClus /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -80,11 +80,11 @@ public virtual async Task> GetServ /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs index 4695cc8855df..3b54801d38fa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersSubscriptionResource.cs @@ -18,12 +18,16 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableServiceFabricManagedClustersSubscriptionResource : ArmResource { - private ClientDiagnostics _serviceFabricManagedClusterManagedClustersClientDiagnostics; - private ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; private ClientDiagnostics _managedClusterVersionClientDiagnostics; private ManagedClusterVersionRestOperations _managedClusterVersionRestClient; private ClientDiagnostics _managedUnsupportedVmSizesClientDiagnostics; private ManagedUnsupportedVMSizesRestOperations _managedUnsupportedVmSizesRestClient; + private ClientDiagnostics _serviceFabricManagedClusterManagedClustersClientDiagnostics; + private ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; + private ClientDiagnostics _operationResultsClientDiagnostics; + private OperationResultsRestOperations _operationResultsRestClient; + private ClientDiagnostics _operationStatusClientDiagnostics; + private OperationStatusRestOperations _operationStatusRestClient; /// Initializes a new instance of the class for mocking. protected MockableServiceFabricManagedClustersSubscriptionResource() @@ -37,12 +41,16 @@ internal MockableServiceFabricManagedClustersSubscriptionResource(ArmClient clie { } - private ClientDiagnostics ServiceFabricManagedClusterManagedClustersClientDiagnostics => _serviceFabricManagedClusterManagedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedClusterResource.ResourceType.Namespace, Diagnostics); - private ManagedClustersRestOperations ServiceFabricManagedClusterManagedClustersRestClient => _serviceFabricManagedClusterManagedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceFabricManagedClusterResource.ResourceType)); private ClientDiagnostics ManagedClusterVersionClientDiagnostics => _managedClusterVersionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); private ManagedClusterVersionRestOperations ManagedClusterVersionRestClient => _managedClusterVersionRestClient ??= new ManagedClusterVersionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - private ClientDiagnostics managedUnsupportedVMSizesClientDiagnostics => _managedUnsupportedVmSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); - private ManagedUnsupportedVMSizesRestOperations managedUnsupportedVMSizesRestClient => _managedUnsupportedVmSizesRestClient ??= new ManagedUnsupportedVMSizesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ManagedUnsupportedVMSizesClientDiagnostics => _managedUnsupportedVmSizesClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ManagedUnsupportedVMSizesRestOperations ManagedUnsupportedVMSizesRestClient => _managedUnsupportedVmSizesRestClient ??= new ManagedUnsupportedVMSizesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ServiceFabricManagedClusterManagedClustersClientDiagnostics => _serviceFabricManagedClusterManagedClustersClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ServiceFabricManagedClusterResource.ResourceType.Namespace, Diagnostics); + private ManagedClustersRestOperations ServiceFabricManagedClusterManagedClustersRestClient => _serviceFabricManagedClusterManagedClustersRestClient ??= new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ServiceFabricManagedClusterResource.ResourceType)); + private ClientDiagnostics OperationResultsClientDiagnostics => _operationResultsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationResultsRestOperations OperationResultsRestClient => _operationResultsRestClient ??= new OperationResultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics OperationStatusClientDiagnostics => _operationStatusClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationStatusRestOperations OperationStatusRestClient => _operationStatusRestClient ??= new OperationStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -51,96 +59,180 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets information about an available Service Fabric managed cluster code version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> GetManagedClusterVersionAsync(string location, string clusterVersion, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); + + using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersion"); + scope.Start(); + try + { + var response = await ManagedClusterVersionRestClient.GetAsync(Id.SubscriptionId, location, clusterVersion, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets information about an available Service Fabric managed cluster code version. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// - /// Resource - /// + /// Operation Id + /// ManagedClusterVersion_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview /// /// /// + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetServiceFabricManagedClustersAsync(CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response GetManagedClusterVersion(string location, string clusterVersion, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); + + using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersion"); + scope.Start(); + try + { + var response = ManagedClusterVersionRestClient.Get(Id.SubscriptionId, location, clusterVersion, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets all available code versions for Service Fabric cluster resources by location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetManagedClusterVersionsAsync(string location, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + } + + /// + /// Gets all available code versions for Service Fabric cluster resources by location. + /// /// - /// Resource - /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// + /// + /// Operation Id + /// ManagedClusterVersion_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview /// /// /// + /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetServiceFabricManagedClusters(CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetManagedClusterVersions(string location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets information about an available Service Fabric cluster code version by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetManagedClusterVersionAsync(AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> GetManagedClusterVersionByEnvironmentAsync(string location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(location, nameof(location)); Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersion"); + using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionByEnvironment"); scope.Start(); try { - var response = await ManagedClusterVersionRestClient.GetAsync(Id.SubscriptionId, location, clusterVersion, cancellationToken).ConfigureAwait(false); + var response = await ManagedClusterVersionRestClient.GetManagedClusterVersionByEnvironmentAsync(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -151,36 +243,38 @@ public virtual async Task> GetManag } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets information about an available Service Fabric cluster code version by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetManagedClusterVersion(AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response GetManagedClusterVersionByEnvironment(string location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { + Argument.AssertNotNullOrEmpty(location, nameof(location)); Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersion"); + using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionByEnvironment"); scope.Start(); try { - var response = ManagedClusterVersionRestClient.Get(Id.SubscriptionId, location, clusterVersion, cancellationToken); + var response = ManagedClusterVersionRestClient.GetManagedClusterVersionByEnvironment(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken); return response; } catch (Exception e) @@ -191,37 +285,99 @@ public virtual Response GetManagedClusterVer } /// - /// Gets information about an available Service Fabric cluster code version by environment. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. + /// The operating system of the cluster. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetManagedClusterVersionByEnvironmentAsync(AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(string location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionByEnvironment"); + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + } + + /// + /// Gets all available code versions for Service Fabric cluster resources by environment. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// + /// + /// Operation Id + /// ManagedClusterVersion_ListByEnvironment + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetManagedClusterVersionsByEnvironment(string location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + } + + /// + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// + /// + /// Operation Id + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The location for the cluster code versions. This is different from cluster location. + /// VM Size name. + /// The cancellation token to use. + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> GetManagedUnsupportedVmSizeAsync(string location, string vmSize, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + + using var scope = ManagedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); scope.Start(); try { - var response = await ManagedClusterVersionRestClient.GetByEnvironmentAsync(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken).ConfigureAwait(false); + var response = await ManagedUnsupportedVMSizesRestClient.GetManagedUnsupportedVmSizeAsync(Id.SubscriptionId, location, vmSize, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -232,37 +388,37 @@ public virtual async Task> GetManag } /// - /// Gets information about an available Service Fabric cluster code version by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. + /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetManagedClusterVersionByEnvironment(AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response GetManagedUnsupportedVmSize(string location, string vmSize, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var scope = ManagedClusterVersionClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionByEnvironment"); + using var scope = ManagedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); scope.Start(); try { - var response = ManagedClusterVersionRestClient.GetByEnvironment(Id.SubscriptionId, location, environment, clusterVersion, cancellationToken); + var response = ManagedUnsupportedVMSizesRestClient.GetManagedUnsupportedVmSize(Id.SubscriptionId, location, vmSize, cancellationToken); return response; } catch (Exception e) @@ -273,196 +429,246 @@ public virtual Response GetManagedClusterVer } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedClusterVersionsAsync(AzureLocation location, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetManagedUnsupportedVmSizesAsync(string location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedClusterVersions(AzureLocation location, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetManagedUnsupportedVmSizes(string location, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListRequest(Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersions", "", null, cancellationToken); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + + HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesRequest(Id.SubscriptionId, location); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ManagedUnsupportedVMSizesRestClient.CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, Id.SubscriptionId, location); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), ManagedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetServiceFabricManagedClustersAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedClusterVersionsByEnvironment(AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetServiceFabricManagedClusters(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => ManagedClusterVersionRestClient.CreateListByEnvironmentRequest(Id.SubscriptionId, location, environment); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, null, e => ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(e), ManagedClusterVersionClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedClusterVersionsByEnvironment", "", null, cancellationToken); + HttpMessage FirstPageRequest(int? pageSizeHint) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => ServiceFabricManagedClusterManagedClustersRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new ServiceFabricManagedClusterResource(Client, ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(e)), ServiceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetServiceFabricManagedClusters", "value", "nextLink", cancellationToken); } /// - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// Get long running operation result. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// OperationResults_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// - /// The location for the cluster code versions. This is different from cluster location. + /// 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 name of the Azure region. + /// operation identifier. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetManagedUnsupportedVmSizesAsync(AzureLocation location, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task GetOperationResultAsync(WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => managedUnsupportedVMSizesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => managedUnsupportedVMSizesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), managedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = OperationResultsClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationResult"); + scope.Start(); + try + { + var response = await OperationResultsRestClient.GetAsync(Id.SubscriptionId, location, operationId, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(OperationResultsClientDiagnostics, Pipeline, OperationResultsRestClient.CreateGetRequest(Id.SubscriptionId, location, operationId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// Get long running operation result. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// OperationResults_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// - /// The location for the cluster code versions. This is different from cluster location. + /// 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 name of the Azure region. + /// operation identifier. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetManagedUnsupportedVmSizes(AzureLocation location, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual ArmOperation GetOperationResult(WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => managedUnsupportedVMSizesRestClient.CreateListRequest(Id.SubscriptionId, location); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => managedUnsupportedVMSizesRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, location); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(e), managedUnsupportedVMSizesClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSizes", "value", "nextLink", cancellationToken); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var scope = OperationResultsClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationResult"); + scope.Start(); + try + { + var response = OperationResultsRestClient.Get(Id.SubscriptionId, location, operationId, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(OperationResultsClientDiagnostics, Pipeline, OperationResultsRestClient.CreateGetRequest(Id.SubscriptionId, location, operationId).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Get long running operation status. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// OperationStatus_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. + /// The name of the Azure region. + /// operation identifier. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetManagedUnsupportedVmSizeAsync(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetOperationStatuAsync(AzureLocation location, string operationId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var scope = managedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + using var scope = OperationStatusClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationStatu"); scope.Start(); try { - var response = await managedUnsupportedVMSizesRestClient.GetAsync(Id.SubscriptionId, location, vmSize, cancellationToken).ConfigureAwait(false); + var response = await OperationStatusRestClient.GetAsync(Id.SubscriptionId, location, operationId, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -473,36 +679,36 @@ public virtual async Task> GetMa } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Get long running operation status. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// OperationStatus_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. + /// The name of the Azure region. + /// operation identifier. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response GetManagedUnsupportedVmSize(AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response GetOperationStatu(AzureLocation location, string operationId, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); - using var scope = managedUnsupportedVMSizesClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetManagedUnsupportedVmSize"); + using var scope = OperationStatusClientDiagnostics.CreateScope("MockableServiceFabricManagedClustersSubscriptionResource.GetOperationStatu"); scope.Start(); try { - var response = managedUnsupportedVMSizesRestClient.Get(Id.SubscriptionId, location, vmSize, cancellationToken); + var response = OperationStatusRestClient.Get(Id.SubscriptionId, location, operationId, cancellationToken); return response; } catch (Exception e) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersTenantResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersTenantResource.cs new file mode 100644 index 000000000000..7bc177363baf --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/MockableServiceFabricManagedClustersTenantResource.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Threading; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Mocking +{ + /// A class to add extension methods to TenantResource. + public partial class MockableServiceFabricManagedClustersTenantResource : ArmResource + { + private ClientDiagnostics _operationsClientDiagnostics; + private OperationsRestOperations _operationsRestClient; + + /// Initializes a new instance of the class for mocking. + protected MockableServiceFabricManagedClustersTenantResource() + { + } + + /// 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 MockableServiceFabricManagedClustersTenantResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + } + + private ClientDiagnostics OperationsClientDiagnostics => _operationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private OperationsRestOperations OperationsRestClient => _operationsRestClient ??= new OperationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + + private string GetApiVersionOrNull(ResourceType resourceType) + { + TryGetApiVersion(resourceType, out string apiVersion); + return apiVersion; + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetOperationsAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest(); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => OperationResult.DeserializeOperationResult(e), OperationsClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersTenantResource.GetOperations", "value", "nextLink", cancellationToken); + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetOperations(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => OperationsRestClient.CreateListRequest(); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => OperationsRestClient.CreateListNextPageRequest(nextLink); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => OperationResult.DeserializeOperationResult(e), OperationsClientDiagnostics, Pipeline, "MockableServiceFabricManagedClustersTenantResource.GetOperations", "value", "nextLink", cancellationToken); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs index b1d39a7ef13d..09898af6d981 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Extensions/ServiceFabricManagedClustersExtensions.cs @@ -33,61 +33,66 @@ private static MockableServiceFabricManagedClustersSubscriptionResource GetMocka return resource.GetCachedClient(client => new MockableServiceFabricManagedClustersSubscriptionResource(client, resource.Id)); } + private static MockableServiceFabricManagedClustersTenantResource GetMockableServiceFabricManagedClustersTenantResource(ArmResource resource) + { + return resource.GetCachedClient(client => new MockableServiceFabricManagedClustersTenantResource(client, resource.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. + /// 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. + /// 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 ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationResource(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. + /// 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. + /// 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 ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationTypeResource GetServiceFabricManagedApplicationTypeResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeVersionResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeResource(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. + /// 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. + /// 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 ServiceFabricManagedApplicationResource GetServiceFabricManagedApplicationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ServiceFabricManagedApplicationTypeVersionResource GetServiceFabricManagedApplicationTypeVersionResource(this ArmClient client, ResourceIdentifier id) { Argument.AssertNotNull(client, nameof(client)); - return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationResource(id); + return GetMockableServiceFabricManagedClustersArmClient(client).GetServiceFabricManagedApplicationTypeVersionResource(id); } /// @@ -173,11 +178,11 @@ public static ServiceFabricManagedClusterCollection GetServiceFabricManagedClust /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -211,11 +216,11 @@ public static async Task> GetServi /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -241,143 +246,139 @@ public static Response GetServiceFabricMana } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets information about an available Service Fabric managed cluster code version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_Get /// /// /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetServiceFabricManagedClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> GetManagedClusterVersionAsync(this SubscriptionResource subscriptionResource, string location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClustersAsync(cancellationToken); + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionAsync(location, clusterVersion, cancellationToken).ConfigureAwait(false); } /// - /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. + /// Gets information about an available Service Fabric managed cluster code version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} /// /// /// Operation Id - /// ManagedClusters_ListBySubscription + /// ManagedClusterVersion_Get /// /// /// Default Api Version - /// 2024-09-01-preview - /// - /// - /// Resource - /// + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. + /// The location for the cluster code versions. This is different from cluster location. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetServiceFabricManagedClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// , or is null. + public static Response GetManagedClusterVersion(this SubscriptionResource subscriptionResource, string location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClusters(cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersion(location, clusterVersion, cancellationToken); } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets all available code versions for Service Fabric cluster resources by location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetManagedClusterVersionAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetManagedClusterVersionsAsync(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionAsync(location, clusterVersion, cancellationToken).ConfigureAwait(false); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsAsync(location, cancellationToken); } /// - /// Gets information about an available Service Fabric managed cluster code version. + /// Gets all available code versions for Service Fabric cluster resources by location. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_Get + /// ManagedClusterVersion_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetManagedClusterVersion(this SubscriptionResource subscriptionResource, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// is an empty string, and was expected to be non-empty. + /// or is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetManagedClusterVersions(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersion(location, clusterVersion, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersions(location, cancellationToken); } /// @@ -389,26 +390,26 @@ public static Response GetManagedClusterVers /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetManagedClusterVersionByEnvironmentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> GetManagedClusterVersionByEnvironmentAsync(this SubscriptionResource subscriptionResource, string location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -424,26 +425,26 @@ public static async Task> GetManage /// /// /// Operation Id - /// ManagedClusterVersion_GetByEnvironment + /// ManagedClusterVersion_GetManagedClusterVersionByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cluster code version. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetManagedClusterVersionByEnvironment(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// , or is null. + public static Response GetManagedClusterVersionByEnvironment(this SubscriptionResource subscriptionResource, string location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -451,137 +452,141 @@ public static Response GetManagedClusterVers } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// or is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedClusterVersionsAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(this SubscriptionResource subscriptionResource, string location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsAsync(location, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironmentAsync(location, environment, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by location. + /// Gets all available code versions for Service Fabric cluster resources by environment. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions /// /// /// Operation Id - /// ManagedClusterVersion_List + /// ManagedClusterVersion_ListByEnvironment /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. /// The cancellation token to use. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// or is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedClusterVersions(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static Pageable GetManagedClusterVersionsByEnvironment(this SubscriptionResource subscriptionResource, string location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersions(location, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironment(location, environment, cancellationToken); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedClusterVersionsByEnvironmentAsync(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> GetManagedUnsupportedVmSizeAsync(this SubscriptionResource subscriptionResource, string location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironmentAsync(location, environment, cancellationToken); + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSizeAsync(location, vmSize, cancellationToken).ConfigureAwait(false); } /// - /// Gets all available code versions for Service Fabric cluster resources by environment. + /// Get unsupported vm size for Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} /// /// /// Operation Id - /// ManagedClusterVersion_ListByEnvironment + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSize /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedClusterVersionsByEnvironment(this SubscriptionResource subscriptionResource, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// or is an empty string, and was expected to be non-empty. + /// , or is null. + public static Response GetManagedUnsupportedVmSize(this SubscriptionResource subscriptionResource, string location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedClusterVersionsByEnvironment(location, environment, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSize(location, vmSize, cancellationToken); } /// @@ -593,24 +598,25 @@ public static Pageable GetManagedClusterVers /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// or is null. /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetManagedUnsupportedVmSizesAsync(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static AsyncPageable GetManagedUnsupportedVmSizesAsync(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -626,24 +632,25 @@ public static AsyncPageable GetManagedUns /// /// /// Operation Id - /// managedUnsupportedVMSizes_List + /// ManagedUnsupportedVMSizes_GetManagedUnsupportedVmSizes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// or is null. /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetManagedUnsupportedVmSizes(this SubscriptionResource subscriptionResource, AzureLocation location, CancellationToken cancellationToken = default) + public static Pageable GetManagedUnsupportedVmSizes(this SubscriptionResource subscriptionResource, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); @@ -651,71 +658,277 @@ public static Pageable GetManagedUnsuppor } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static async Task> GetManagedUnsupportedVmSizeAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetServiceFabricManagedClustersAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSizeAsync(location, vmSize, cancellationToken).ConfigureAwait(false); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClustersAsync(cancellationToken); } /// - /// Get unsupported vm size for Service Fabric Managed Clusters. + /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters /// /// /// Operation Id - /// managedUnsupportedVMSizes_Get + /// ManagedCluster_ListBySubscription /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// Mocking - /// To mock this method, please mock instead. + /// To mock this method, please mock instead. /// /// /// The instance the method will execute against. - /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public static Response GetManagedUnsupportedVmSize(this SubscriptionResource subscriptionResource, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetServiceFabricManagedClusters(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetManagedUnsupportedVmSize(location, vmSize, cancellationToken); + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetServiceFabricManagedClusters(cancellationToken); + } + + /// + /// Get long running operation result. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// 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 name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task GetOperationResultAsync(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationResultAsync(waitUntil, location, operationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get long running operation result. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperationResults/{operationId} + /// + /// + /// Operation Id + /// OperationResults_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// 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 name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static ArmOperation GetOperationResult(this SubscriptionResource subscriptionResource, WaitUntil waitUntil, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationResult(waitUntil, location, operationId, cancellationToken); + } + + /// + /// Get long running operation status. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} + /// + /// + /// Operation Id + /// OperationStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static async Task> GetOperationStatuAsync(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationStatuAsync(location, operationId, cancellationToken).ConfigureAwait(false); + } + + /// + /// Get long running operation status. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterOperations/{operationId} + /// + /// + /// Operation Id + /// OperationStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The name of the Azure region. + /// operation identifier. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public static Response GetOperationStatu(this SubscriptionResource subscriptionResource, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableServiceFabricManagedClustersSubscriptionResource(subscriptionResource).GetOperationStatu(location, operationId, cancellationToken); + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetOperationsAsync(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableServiceFabricManagedClustersTenantResource(tenantResource).GetOperationsAsync(cancellationToken); + } + + /// + /// Get the list of available Service Fabric resource provider API operations. + /// + /// + /// Request Path + /// /providers/Microsoft.ServiceFabric/operations + /// + /// + /// Operation Id + /// Operations_List + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The cancellation token to use. + /// is null. + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetOperations(this TenantResource tenantResource, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableServiceFabricManagedClustersTenantResource(tenantResource).GetOperations(cancellationToken); } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs new file mode 100644 index 000000000000..e9a9751cd1f7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/LongRunningOperation/FaultSimulationOperationSource.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.ResourceManager.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal class FaultSimulationOperationSource : IOperationSource + { + FaultSimulation IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + return FaultSimulation.DeserializeFaultSimulation(document.RootElement); + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs index 0b0ba5080f67..88e8a494d8e7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. public partial class ApplicationHealthPolicy { /// @@ -55,7 +52,6 @@ public partial class ApplicationHealthPolicy /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// public ApplicationHealthPolicy(bool considerWarningAsError, int maxPercentUnhealthyDeployedApplications) { @@ -71,7 +67,6 @@ public ApplicationHealthPolicy(bool considerWarningAsError, int maxPercentUnheal /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// /// The health policy used by default to evaluate the health of a service type. /// The map with service type health policy per service type name. The map is empty by default. @@ -97,7 +92,6 @@ internal ApplicationHealthPolicy() /// The percentage represents the maximum tolerated percentage of deployed applications that can be unhealthy before the application is considered in error. /// This is calculated by dividing the number of unhealthy deployed applications over the number of nodes where the application is currently deployed on in the cluster. /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. - /// /// public int MaxPercentUnhealthyDeployedApplications { get; set; } /// The health policy used by default to evaluate the health of a service type. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs index 655f55ee7893..1b0653d34a35 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ApplicationResourceList DeserializeApplicationResourceList(JsonE return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ApplicationResourceList DeserializeApplicationResourceList(JsonE } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ApplicationResourceList DeserializeApplicationResourceList(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs index c2006414888b..d6bf1805149c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationResourceList() + /// The ApplicationResource items on this page. + /// is null. + internal ApplicationResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application list results if there are any. + /// The ApplicationResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationResourceList() + { + } + + /// The ApplicationResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs index 861f1e47e934..b2c297d7cdde 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationTypeResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ApplicationTypeResourceList DeserializeApplicationTypeResourceLi return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ApplicationTypeResourceList DeserializeApplicationTypeResourceLi } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ApplicationTypeResourceList DeserializeApplicationTypeResourceLi } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationTypeResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationTypeResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs index 8bb6ce5c8b54..ef7788b40987 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationTypeResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationTypeResourceList() + /// The ApplicationTypeResource items on this page. + /// is null. + internal ApplicationTypeResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application type list results if there are any. + /// The ApplicationTypeResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationTypeResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationTypeResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationTypeResourceList() + { + } + + /// The ApplicationTypeResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application type list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs index 67ab31aa2c37..cfe83a266252 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ApplicationTypeVersionResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ApplicationTypeVersionResourceList DeserializeApplicationTypeVer return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ApplicationTypeVersionResourceList DeserializeApplicationTypeVer } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ApplicationTypeVersionResourceList DeserializeApplicationTypeVer } } serializedAdditionalRawData = rawDataDictionary; - return new ApplicationTypeVersionResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ApplicationTypeVersionResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs index 8202979ab56e..000a5599ff4c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationTypeVersionResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ApplicationTypeVersionResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ApplicationTypeVersionResourceList() + /// The ApplicationTypeVersionResource items on this page. + /// is null. + internal ApplicationTypeVersionResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of application type version list results if there are any. + /// The ApplicationTypeVersionResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ApplicationTypeVersionResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ApplicationTypeVersionResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ApplicationTypeVersionResourceList() + { + } + + /// The ApplicationTypeVersionResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of application type version list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs index 224264e1cde7..0be771cf9a52 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUpgradePolicy.cs @@ -51,15 +51,12 @@ public ApplicationUpgradePolicy() } /// Initializes a new instance of . - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. /// If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). /// The policy used for monitoring the application upgrade. /// Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to drain gracefully. This would be effective when the instance is closing during the application/cluster upgrade, only for those instances which have a non-zero delay duration configured in the service description. /// The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. - /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds. /// Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. /// Keeps track of any properties unknown to the library. internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolicy, bool? forceRestart, RollingUpgradeMonitoringPolicy rollingUpgradeMonitoringPolicy, long? instanceCloseDelayDurationInSeconds, RollingUpgradeMode? upgradeMode, long? upgradeReplicaSetCheckTimeout, bool? recreateApplication, IDictionary serializedAdditionalRawData) @@ -74,10 +71,7 @@ internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolic _serializedAdditionalRawData = serializedAdditionalRawData; } - /// - /// Defines a health policy used to evaluate the health of an application or one of its children entities. - /// - /// + /// Defines a health policy used to evaluate the health of an application or one of its children entities. public ApplicationHealthPolicy ApplicationHealthPolicy { get; set; } /// If true, then processes are forcefully restarted during upgrade even when the code version has not changed (the upgrade only changes configuration or data). public bool? ForceRestart { get; set; } @@ -87,7 +81,7 @@ internal ApplicationUpgradePolicy(ApplicationHealthPolicy applicationHealthPolic public long? InstanceCloseDelayDurationInSeconds { get; set; } /// The mode used to monitor health during a rolling upgrade. The values are Monitored, and UnmonitoredAuto. public RollingUpgradeMode? UpgradeMode { get; set; } - /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). + /// The maximum amount of time to block processing of an upgrade domain and prevent loss of availability when there are unexpected issues. When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). Unit is in seconds. public long? UpgradeReplicaSetCheckTimeout { get; set; } /// Determines whether the application should be recreated on update. If value=true, the rest of the upgrade policy parameters are not allowed. public bool? RecreateApplication { get; set; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs index 66efeff0ee53..ad605312f365 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ApplicationUserAssignedIdentityInfo.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// The ApplicationUserAssignedIdentityInfo. + /// User assigned identity for the application. public partial class ApplicationUserAssignedIdentityInfo { /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs index 93ff5fa58442..6da34132f1cb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AutoGeneratedDomainNameLabelScope.cs @@ -12,10 +12,9 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { /// /// This enum is the entrypoint to using a certificate from a public CA for your cluster. This property was introduced to solve the - /// domain squatting problem with new domains. A domain name will be generated in the following format: <clustername>.<hash>.<regionname>.<sfmcdomain>. + /// domain squatting problem with new domains. A domain name will be generated in the following format: {clustername}.{hash}.{regionname}.sfmcdomain. /// The hash portion comes from Azure DNS' Deterministic Name Library. The library creates a hash using the cluster's Tenant, Subscription, Resource Group /// and Resource Name using the AutoGeneratedDomainNameLabelScope/reuse policy chosen. - /// /// public readonly partial struct AutoGeneratedDomainNameLabelScope : IEquatable { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.Serialization.cs new file mode 100644 index 000000000000..6acc629cdaa4 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.Serialization.cs @@ -0,0 +1,162 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class AvailableOperationDisplay : 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(AvailableOperationDisplay)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Provider)) + { + writer.WritePropertyName("provider"u8); + writer.WriteStringValue(Provider); + } + if (Optional.IsDefined(Resource)) + { + writer.WritePropertyName("resource"u8); + writer.WriteStringValue(Resource); + } + if (Optional.IsDefined(Operation)) + { + writer.WritePropertyName("operation"u8); + writer.WriteStringValue(Operation); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + 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 + } + } + } + + AvailableOperationDisplay 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(AvailableOperationDisplay)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAvailableOperationDisplay(document.RootElement, options); + } + + internal static AvailableOperationDisplay DeserializeAvailableOperationDisplay(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string provider = default; + string resource = default; + string operation = default; + string description = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provider"u8)) + { + provider = property.Value.GetString(); + continue; + } + if (property.NameEquals("resource"u8)) + { + resource = property.Value.GetString(); + continue; + } + if (property.NameEquals("operation"u8)) + { + operation = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new AvailableOperationDisplay(provider, resource, operation, description, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(AvailableOperationDisplay)} does not support writing '{options.Format}' format."); + } + } + + AvailableOperationDisplay 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 DeserializeAvailableOperationDisplay(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AvailableOperationDisplay)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.cs new file mode 100644 index 000000000000..90c30a8bf761 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AvailableOperationDisplay.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Operation supported by the Service Fabric resource provider. + public partial class AvailableOperationDisplay + { + /// + /// 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 . + internal AvailableOperationDisplay() + { + } + + /// Initializes a new instance of . + /// The name of the provider. + /// The resource on which the operation is performed. + /// The operation that can be performed. + /// Operation description. + /// Keeps track of any properties unknown to the library. + internal AvailableOperationDisplay(string provider, string resource, string operation, string description, IDictionary serializedAdditionalRawData) + { + Provider = provider; + Resource = resource; + Operation = operation; + Description = description; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the provider. + public string Provider { get; } + /// The resource on which the operation is performed. + public string Resource { get; } + /// The operation that can be performed. + public string Operation { get; } + /// Operation description. + public string Description { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs index ba10a58b2cff..304e1f04a944 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AveragePartitionLoadScalingTrigger.cs @@ -32,7 +32,7 @@ public AveragePartitionLoadScalingTrigger(string metricName, double lowerLoadThr } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// The name of the metric for which usage should be tracked. /// The lower limit of the load below which a scale in operation should be performed. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs index 65fc29202c26..7c55a5ab6347 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/AverageServiceLoadScalingTrigger.cs @@ -34,7 +34,7 @@ public AverageServiceLoadScalingTrigger(string metricName, double lowerLoadThres } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// The name of the metric for which usage should be tracked. /// The lower limit of the load below which a scale in operation should be performed. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.Serialization.cs new file mode 100644 index 000000000000..32c32dc7f87d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.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.ServiceFabricManagedClusters.Models +{ + public partial class ErrorModelError : 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(ErrorModelError)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Code)) + { + writer.WritePropertyName("code"u8); + writer.WriteStringValue(Code); + } + if (Optional.IsDefined(Message)) + { + writer.WritePropertyName("message"u8); + writer.WriteStringValue(Message); + } + 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 + } + } + } + + ErrorModelError 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(ErrorModelError)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeErrorModelError(document.RootElement, options); + } + + internal static ErrorModelError DeserializeErrorModelError(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string code = default; + string message = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("code"u8)) + { + code = property.Value.GetString(); + continue; + } + if (property.NameEquals("message"u8)) + { + message = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ErrorModelError(code, message, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ErrorModelError)} does not support writing '{options.Format}' format."); + } + } + + ErrorModelError 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 DeserializeErrorModelError(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ErrorModelError)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.cs new file mode 100644 index 000000000000..3d62abcb027d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ErrorModelError.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.ServiceFabricManagedClusters.Models +{ + /// The error details. + public partial class ErrorModelError + { + /// + /// 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 . + internal ErrorModelError() + { + } + + /// Initializes a new instance of . + /// The error code. + /// The error message. + /// Keeps track of any properties unknown to the library. + internal ErrorModelError(string code, string message, IDictionary serializedAdditionalRawData) + { + Code = code; + Message = message; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The error code. + public string Code { get; } + /// The error message. + public string Message { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.cs new file mode 100644 index 000000000000..8e0c1fa700ea --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultKind.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.ServiceFabricManagedClusters.Models +{ + /// The kind of fault simulation. + internal readonly partial struct FaultKind : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FaultKind(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string ZoneValue = "Zone"; + + /// Simulates an availability zone down. + public static FaultKind Zone { get; } = new FaultKind(ZoneValue); + /// Determines if two values are the same. + public static bool operator ==(FaultKind left, FaultKind right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FaultKind left, FaultKind right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FaultKind(string value) => new FaultKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultKind other && Equals(other); + /// + public bool Equals(FaultKind 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs new file mode 100644 index 000000000000..6cad3e18cca2 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.Serialization.cs @@ -0,0 +1,195 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulation : 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(FaultSimulation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(SimulationId)) + { + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(Details)) + { + writer.WritePropertyName("details"u8); + writer.WriteObjectValue(Details, 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 + } + } + } + + FaultSimulation 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(FaultSimulation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulation(document.RootElement, options); + } + + internal static FaultSimulation DeserializeFaultSimulation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + FaultSimulationStatus? status = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + FaultSimulationDetails details = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("simulationId"u8)) + { + simulationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("details"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + details = FaultSimulationDetails.DeserializeFaultSimulationDetails(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulation( + simulationId, + status, + startTime, + endTime, + details, + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulation 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 DeserializeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.cs new file mode 100644 index 000000000000..306e4bffee85 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulation.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.ServiceFabricManagedClusters.Models +{ + /// Fault simulation object with status. + public partial class FaultSimulation + { + /// + /// 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 . + internal FaultSimulation() + { + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Fault simulation status. + /// The start time of the fault simulation. + /// The end time of the fault simulation. + /// Fault simulation details. + /// Keeps track of any properties unknown to the library. + internal FaultSimulation(string simulationId, FaultSimulationStatus? status, DateTimeOffset? startOn, DateTimeOffset? endOn, FaultSimulationDetails details, IDictionary serializedAdditionalRawData) + { + SimulationId = simulationId; + Status = status; + StartOn = startOn; + EndOn = endOn; + Details = details; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + /// The start time of the fault simulation. + public DateTimeOffset? StartOn { get; } + /// The end time of the fault simulation. + public DateTimeOffset? EndOn { get; } + /// Fault simulation details. + public FaultSimulationDetails Details { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.Serialization.cs new file mode 100644 index 000000000000..fc9c933734f0 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.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.ServiceFabricManagedClusters.Models +{ + internal partial class FaultSimulationConstraints : 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(FaultSimulationConstraints)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ExpireOn)) + { + writer.WritePropertyName("expirationTime"u8); + writer.WriteStringValue(ExpireOn.Value, "O"); + } + 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 + } + } + } + + FaultSimulationConstraints 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(FaultSimulationConstraints)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationConstraints(document.RootElement, options); + } + + internal static FaultSimulationConstraints DeserializeFaultSimulationConstraints(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DateTimeOffset? expirationTime = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("expirationTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + expirationTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationConstraints(expirationTime, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationConstraints 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 DeserializeFaultSimulationConstraints(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationConstraints)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.cs new file mode 100644 index 000000000000..56887869e7f1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationConstraints.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.ServiceFabricManagedClusters.Models +{ + /// Constraints for Fault Simulation action. + internal partial class FaultSimulationConstraints + { + /// + /// 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 FaultSimulationConstraints() + { + } + + /// Initializes a new instance of . + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationConstraints(DateTimeOffset? expireOn, IDictionary serializedAdditionalRawData) + { + ExpireOn = expireOn; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ExpireOn { get; set; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..085ce810fc4e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.Serialization.cs @@ -0,0 +1,127 @@ +// 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.ServiceFabricManagedClusters.Models +{ + [PersistableModelProxy(typeof(UnknownFaultSimulationContent))] + public partial class FaultSimulationContent : 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(FaultSimulationContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("faultKind"u8); + writer.WriteStringValue(FaultKind.ToString()); + if (Optional.IsDefined(Force)) + { + writer.WritePropertyName("force"u8); + writer.WriteBooleanValue(Force.Value); + } + if (Optional.IsDefined(Constraints)) + { + writer.WritePropertyName("constraints"u8); + writer.WriteObjectValue(Constraints, 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 + } + } + } + + FaultSimulationContent 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(FaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + internal static FaultSimulationContent DeserializeFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("faultKind", out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Zone": return ZoneFaultSimulationContent.DeserializeZoneFaultSimulationContent(element, options); + } + } + return UnknownFaultSimulationContent.DeserializeUnknownFaultSimulationContent(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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContent 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 DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.cs new file mode 100644 index 000000000000..089885f7f6cc --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContent.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.ServiceFabricManagedClusters.Models +{ + /// + /// Parameters for Fault Simulation action. + /// 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 FaultSimulationContent + { + /// + /// 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 FaultSimulationContent() + { + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContent(FaultKind faultKind, bool? force, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData) + { + FaultKind = faultKind; + Force = force; + Constraints = constraints; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The kind of fault to be simulated. + internal FaultKind FaultKind { get; set; } + /// Force the action to go through without any check on the cluster. + public bool? Force { get; set; } + /// Constraints for Fault Simulation action. + internal FaultSimulationConstraints Constraints { get; set; } + /// The absolute expiration timestamp (UTC) after which this fault simulation should be stopped if it's still active. + public DateTimeOffset? ConstraintsExpireOn + { + get => Constraints is null ? default : Constraints.ExpireOn; + set + { + if (Constraints is null) + Constraints = new FaultSimulationConstraints(); + Constraints.ExpireOn = value; + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.Serialization.cs new file mode 100644 index 000000000000..64867d7a466d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationContentWrapper : 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(FaultSimulationContentWrapper)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, 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 + } + } + } + + FaultSimulationContentWrapper 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(FaultSimulationContentWrapper)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + + internal static FaultSimulationContentWrapper DeserializeFaultSimulationContentWrapper(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultSimulationContent parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("parameters"u8)) + { + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationContentWrapper(parameters, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContentWrapper 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 DeserializeFaultSimulationContentWrapper(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContentWrapper)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.cs new file mode 100644 index 000000000000..a5a61e9492fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationContentWrapper.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.ServiceFabricManagedClusters.Models +{ + /// Fault Simulation Request for Start action. + public partial class FaultSimulationContentWrapper + { + /// + /// 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 . + /// + /// Parameters for Fault Simulation start action. + /// 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 . + /// + /// is null. + public FaultSimulationContentWrapper(FaultSimulationContent parameters) + { + Argument.AssertNotNull(parameters, nameof(parameters)); + + Parameters = parameters; + } + + /// Initializes a new instance of . + /// + /// Parameters for Fault Simulation start action. + /// 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 . + /// + /// Keeps track of any properties unknown to the library. + internal FaultSimulationContentWrapper(FaultSimulationContent parameters, IDictionary serializedAdditionalRawData) + { + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationContentWrapper() + { + } + + /// + /// Parameters for Fault Simulation start action. + /// 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 FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs new file mode 100644 index 000000000000..ed09aa08239f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.Serialization.cs @@ -0,0 +1,180 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationDetails : 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(FaultSimulationDetails)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(ClusterId)) + { + writer.WritePropertyName("clusterId"u8); + writer.WriteStringValue(ClusterId); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsCollectionDefined(NodeTypeFaultSimulation)) + { + writer.WritePropertyName("nodeTypeFaultSimulation"u8); + writer.WriteStartArray(); + foreach (var item in NodeTypeFaultSimulation) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(Parameters)) + { + writer.WritePropertyName("parameters"u8); + writer.WriteObjectValue(Parameters, 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 + } + } + } + + FaultSimulationDetails 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(FaultSimulationDetails)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationDetails(document.RootElement, options); + } + + internal static FaultSimulationDetails DeserializeFaultSimulationDetails(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string clusterId = default; + string operationId = default; + IReadOnlyList nodeTypeFaultSimulation = default; + FaultSimulationContent parameters = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("clusterId"u8)) + { + clusterId = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("nodeTypeFaultSimulation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(Models.NodeTypeFaultSimulation.DeserializeNodeTypeFaultSimulation(item, options)); + } + nodeTypeFaultSimulation = array; + continue; + } + if (property.NameEquals("parameters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parameters = FaultSimulationContent.DeserializeFaultSimulationContent(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationDetails(clusterId, operationId, nodeTypeFaultSimulation ?? new ChangeTrackingList(), parameters, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationDetails 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 DeserializeFaultSimulationDetails(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationDetails)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.cs new file mode 100644 index 000000000000..cabc8681c0a7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationDetails.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.ServiceFabricManagedClusters.Models +{ + /// Details for Fault Simulation. + public partial class FaultSimulationDetails + { + /// + /// 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 . + internal FaultSimulationDetails() + { + NodeTypeFaultSimulation = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// unique identifier for the cluster resource. + /// unique identifier for the operation associated with the fault simulation. + /// List of node type simulations associated with the cluster fault simulation. + /// + /// Fault simulation parameters. + /// 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 . + /// + /// Keeps track of any properties unknown to the library. + internal FaultSimulationDetails(string clusterId, string operationId, IReadOnlyList nodeTypeFaultSimulation, FaultSimulationContent parameters, IDictionary serializedAdditionalRawData) + { + ClusterId = clusterId; + OperationId = operationId; + NodeTypeFaultSimulation = nodeTypeFaultSimulation; + Parameters = parameters; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// unique identifier for the cluster resource. + public string ClusterId { get; } + /// unique identifier for the operation associated with the fault simulation. + public string OperationId { get; } + /// List of node type simulations associated with the cluster fault simulation. + public IReadOnlyList NodeTypeFaultSimulation { get; } + /// + /// Fault simulation parameters. + /// 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 FaultSimulationContent Parameters { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.Serialization.cs new file mode 100644 index 000000000000..53ea9e2c953e --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.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.ServiceFabricManagedClusters.Models +{ + public partial class FaultSimulationIdContent : 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(FaultSimulationIdContent)} does not support writing '{format}' format."); + } + + writer.WritePropertyName("simulationId"u8); + writer.WriteStringValue(SimulationId); + 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 + } + } + } + + FaultSimulationIdContent 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(FaultSimulationIdContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationIdContent(document.RootElement, options); + } + + internal static FaultSimulationIdContent DeserializeFaultSimulationIdContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string simulationId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("simulationId"u8)) + { + simulationId = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new FaultSimulationIdContent(simulationId, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationIdContent 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 DeserializeFaultSimulationIdContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationIdContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.cs new file mode 100644 index 000000000000..561082d66c8b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationIdContent.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.ServiceFabricManagedClusters.Models +{ + /// Parameters for Fault Simulation id. + public partial class FaultSimulationIdContent + { + /// + /// 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 . + /// unique identifier for the fault simulation. + /// is null. + public FaultSimulationIdContent(string simulationId) + { + Argument.AssertNotNull(simulationId, nameof(simulationId)); + + SimulationId = simulationId; + } + + /// Initializes a new instance of . + /// unique identifier for the fault simulation. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationIdContent(string simulationId, IDictionary serializedAdditionalRawData) + { + SimulationId = simulationId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationIdContent() + { + } + + /// unique identifier for the fault simulation. + public string SimulationId { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.Serialization.cs new file mode 100644 index 000000000000..3195b7ff047a --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.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.ServiceFabricManagedClusters.Models +{ + internal partial class FaultSimulationListResult : 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(FaultSimulationListResult)} 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 + } + } + } + + FaultSimulationListResult 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(FaultSimulationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationListResult(document.RootElement, options); + } + + internal static FaultSimulationListResult DeserializeFaultSimulationListResult(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(FaultSimulation.DeserializeFaultSimulation(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 FaultSimulationListResult(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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationListResult 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 DeserializeFaultSimulationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.cs new file mode 100644 index 000000000000..f086a5d95071 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationListResult.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.ServiceFabricManagedClusters.Models +{ + /// Fault simulation list results. + internal partial class FaultSimulationListResult + { + /// + /// 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 FaultSimulation items on this page. + /// is null. + internal FaultSimulationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The FaultSimulation items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal FaultSimulationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal FaultSimulationListResult() + { + } + + /// The FaultSimulation items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.cs new file mode 100644 index 000000000000..e5ab863f8fd3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/FaultSimulationStatus.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.ServiceFabricManagedClusters.Models +{ + /// Fault simulation status. + public readonly partial struct FaultSimulationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public FaultSimulationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string StartingValue = "Starting"; + private const string ActiveValue = "Active"; + private const string StoppingValue = "Stopping"; + private const string DoneValue = "Done"; + private const string StartFailedValue = "StartFailed"; + private const string StopFailedValue = "StopFailed"; + + /// Indicates the fault simulation is starting. The simulation will have this status while the start operation is in progress. + public static FaultSimulationStatus Starting { get; } = new FaultSimulationStatus(StartingValue); + /// Indicates the fault simulation is active. The simulation will have this status after the start operation has completed successfully. + public static FaultSimulationStatus Active { get; } = new FaultSimulationStatus(ActiveValue); + /// Indicates the fault simulation is stopping. The simulation will have this status while the stop operation is in progress. + public static FaultSimulationStatus Stopping { get; } = new FaultSimulationStatus(StoppingValue); + /// Indicates the fault simulation is done. The simulation will have this status after the stop operation has completed successfully. + public static FaultSimulationStatus Done { get; } = new FaultSimulationStatus(DoneValue); + /// Indicates the fault simulation has failed on start. The simulation will have this status after the start operation fails. + public static FaultSimulationStatus StartFailed { get; } = new FaultSimulationStatus(StartFailedValue); + /// Indicates the fault simulation has failed on stop. The simulation will have this status after the stop operation fails. + public static FaultSimulationStatus StopFailed { get; } = new FaultSimulationStatus(StopFailedValue); + /// Determines if two values are the same. + public static bool operator ==(FaultSimulationStatus left, FaultSimulationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(FaultSimulationStatus left, FaultSimulationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator FaultSimulationStatus(string value) => new FaultSimulationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is FaultSimulationStatus other && Equals(other); + /// + public bool Equals(FaultSimulationStatus 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.Serialization.cs new file mode 100644 index 000000000000..1b1778c9b500 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.Serialization.cs @@ -0,0 +1,207 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class LongRunningOperationResult : 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(LongRunningOperationResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(StartOn)) + { + writer.WritePropertyName("startTime"u8); + writer.WriteStringValue(StartOn.Value, "O"); + } + if (Optional.IsDefined(EndOn)) + { + writer.WritePropertyName("endTime"u8); + writer.WriteStringValue(EndOn.Value, "O"); + } + if (Optional.IsDefined(PercentComplete)) + { + writer.WritePropertyName("percentComplete"u8); + writer.WriteNumberValue(PercentComplete.Value); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + } + if (Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, 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 + } + } + } + + LongRunningOperationResult 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(LongRunningOperationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLongRunningOperationResult(document.RootElement, options); + } + + internal static LongRunningOperationResult DeserializeLongRunningOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + DateTimeOffset? startTime = default; + DateTimeOffset? endTime = default; + double? percentComplete = default; + string status = default; + ErrorModelError error = 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("startTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + startTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("endTime"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = property.Value.GetDateTimeOffset("O"); + continue; + } + if (property.NameEquals("percentComplete"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + percentComplete = property.Value.GetDouble(); + continue; + } + if (property.NameEquals("status"u8)) + { + status = property.Value.GetString(); + continue; + } + if (property.NameEquals("error"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = ErrorModelError.DeserializeErrorModelError(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LongRunningOperationResult( + name, + startTime, + endTime, + percentComplete, + status, + error, + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(LongRunningOperationResult)} does not support writing '{options.Format}' format."); + } + } + + LongRunningOperationResult 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 DeserializeLongRunningOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LongRunningOperationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.cs new file mode 100644 index 000000000000..3a6f132168f8 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/LongRunningOperationResult.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.ServiceFabricManagedClusters.Models +{ + /// Long running operation result. + public partial class LongRunningOperationResult + { + /// + /// 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 . + internal LongRunningOperationResult() + { + } + + /// Initializes a new instance of . + /// The name of the operation. + /// The start time of the operation. + /// The end time of the operation. + /// The completion percentage of the operation. + /// The status of the operation. + /// The operation error. + /// Keeps track of any properties unknown to the library. + internal LongRunningOperationResult(string name, DateTimeOffset? startOn, DateTimeOffset? endOn, double? percentComplete, string status, ErrorModelError error, IDictionary serializedAdditionalRawData) + { + Name = name; + StartOn = startOn; + EndOn = endOn; + PercentComplete = percentComplete; + Status = status; + Error = error; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the operation. + public string Name { get; } + /// The start time of the operation. + public DateTimeOffset? StartOn { get; } + /// The end time of the operation. + public DateTimeOffset? EndOn { get; } + /// The completion percentage of the operation. + public double? PercentComplete { get; } + /// The status of the operation. + public string Status { get; } + /// The operation error. + public ErrorModelError Error { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs index 7e0d38b2fa94..bf7b937651d3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.Serialization.cs @@ -39,14 +39,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Thumbprint)) { writer.WritePropertyName("thumbprint"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Thumbprint); -#else - using (JsonDocument document = JsonDocument.Parse(Thumbprint, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(Thumbprint); } if (Optional.IsDefined(CommonName)) { @@ -56,14 +49,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(IssuerThumbprint)) { writer.WritePropertyName("issuerThumbprint"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(IssuerThumbprint); -#else - using (JsonDocument document = JsonDocument.Parse(IssuerThumbprint, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(IssuerThumbprint); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -103,9 +89,9 @@ internal static ManagedClusterClientCertificate DeserializeManagedClusterClientC return null; } bool isAdmin = default; - BinaryData thumbprint = default; + string thumbprint = default; string commonName = default; - BinaryData issuerThumbprint = default; + string issuerThumbprint = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,11 +103,7 @@ internal static ManagedClusterClientCertificate DeserializeManagedClusterClientC } if (property.NameEquals("thumbprint"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - thumbprint = BinaryData.FromString(property.Value.GetRawText()); + thumbprint = property.Value.GetString(); continue; } if (property.NameEquals("commonName"u8)) @@ -131,11 +113,7 @@ internal static ManagedClusterClientCertificate DeserializeManagedClusterClientC } if (property.NameEquals("issuerThumbprint"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - issuerThumbprint = BinaryData.FromString(property.Value.GetRawText()); + issuerThumbprint = property.Value.GetString(); continue; } if (options.Format != "W") diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.cs index e0e70c5efc45..1ca08a438202 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterClientCertificate.cs @@ -58,7 +58,7 @@ public ManagedClusterClientCertificate(bool isAdmin) /// Certificate common name. /// Issuer thumbprint for the certificate. Only used together with CommonName. /// Keeps track of any properties unknown to the library. - internal ManagedClusterClientCertificate(bool isAdmin, BinaryData thumbprint, string commonName, BinaryData issuerThumbprint, IDictionary serializedAdditionalRawData) + internal ManagedClusterClientCertificate(bool isAdmin, string thumbprint, string commonName, string issuerThumbprint, IDictionary serializedAdditionalRawData) { IsAdmin = isAdmin; Thumbprint = thumbprint; @@ -74,69 +74,11 @@ internal ManagedClusterClientCertificate() /// Indicates if the client certificate has admin access to the cluster. Non admin clients can perform only read only operations on the cluster. public bool IsAdmin { get; set; } - /// - /// Certificate thumbprint. - /// - /// To assign an object to 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 BinaryData Thumbprint { get; set; } + /// Certificate thumbprint. + public string Thumbprint { get; set; } /// Certificate common name. public string CommonName { get; set; } - /// - /// Issuer thumbprint for the certificate. Only used together with CommonName. - /// - /// To assign an object to 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 BinaryData IssuerThumbprint { get; set; } + /// Issuer thumbprint for the certificate. Only used together with CommonName. + public string IssuerThumbprint { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs index 1b1be8162594..b00a0fcb43b7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Defines a health policy used to evaluate the health of the cluster or of a cluster node. - /// - /// + /// Defines a health policy used to evaluate the health of the cluster or of a cluster node. public partial class ManagedClusterHealthPolicy { /// @@ -58,7 +55,6 @@ public partial class ManagedClusterHealthPolicy /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// /// /// The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. @@ -67,7 +63,6 @@ public partial class ManagedClusterHealthPolicy /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUnhealthyApplications) { @@ -85,7 +80,6 @@ public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUn /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// /// /// The maximum allowed percentage of unhealthy applications before reporting an error. For example, to allow 10% of applications to be unhealthy, this value would be 10. @@ -94,7 +88,6 @@ public ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterHealthPolicy(int maxPercentUnhealthyNodes, int maxPercentUnhealthyApplications, IDictionary serializedAdditionalRawData) @@ -118,7 +111,6 @@ internal ManagedClusterHealthPolicy() /// The computation rounds up to tolerate one failure on small numbers of nodes. Default percentage is zero. /// /// In large clusters, some nodes will always be down or out for repairs, so this percentage should be configured to tolerate that. - /// /// public int MaxPercentUnhealthyNodes { get; set; } /// @@ -128,7 +120,6 @@ internal ManagedClusterHealthPolicy() /// If the percentage is respected but there is at least one unhealthy application, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy applications over the total number of application instances in the cluster, excluding applications of application types that are included in the ApplicationTypeHealthPolicyMap. /// The computation rounds up to tolerate one failure on small numbers of applications. Default percentage is zero. - /// /// public int MaxPercentUnhealthyApplications { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs index 3f70fbbc9495..1ed68951f899 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedClusterListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ManagedClusterListResult DeserializeManagedClusterListResult(Jso } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedClusterListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedClusterListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs index d5dcf33c771a..d6bf08df3ab3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Managed Cluster list results. + /// The response of a ManagedCluster list operation. internal partial class ManagedClusterListResult { /// @@ -46,25 +47,34 @@ internal partial class ManagedClusterListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedClusterListResult() + /// The ManagedCluster items on this page. + /// is null. + internal ManagedClusterListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// The URL to use for getting the next set of results. + /// The ManagedCluster items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedClusterListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedClusterListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ManagedClusterListResult() + { + } + + /// The ManagedCluster items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs index 51171890e958..e97fabee20af 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalanceProbeProtocol.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// the reference to the load balancer probe used by the load balancing rule. + /// The reference to the load balancer probe used by the load balancing rule. public readonly partial struct ManagedClusterLoadBalanceProbeProtocol : IEquatable { private readonly string _value; @@ -26,11 +26,11 @@ public ManagedClusterLoadBalanceProbeProtocol(string value) private const string HttpValue = "http"; private const string HttpsValue = "https"; - /// tcp. + /// Probe protocol is TCP. public static ManagedClusterLoadBalanceProbeProtocol Tcp { get; } = new ManagedClusterLoadBalanceProbeProtocol(TcpValue); - /// http. + /// Probe protocol is HTTP. public static ManagedClusterLoadBalanceProbeProtocol Http { get; } = new ManagedClusterLoadBalanceProbeProtocol(HttpValue); - /// https. + /// Probe protocol is HTTPS. public static ManagedClusterLoadBalanceProbeProtocol Https { get; } = new ManagedClusterLoadBalanceProbeProtocol(HttpsValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterLoadBalanceProbeProtocol left, ManagedClusterLoadBalanceProbeProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs index 9ab3a0a1a5c4..52219d84fbff 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterLoadBalancingRuleTransportProtocol.cs @@ -25,9 +25,9 @@ public ManagedClusterLoadBalancingRuleTransportProtocol(string value) private const string TcpValue = "tcp"; private const string UdpValue = "udp"; - /// tcp. + /// Transport protocol is TCP. public static ManagedClusterLoadBalancingRuleTransportProtocol Tcp { get; } = new ManagedClusterLoadBalancingRuleTransportProtocol(TcpValue); - /// udp. + /// Transport protocol is UDP. public static ManagedClusterLoadBalancingRuleTransportProtocol Udp { get; } = new ManagedClusterLoadBalancingRuleTransportProtocol(UdpValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterLoadBalancingRuleTransportProtocol left, ManagedClusterLoadBalancingRuleTransportProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs index 7281c411fc89..4259fcde89ff 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.Serialization.cs @@ -35,9 +35,9 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("healthCheckWaitDuration"u8); - writer.WriteStringValue(HealthCheckWaitDuration, "c"); + writer.WriteStringValue(HealthCheckWaitDuration); writer.WritePropertyName("healthCheckStableDuration"u8); - writer.WriteStringValue(HealthCheckStableDuration, "c"); + writer.WriteStringValue(HealthCheckStableDuration); writer.WritePropertyName("healthCheckRetryTimeout"u8); writer.WriteStringValue(HealthCheckRetryTimeout); writer.WritePropertyName("upgradeTimeout"u8); @@ -81,8 +81,8 @@ internal static ManagedClusterMonitoringPolicy DeserializeManagedClusterMonitori { return null; } - TimeSpan healthCheckWaitDuration = default; - TimeSpan healthCheckStableDuration = default; + string healthCheckWaitDuration = default; + string healthCheckStableDuration = default; string healthCheckRetryTimeout = default; string upgradeTimeout = default; string upgradeDomainTimeout = default; @@ -92,12 +92,12 @@ internal static ManagedClusterMonitoringPolicy DeserializeManagedClusterMonitori { if (property.NameEquals("healthCheckWaitDuration"u8)) { - healthCheckWaitDuration = property.Value.GetTimeSpan("c"); + healthCheckWaitDuration = property.Value.GetString(); continue; } if (property.NameEquals("healthCheckStableDuration"u8)) { - healthCheckStableDuration = property.Value.GetTimeSpan("c"); + healthCheckStableDuration = property.Value.GetString(); continue; } if (property.NameEquals("healthCheckRetryTimeout"u8)) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.cs index 6f552152840f..5a95fc072601 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterMonitoringPolicy.cs @@ -51,9 +51,11 @@ public partial class ManagedClusterMonitoringPolicy /// The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. - /// , or is null. - public ManagedClusterMonitoringPolicy(TimeSpan healthCheckWaitDuration, TimeSpan healthCheckStableDuration, string healthCheckRetryTimeout, string upgradeTimeout, string upgradeDomainTimeout) + /// , , , or is null. + public ManagedClusterMonitoringPolicy(string healthCheckWaitDuration, string healthCheckStableDuration, string healthCheckRetryTimeout, string upgradeTimeout, string upgradeDomainTimeout) { + Argument.AssertNotNull(healthCheckWaitDuration, nameof(healthCheckWaitDuration)); + Argument.AssertNotNull(healthCheckStableDuration, nameof(healthCheckStableDuration)); Argument.AssertNotNull(healthCheckRetryTimeout, nameof(healthCheckRetryTimeout)); Argument.AssertNotNull(upgradeTimeout, nameof(upgradeTimeout)); Argument.AssertNotNull(upgradeDomainTimeout, nameof(upgradeDomainTimeout)); @@ -72,7 +74,7 @@ public ManagedClusterMonitoringPolicy(TimeSpan healthCheckWaitDuration, TimeSpan /// The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// The amount of time each upgrade domain has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// Keeps track of any properties unknown to the library. - internal ManagedClusterMonitoringPolicy(TimeSpan healthCheckWaitDuration, TimeSpan healthCheckStableDuration, string healthCheckRetryTimeout, string upgradeTimeout, string upgradeDomainTimeout, IDictionary serializedAdditionalRawData) + internal ManagedClusterMonitoringPolicy(string healthCheckWaitDuration, string healthCheckStableDuration, string healthCheckRetryTimeout, string upgradeTimeout, string upgradeDomainTimeout, IDictionary serializedAdditionalRawData) { HealthCheckWaitDuration = healthCheckWaitDuration; HealthCheckStableDuration = healthCheckStableDuration; @@ -88,9 +90,9 @@ internal ManagedClusterMonitoringPolicy() } /// The length of time to wait after completing an upgrade domain before performing health checks. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. - public TimeSpan HealthCheckWaitDuration { get; set; } + public string HealthCheckWaitDuration { get; set; } /// The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. The duration can be in either hh:mm:ss or in d.hh:mm:ss.ms format. - public TimeSpan HealthCheckStableDuration { get; set; } + public string HealthCheckStableDuration { get; set; } /// The amount of time to retry health evaluation when the application or cluster is unhealthy before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. public string HealthCheckRetryTimeout { get; set; } /// The amount of time the overall upgrade has to complete before the upgrade rolls back. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs index 876ac135676a..3aee5d295b18 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.Serialization.cs @@ -36,11 +36,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("service"u8); writer.WriteStringValue(Service); - if (Optional.IsCollectionDefined(Locations)) + if (Optional.IsCollectionDefined(AzureLocation)) { writer.WritePropertyName("locations"u8); writer.WriteStartArray(); - foreach (var item in Locations) + foreach (var item in AzureLocation) { writer.WriteStringValue(item); } @@ -84,7 +84,7 @@ internal static ManagedClusterServiceEndpoint DeserializeManagedClusterServiceEn return null; } string service = default; - IList locations = default; + IList locations = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -100,10 +100,10 @@ internal static ManagedClusterServiceEndpoint DeserializeManagedClusterServiceEn { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(new AzureLocation(item.GetString())); + array.Add(item.GetString()); } locations = array; continue; @@ -114,7 +114,7 @@ internal static ManagedClusterServiceEndpoint DeserializeManagedClusterServiceEn } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedClusterServiceEndpoint(service, locations ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new ManagedClusterServiceEndpoint(service, locations ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.cs index a7e52110f36b..a3ee1b0126b5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterServiceEndpoint.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -54,17 +53,17 @@ public ManagedClusterServiceEndpoint(string service) Argument.AssertNotNull(service, nameof(service)); Service = service; - Locations = new ChangeTrackingList(); + AzureLocation = new ChangeTrackingList(); } /// Initializes a new instance of . /// The type of the endpoint service. - /// A list of locations. + /// A list of locations. /// Keeps track of any properties unknown to the library. - internal ManagedClusterServiceEndpoint(string service, IList locations, IDictionary serializedAdditionalRawData) + internal ManagedClusterServiceEndpoint(string service, IList azureLocation, IDictionary serializedAdditionalRawData) { Service = service; - Locations = locations; + AzureLocation = azureLocation; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,6 +75,6 @@ internal ManagedClusterServiceEndpoint() /// The type of the endpoint service. public string Service { get; set; } /// A list of locations. - public IList Locations { get; } + public IList AzureLocation { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs index d9da2da95863..b733f5528d1f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnet.Serialization.cs @@ -136,7 +136,7 @@ internal static ManagedClusterSubnet DeserializeManagedClusterSubnet(JsonElement } if (property.NameEquals("networkSecurityGroupId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs index 523bc27925b4..45ad368f6a98 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateEndpointNetworkPoliciesState.cs @@ -25,9 +25,9 @@ public ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(string value) private const string EnabledValue = "enabled"; private const string DisabledValue = "disabled"; - /// enabled. + /// Enable apply network policies on private end point in the subnet. public static ManagedClusterSubnetPrivateEndpointNetworkPoliciesState Enabled { get; } = new ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(EnabledValue); - /// disabled. + /// Disable apply network policies on private end point in the subnet. public static ManagedClusterSubnetPrivateEndpointNetworkPoliciesState Disabled { get; } = new ManagedClusterSubnetPrivateEndpointNetworkPoliciesState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterSubnetPrivateEndpointNetworkPoliciesState left, ManagedClusterSubnetPrivateEndpointNetworkPoliciesState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs index 42bdf2410c11..b119ff8d404d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState.cs @@ -25,9 +25,9 @@ public ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(string value) private const string EnabledValue = "enabled"; private const string DisabledValue = "disabled"; - /// enabled. + /// Enable apply network policies on private link service in the subnet. public static ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState Enabled { get; } = new ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(EnabledValue); - /// disabled. + /// Disable apply network policies on private link service in the subnet. public static ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState Disabled { get; } = new ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState(DisabledValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState left, ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs index dd6d220ba1db..4badc04fcada 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeDeltaHealthPolicy.cs @@ -50,7 +50,6 @@ public partial class ManagedClusterUpgradeDeltaHealthPolicy /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// public ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes) { @@ -62,20 +61,17 @@ public ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes) /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// /// /// The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. - /// /// /// /// The maximum allowed percentage of applications health degradation allowed during cluster upgrades. /// The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. /// NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterUpgradeDeltaHealthPolicy(int maxPercentDeltaUnhealthyNodes, int? maxPercentUpgradeDomainDeltaUnhealthyNodes, int? maxPercentDeltaUnhealthyApplications, IDictionary serializedAdditionalRawData) @@ -95,14 +91,12 @@ internal ManagedClusterUpgradeDeltaHealthPolicy() /// The maximum allowed percentage of nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the nodes at the beginning of upgrade and the state of the nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. - /// /// public int MaxPercentDeltaUnhealthyNodes { get; set; } /// /// The maximum allowed percentage of upgrade domain nodes health degradation allowed during cluster upgrades. /// The delta is measured between the state of the upgrade domain nodes at the beginning of upgrade and the state of the upgrade domain nodes at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion for all completed upgrade domains to make sure the state of the upgrade domains is within tolerated limits. - /// /// public int? MaxPercentUpgradeDomainDeltaUnhealthyNodes { get; set; } /// @@ -110,7 +104,6 @@ internal ManagedClusterUpgradeDeltaHealthPolicy() /// The delta is measured between the state of the applications at the beginning of upgrade and the state of the applications at the time of the health evaluation. /// The check is performed after every upgrade domain upgrade completion to make sure the global state of the cluster is within tolerated limits. System services are not included in this. /// NOTE: This value will overwrite the value specified in properties.UpgradeDescription.HealthPolicy.MaxPercentUnhealthyApplications - /// /// public int? MaxPercentDeltaUnhealthyApplications { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs index 61b64b828fac..1defa7a18438 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradeMode.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. public readonly partial struct ManagedClusterUpgradeMode : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs index b81f3679e867..f0485b8f0682 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterUpgradePolicy.cs @@ -60,7 +60,6 @@ public ManagedClusterUpgradePolicy() /// When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. /// The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) - /// /// /// Keeps track of any properties unknown to the library. internal ManagedClusterUpgradePolicy(bool? forceRestart, ManagedClusterHealthPolicy healthPolicy, ManagedClusterUpgradeDeltaHealthPolicy deltaHealthPolicy, ManagedClusterMonitoringPolicy monitoringPolicy, string upgradeReplicaSetCheckTimeout, IDictionary serializedAdditionalRawData) @@ -86,7 +85,6 @@ internal ManagedClusterUpgradePolicy(bool? forceRestart, ManagedClusterHealthPol /// When this timeout expires, processing of the upgrade domain will proceed regardless of availability loss issues. /// The timeout is reset at the start of each upgrade domain. The timeout can be in either hh:mm:ss or in d.hh:mm:ss.ms format. /// This value must be between 00:00:00 and 49710.06:28:15 (unsigned 32 bit integer for seconds) - /// /// public string UpgradeReplicaSetCheckTimeout { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs index e53367088cb0..57533e1b624b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedClusterVersionEnvironment.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// The ManagedClusterVersionEnvironment. + /// The operating system of the cluster. The default means all. public readonly partial struct ManagedClusterVersionEnvironment : IEquatable { private readonly string _value; @@ -24,7 +24,7 @@ public ManagedClusterVersionEnvironment(string value) private const string WindowsValue = "Windows"; - /// Windows. + /// Indicates os is Windows. public static ManagedClusterVersionEnvironment Windows { get; } = new ManagedClusterVersionEnvironment(WindowsValue); /// Determines if two values are the same. public static bool operator ==(ManagedClusterVersionEnvironment left, ManagedClusterVersionEnvironment right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs index db0836884bdb..70e5be804d66 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - [PersistableModelProxy(typeof(UnknownPartition))] + [PersistableModelProxy(typeof(UnknownManagedServicePartitionScheme))] public partial class ManagedServicePartitionScheme : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -82,7 +82,7 @@ internal static ManagedServicePartitionScheme DeserializeManagedServicePartition case "UniformInt64Range": return UniformInt64RangePartitionScheme.DeserializeUniformInt64RangePartitionScheme(element, options); } } - return UnknownPartition.DeserializeUnknownPartition(element, options); + return UnknownManagedServicePartitionScheme.DeserializeUnknownManagedServicePartitionScheme(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs index 167903cc1116..990b8c2bd087 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePartitionScheme.cs @@ -55,7 +55,7 @@ protected ManagedServicePartitionScheme() } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal ManagedServicePartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServicePartitionScheme(PartitionScheme partitionScheme, IDiction _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies how the service is partitioned. + /// Gets or sets the partition scheme. internal PartitionScheme PartitionScheme { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs index 4b13ee0115f7..0c7049451de2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - [PersistableModelProxy(typeof(UnknownServicePlacementPolicy))] + [PersistableModelProxy(typeof(UnknownManagedServicePlacementPolicy))] public partial class ManagedServicePlacementPolicy : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("type"u8); - writer.WriteStringValue(ServicePlacementPolicyType.ToString()); + writer.WriteStringValue(Type.ToString()); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,7 +84,7 @@ internal static ManagedServicePlacementPolicy DeserializeManagedServicePlacement case "RequiredDomainDistribution": return ServicePlacementRequireDomainDistributionPolicy.DeserializeServicePlacementRequireDomainDistributionPolicy(element, options); } } - return UnknownServicePlacementPolicy.DeserializeUnknownServicePlacementPolicy(element, options); + return UnknownManagedServicePlacementPolicy.DeserializeUnknownManagedServicePlacementPolicy(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs index 3686a80b13d4..1f66610be8b6 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServicePlacementPolicy.cs @@ -55,15 +55,15 @@ protected ManagedServicePlacementPolicy() } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal ManagedServicePlacementPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) + internal ManagedServicePlacementPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of placement policy for a service fabric service. Following are the possible values. - internal ServicePlacementPolicyType ServicePlacementPolicyType { get; set; } + /// Gets or sets the type. + internal ServicePlacementPolicyType Type { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs index 516cce220525..387aa47784f4 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.Serialization.cs @@ -12,6 +12,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { + [PersistableModelProxy(typeof(UnknownManagedServiceProperties))] public partial class ManagedServiceProperties : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -85,7 +86,7 @@ internal static ManagedServiceProperties DeserializeManagedServiceProperties(Jso case "Stateless": return StatelessServiceProperties.DeserializeStatelessServiceProperties(element, options); } } - return UnknownServiceResourceProperties.DeserializeUnknownServiceResourceProperties(element, options); + return UnknownManagedServiceProperties.DeserializeUnknownManagedServiceProperties(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs index 0731e7984a01..a8100bf0395c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceProperties.cs @@ -15,7 +15,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// 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 partial class ManagedServiceProperties : ManagedServiceBaseProperties + public abstract partial class ManagedServiceProperties : ManagedServiceBaseProperties { /// Initializes a new instance of . /// The name of the service type. @@ -25,7 +25,7 @@ public partial class ManagedServiceProperties : ManagedServiceBaseProperties /// The available derived classes include , and . /// /// or is null. - public ManagedServiceProperties(string serviceTypeName, ManagedServicePartitionScheme partitionDescription) + protected ManagedServiceProperties(string serviceTypeName, ManagedServicePartitionScheme partitionDescription) { Argument.AssertNotNull(serviceTypeName, nameof(serviceTypeName)); Argument.AssertNotNull(partitionDescription, nameof(partitionDescription)); @@ -59,7 +59,6 @@ public ManagedServiceProperties(string serviceTypeName, ManagedServicePartitionS /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// internal ManagedServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData) { @@ -94,7 +93,6 @@ internal ManagedServiceProperties() /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// public string ServiceDnsName { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs index a8a2e97cf6f1..7fc6ab6754f8 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - [PersistableModelProxy(typeof(UnknownScalingMechanism))] + [PersistableModelProxy(typeof(UnknownManagedServiceScalingMechanism))] public partial class ManagedServiceScalingMechanism : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -81,7 +81,7 @@ internal static ManagedServiceScalingMechanism DeserializeManagedServiceScalingM case "ScalePartitionInstanceCount": return PartitionInstanceCountScalingMechanism.DeserializePartitionInstanceCountScalingMechanism(element, options); } } - return UnknownScalingMechanism.DeserializeUnknownScalingMechanism(element, options); + return UnknownManagedServiceScalingMechanism.DeserializeUnknownManagedServiceScalingMechanism(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs index 5c341af17b14..90149da6c175 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingMechanism.cs @@ -55,7 +55,7 @@ protected ManagedServiceScalingMechanism() } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal ManagedServiceScalingMechanism(ServiceScalingMechanismKind kind, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServiceScalingMechanism(ServiceScalingMechanismKind kind, IDicti _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the mechanism associated with this scaling policy. + /// Gets or sets the kind. internal ServiceScalingMechanismKind Kind { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs index d567da2a50c4..0f7b79d99ad4 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - [PersistableModelProxy(typeof(UnknownScalingTrigger))] + [PersistableModelProxy(typeof(UnknownManagedServiceScalingTrigger))] public partial class ManagedServiceScalingTrigger : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -81,7 +81,7 @@ internal static ManagedServiceScalingTrigger DeserializeManagedServiceScalingTri case "AverageServiceLoadTrigger": return AverageServiceLoadScalingTrigger.DeserializeAverageServiceLoadScalingTrigger(element, options); } } - return UnknownScalingTrigger.DeserializeUnknownScalingTrigger(element, options); + return UnknownManagedServiceScalingTrigger.DeserializeUnknownManagedServiceScalingTrigger(element, options); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs index f71540f773bb..9842d2a487ad 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedServiceScalingTrigger.cs @@ -55,7 +55,7 @@ protected ManagedServiceScalingTrigger() } /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. internal ManagedServiceScalingTrigger(ServiceScalingTriggerKind kind, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal ManagedServiceScalingTrigger(ServiceScalingTriggerKind kind, IDictionar _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Specifies the trigger associated with this scaling policy. + /// Gets or sets the kind. internal ServiceScalingTriggerKind Kind { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs index 85ebbda055e0..e74de50546a0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ManagedVmSizesResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ManagedVmSizesResult DeserializeManagedVmSizesResult(JsonElement return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ManagedVmSizesResult DeserializeManagedVmSizesResult(JsonElement } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ManagedVmSizesResult DeserializeManagedVmSizesResult(JsonElement } } serializedAdditionalRawData = rawDataDictionary; - return new ManagedVmSizesResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ManagedVmSizesResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs index fc122ae20208..56698751577c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ManagedVmSizesResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ManagedVmSizesResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ManagedVmSizesResult() + /// The ManagedVMSize items on this page. + /// is null. + internal ManagedVmSizesResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// List of Managed VM Sizes for Service Fabric Managed Clusters. - /// URL to get the next set of Managed VM Sizes if there are any. + /// The ManagedVMSize items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ManagedVmSizesResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ManagedVmSizesResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// List of Managed VM Sizes for Service Fabric Managed Clusters. + /// Initializes a new instance of for deserialization. + internal ManagedVmSizesResult() + { + } + + /// The ManagedVMSize items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of Managed VM Sizes if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs index bf4c12644bce..05e0a2e9f806 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionAddOrRemoveScalingMechanism.cs @@ -26,7 +26,7 @@ public NamedPartitionAddOrRemoveScalingMechanism(int minPartitionCount, int maxP } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// Minimum number of named partitions of the service. /// Maximum number of named partitions of the service. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs index 6f9a855375bd..35bd1d7f33c1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NamedPartitionScheme.cs @@ -26,7 +26,7 @@ public NamedPartitionScheme(IEnumerable names) } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. /// Array for the names of the partitions. internal NamedPartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData, IList names) : base(partitionScheme, serializedAdditionalRawData) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs index 87d5a05613fa..04504dc621ce 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeAvailableSku.cs @@ -52,7 +52,7 @@ internal NodeTypeAvailableSku() } /// Initializes a new instance of . - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. /// The supported SKU for a for node type. /// Provides information about how the node count can be scaled. /// Keeps track of any properties unknown to the library. @@ -64,7 +64,7 @@ internal NodeTypeAvailableSku(ResourceType? resourceType, NodeTypeSupportedSku s _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The type of resource the sku applies to. <br /><br />Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. + /// The type of resource the sku applies to. Value: Microsoft.ServiceFabric/managedClusters/nodeTypes. public ResourceType? ResourceType { get; } /// The supported SKU for a for node type. public NodeTypeSupportedSku Sku { get; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs new file mode 100644 index 000000000000..1ca63568c204 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.Serialization.cs @@ -0,0 +1,170 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class NodeTypeFaultSimulation : 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(NodeTypeFaultSimulation)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(NodeTypeName)) + { + writer.WritePropertyName("nodeTypeName"u8); + writer.WriteStringValue(NodeTypeName); + } + if (Optional.IsDefined(Status)) + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.Value.ToString()); + } + if (Optional.IsDefined(OperationId)) + { + writer.WritePropertyName("operationId"u8); + writer.WriteStringValue(OperationId); + } + if (Optional.IsDefined(OperationStatus)) + { + writer.WritePropertyName("operationStatus"u8); + writer.WriteStringValue(OperationStatus.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 + } + } + } + + NodeTypeFaultSimulation 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(NodeTypeFaultSimulation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + + internal static NodeTypeFaultSimulation DeserializeNodeTypeFaultSimulation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string nodeTypeName = default; + FaultSimulationStatus? status = default; + string operationId = default; + SfmcOperationStatus? operationStatus = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("nodeTypeName"u8)) + { + nodeTypeName = property.Value.GetString(); + continue; + } + if (property.NameEquals("status"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + status = new FaultSimulationStatus(property.Value.GetString()); + continue; + } + if (property.NameEquals("operationId"u8)) + { + operationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("operationStatus"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + operationStatus = new SfmcOperationStatus(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NodeTypeFaultSimulation(nodeTypeName, status, operationId, operationStatus, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support writing '{options.Format}' format."); + } + } + + NodeTypeFaultSimulation 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 DeserializeNodeTypeFaultSimulation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NodeTypeFaultSimulation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs new file mode 100644 index 000000000000..f35030c3aaea --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFaultSimulation.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Node type fault simulation object with status. + public partial class NodeTypeFaultSimulation + { + /// + /// 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 . + internal NodeTypeFaultSimulation() + { + } + + /// Initializes a new instance of . + /// Node type name. + /// Fault simulation status. + /// Current or latest asynchronous operation identifier on the node type. + /// Current or latest asynchronous operation status on the node type. + /// Keeps track of any properties unknown to the library. + internal NodeTypeFaultSimulation(string nodeTypeName, FaultSimulationStatus? status, string operationId, SfmcOperationStatus? operationStatus, IDictionary serializedAdditionalRawData) + { + NodeTypeName = nodeTypeName; + Status = status; + OperationId = operationId; + OperationStatus = operationStatus; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Node type name. + public string NodeTypeName { get; } + /// Fault simulation status. + public FaultSimulationStatus? Status { get; } + /// Current or latest asynchronous operation identifier on the node type. + public string OperationId { get; } + /// Current or latest asynchronous operation status on the node type. + public SfmcOperationStatus? OperationStatus { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs index 98c10a514de6..39f0769b4399 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.Serialization.cs @@ -110,7 +110,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("loadBalancerBackendAddressPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -119,7 +119,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("loadBalancerInboundNatPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -128,7 +128,7 @@ internal static NodeTypeFrontendConfiguration DeserializeNodeTypeFrontendConfigu } if (property.NameEquals("applicationGatewayBackendAddressPoolId"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + if (property.Value.ValueKind == JsonValueKind.Null) { continue; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs index 6ea1a340bb4b..c623a8a34b99 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfiguration.cs @@ -53,9 +53,9 @@ public NodeTypeFrontendConfiguration() /// Initializes a new instance of . /// The IP address type of this frontend configuration. If omitted the default value is IPv4. - /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. - /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. - /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. + /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. + /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. /// Keeps track of any properties unknown to the library. internal NodeTypeFrontendConfiguration(NodeTypeFrontendConfigurationIPAddressType? ipAddressType, ResourceIdentifier loadBalancerBackendAddressPoolId, ResourceIdentifier loadBalancerInboundNatPoolId, ResourceIdentifier applicationGatewayBackendAddressPoolId, IDictionary serializedAdditionalRawData) { @@ -68,11 +68,11 @@ internal NodeTypeFrontendConfiguration(NodeTypeFrontendConfigurationIPAddressTyp /// The IP address type of this frontend configuration. If omitted the default value is IPv4. public NodeTypeFrontendConfigurationIPAddressType? IPAddressType { get; set; } - /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of the Load Balancer backend address pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'. public ResourceIdentifier LoadBalancerBackendAddressPoolId { get; set; } - /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/loadBalancers/<loadBalancerName>/inboundNatPools/<inboundNatPoolName>'. + /// The resource Id of the Load Balancer inbound NAT pool that the VM instances of the node type are associated with. The format of the resource Id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatPools/{inboundNatPoolName}'. public ResourceIdentifier LoadBalancerInboundNatPoolId { get; set; } - /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/<resourceGroupName>/providers/Microsoft.Network/applicationGateways/<applicationGatewayName>/backendAddressPools/<backendAddressPoolName>'. + /// The resource Id of application gateway backend address pool. The format of the resource Id is '/subscriptions/<subscriptionId>/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendAddressPools/{backendAddressPoolName}'. public ResourceIdentifier ApplicationGatewayBackendAddressPoolId { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs index 484c040b77be..d391ebfc2928 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeFrontendConfigurationIPAddressType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The IP address type. - /// - /// + /// The IP address type. public readonly partial struct NodeTypeFrontendConfigurationIPAddressType : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs index fc21606b2248..08295564100d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NodeTypeListResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static NodeTypeListResult DeserializeNodeTypeListResult(JsonElement ele return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static NodeTypeListResult DeserializeNodeTypeListResult(JsonElement ele } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static NodeTypeListResult DeserializeNodeTypeListResult(JsonElement ele } } serializedAdditionalRawData = rawDataDictionary; - return new NodeTypeListResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new NodeTypeListResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs index 2d0765b4533a..8fedc17515d3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListResult.cs @@ -7,10 +7,11 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Node type list results. + /// The response of a NodeType list operation. internal partial class NodeTypeListResult { /// @@ -46,25 +47,34 @@ internal partial class NodeTypeListResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NodeTypeListResult() + /// The NodeType items on this page. + /// is null. + internal NodeTypeListResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The list of node types. - /// The URL to use for getting the next set of results. + /// The NodeType items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NodeTypeListResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal NodeTypeListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of node types. + /// Initializes a new instance of for deserialization. + internal NodeTypeListResult() + { + } + + /// The NodeType items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs index c6567ec03aa8..2ba597e0f78e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(NodeTypeListSkuResult)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } + writer.WriteEndArray(); if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(JsonEleme return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(JsonEleme } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static NodeTypeListSkuResult DeserializeNodeTypeListSkuResult(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new NodeTypeListSkuResult(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new NodeTypeListSkuResult(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs index 8eadedc19e8b..4040137bb30d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeListSkuResult.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class NodeTypeListSkuResult private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal NodeTypeListSkuResult() + /// The NodeTypeAvailableSku items on this page. + /// is null. + internal NodeTypeListSkuResult(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// The list of available node type SKUs. - /// The URL to use for getting the next set of results. + /// The NodeTypeAvailableSku items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal NodeTypeListSkuResult(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal NodeTypeListSkuResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The list of available node type SKUs. + /// Initializes a new instance of for deserialization. + internal NodeTypeListSkuResult() + { + } + + /// The NodeTypeAvailableSku items on this page. public IReadOnlyList Value { get; } - /// The URL to use for getting the next set of results. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs index 3f968c3092db..f65d70bf429d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSku.cs @@ -46,16 +46,16 @@ public partial class NodeTypeSku private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. public NodeTypeSku(int capacity) { Capacity = capacity; } /// Initializes a new instance of . - /// The sku name. <br /><br />Name is internally generated and is used in auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br /> To avoid deployment errors please omit the property. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. + /// Specifies the tier of the node type. Possible Values: **Standard**. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. /// Keeps track of any properties unknown to the library. internal NodeTypeSku(string name, string tier, int capacity, IDictionary serializedAdditionalRawData) { @@ -70,11 +70,11 @@ internal NodeTypeSku() { } - /// The sku name. <br /><br />Name is internally generated and is used in auto-scale scenarios.<br /> Property does not allow to be changed to other values than generated.<br /> To avoid deployment errors please omit the property. + /// The sku name. Name is internally generated and is used in auto-scale scenarios. Property does not allow to be changed to other values than generated. To avoid deployment errors please omit the property. public string Name { get; set; } - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. public string Tier { get; set; } - /// The number of nodes in the node type.<br /><br />If present in request it will override properties.vmInstanceCount. + /// The number of nodes in the node type. If present in request it will override properties.vmInstanceCount. public int Capacity { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs index 206c80fe8cfc..a68f9fb73b77 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSkuScaleType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Node type capacity scale type. - /// - /// + /// Node type capacity scale type. public readonly partial struct NodeTypeSkuScaleType : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs index 481f543cb6f9..ba76ea4ae824 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeSupportedSku.cs @@ -52,7 +52,7 @@ internal NodeTypeSupportedSku() /// Initializes a new instance of . /// The sku name. - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. /// Keeps track of any properties unknown to the library. internal NodeTypeSupportedSku(string name, string tier, IDictionary serializedAdditionalRawData) { @@ -63,7 +63,7 @@ internal NodeTypeSupportedSku(string name, string tier, IDictionary The sku name. public string Name { get; } - /// Specifies the tier of the node type. <br /><br /> Possible Values:<br /> **Standard**. + /// Specifies the tier of the node type. Possible Values: **Standard**. public string Tier { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs index 27f95298c1ce..09f9b3a2cff3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVaultCertificate.cs @@ -47,7 +47,7 @@ public partial class NodeTypeVaultCertificate /// Initializes a new instance of . /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. /// or is null. public NodeTypeVaultCertificate(Uri certificateUri, string certificateStore) { @@ -60,7 +60,7 @@ public NodeTypeVaultCertificate(Uri certificateUri, string certificateStore) /// Initializes a new instance of . /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. /// Keeps track of any properties unknown to the library. internal NodeTypeVaultCertificate(Uri certificateUri, string certificateStore, IDictionary serializedAdditionalRawData) { @@ -76,7 +76,7 @@ internal NodeTypeVaultCertificate() /// This is the URL of a certificate that has been uploaded to Key Vault as a secret. For adding a secret to the Key Vault, see [Add a key or secret to the key vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). public Uri CertificateUri { get; set; } - /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. <br><br>For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name <UppercaseThumbprint>.crt for the X509 certificate file and <UppercaseThumbprint>.prv for private key. Both of these files are .pem formatted. + /// For Windows VMs, specifies the certificate store on the Virtual Machine to which the certificate should be added. The specified certificate store is implicitly in the LocalMachine account. For Linux VMs, the certificate file is placed under the /var/lib/waagent directory, with the file name {UppercaseThumbprint}.crt for the X509 certificate file and {UppercaseThumbprint}.prv for private key. Both of these files are .pem formatted. public string CertificateStore { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs index 143b7508d168..a8712ffcd52d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.Serialization.cs @@ -41,7 +41,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("publisher"u8); writer.WriteStringValue(Publisher); writer.WritePropertyName("type"u8); - writer.WriteStringValue(VmssExtensionPropertiesType); + writer.WriteStringValue(Type); writer.WritePropertyName("typeHandlerVersion"u8); writer.WriteStringValue(TypeHandlerVersion); if (Optional.IsDefined(AutoUpgradeMinorVersion)) @@ -52,26 +52,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit if (Optional.IsDefined(Settings)) { writer.WritePropertyName("settings"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(Settings); -#else - using (JsonDocument document = JsonDocument.Parse(Settings, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(Settings, options); } if (Optional.IsDefined(ProtectedSettings)) { writer.WritePropertyName("protectedSettings"u8); -#if NET6_0_OR_GREATER - writer.WriteRawValue(ProtectedSettings); -#else - using (JsonDocument document = JsonDocument.Parse(ProtectedSettings, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteObjectValue(ProtectedSettings, options); } if (Optional.IsDefined(ForceUpdateTag)) { @@ -151,8 +137,8 @@ internal static NodeTypeVmssExtension DeserializeNodeTypeVmssExtension(JsonEleme string type = default; string typeHandlerVersion = default; bool? autoUpgradeMinorVersion = default; - BinaryData settings = default; - BinaryData protectedSettings = default; + VmSSExtensionPropertiesSettings settings = default; + VmSSExtensionPropertiesProtectedSettings protectedSettings = default; string forceUpdateTag = default; IList provisionAfterExtensions = default; string provisioningState = default; @@ -206,7 +192,7 @@ internal static NodeTypeVmssExtension DeserializeNodeTypeVmssExtension(JsonEleme { continue; } - settings = BinaryData.FromString(property0.Value.GetRawText()); + settings = VmSSExtensionPropertiesSettings.DeserializeVmSSExtensionPropertiesSettings(property0.Value, options); continue; } if (property0.NameEquals("protectedSettings"u8)) @@ -215,7 +201,7 @@ internal static NodeTypeVmssExtension DeserializeNodeTypeVmssExtension(JsonEleme { continue; } - protectedSettings = BinaryData.FromString(property0.Value.GetRawText()); + protectedSettings = VmSSExtensionPropertiesProtectedSettings.DeserializeVmSSExtensionPropertiesProtectedSettings(property0.Value, options); continue; } if (property0.NameEquals("forceUpdateTag"u8)) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.cs index 282b06f17553..fba1f755637b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/NodeTypeVmssExtension.cs @@ -48,19 +48,19 @@ public partial class NodeTypeVmssExtension /// Initializes a new instance of . /// The name of the extension. /// The name of the extension handler publisher. - /// Specifies the type of the extension; an example is "CustomScriptExtension". + /// Specifies the type of the extension; an example is "CustomScriptExtension". /// Specifies the version of the script handler. - /// , , or is null. - public NodeTypeVmssExtension(string name, string publisher, string vmssExtensionPropertiesType, string typeHandlerVersion) + /// , , or is null. + public NodeTypeVmssExtension(string name, string publisher, string type, string typeHandlerVersion) { Argument.AssertNotNull(name, nameof(name)); Argument.AssertNotNull(publisher, nameof(publisher)); - Argument.AssertNotNull(vmssExtensionPropertiesType, nameof(vmssExtensionPropertiesType)); + Argument.AssertNotNull(type, nameof(type)); Argument.AssertNotNull(typeHandlerVersion, nameof(typeHandlerVersion)); Name = name; Publisher = publisher; - VmssExtensionPropertiesType = vmssExtensionPropertiesType; + Type = type; TypeHandlerVersion = typeHandlerVersion; ProvisionAfterExtensions = new ChangeTrackingList(); SetupOrder = new ChangeTrackingList(); @@ -69,7 +69,7 @@ public NodeTypeVmssExtension(string name, string publisher, string vmssExtension /// Initializes a new instance of . /// The name of the extension. /// The name of the extension handler publisher. - /// Specifies the type of the extension; an example is "CustomScriptExtension". + /// Specifies the type of the extension; an example is "CustomScriptExtension". /// Specifies the version of the script handler. /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. /// Json formatted public settings for the extension. @@ -80,11 +80,11 @@ public NodeTypeVmssExtension(string name, string publisher, string vmssExtension /// Indicates whether the extension should be automatically upgraded by the platform if there is a newer version of the extension available. /// Indicates the setup order for the extension. /// Keeps track of any properties unknown to the library. - internal NodeTypeVmssExtension(string name, string publisher, string vmssExtensionPropertiesType, string typeHandlerVersion, bool? autoUpgradeMinorVersion, BinaryData settings, BinaryData protectedSettings, string forceUpdateTag, IList provisionAfterExtensions, string provisioningState, bool? isAutomaticUpgradeEnabled, IList setupOrder, IDictionary serializedAdditionalRawData) + internal NodeTypeVmssExtension(string name, string publisher, string type, string typeHandlerVersion, bool? autoUpgradeMinorVersion, VmSSExtensionPropertiesSettings settings, VmSSExtensionPropertiesProtectedSettings protectedSettings, string forceUpdateTag, IList provisionAfterExtensions, string provisioningState, bool? isAutomaticUpgradeEnabled, IList setupOrder, IDictionary serializedAdditionalRawData) { Name = name; Publisher = publisher; - VmssExtensionPropertiesType = vmssExtensionPropertiesType; + Type = type; TypeHandlerVersion = typeHandlerVersion; AutoUpgradeMinorVersion = autoUpgradeMinorVersion; Settings = settings; @@ -107,73 +107,15 @@ internal NodeTypeVmssExtension() /// The name of the extension handler publisher. public string Publisher { get; set; } /// Specifies the type of the extension; an example is "CustomScriptExtension". - public string VmssExtensionPropertiesType { get; set; } + public string Type { get; set; } /// Specifies the version of the script handler. public string TypeHandlerVersion { get; set; } /// Indicates whether the extension should use a newer minor version if one is available at deployment time. Once deployed, however, the extension will not upgrade minor versions unless redeployed, even with this property set to true. public bool? AutoUpgradeMinorVersion { get; set; } - /// - /// Json formatted public settings for the extension. - /// - /// To assign an object to 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 BinaryData Settings { get; set; } - /// - /// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. - /// - /// To assign an object to 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 BinaryData ProtectedSettings { get; set; } + /// Json formatted public settings for the extension. + public VmSSExtensionPropertiesSettings Settings { get; set; } + /// The extension can contain either protectedSettings or protectedSettingsFromKeyVault or no protected settings at all. + public VmSSExtensionPropertiesProtectedSettings ProtectedSettings { get; set; } /// If a value is provided and is different from the previous value, the extension handler will be forced to update even if the extension configuration has not changed. public string ForceUpdateTag { get; set; } /// Collection of extension names after which this extension needs to be provisioned. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.Serialization.cs new file mode 100644 index 000000000000..2a2a8ab0dc34 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.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.ServiceFabricManagedClusters.Models +{ + internal partial class OperationListResult : 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(OperationListResult)} 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 + } + } + } + + OperationListResult 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(OperationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationListResult(document.RootElement, options); + } + + internal static OperationListResult DeserializeOperationListResult(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(OperationResult.DeserializeOperationResult(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 OperationListResult(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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(OperationListResult)} does not support writing '{options.Format}' format."); + } + } + + OperationListResult 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 DeserializeOperationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.cs new file mode 100644 index 000000000000..b88cc36fedc1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationListResult.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.ServiceFabricManagedClusters.Models +{ + /// Describes the result of the request to list Service Fabric resource provider operations. + internal partial class OperationListResult + { + /// + /// 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 OperationResult items on this page. + /// is null. + internal OperationListResult(IEnumerable value) + { + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); + } + + /// Initializes a new instance of . + /// The OperationResult items on this page. + /// The link to the next page of items. + /// Keeps track of any properties unknown to the library. + internal OperationListResult(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal OperationListResult() + { + } + + /// The OperationResult items on this page. + public IReadOnlyList Value { get; } + /// The link to the next page of items. + public Uri NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.Serialization.cs new file mode 100644 index 000000000000..6902169314a6 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.Serialization.cs @@ -0,0 +1,187 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class OperationResult : 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(OperationResult)} does not support writing '{format}' format."); + } + + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(IsDataAction)) + { + writer.WritePropertyName("isDataAction"u8); + writer.WriteBooleanValue(IsDataAction.Value); + } + if (Optional.IsDefined(Display)) + { + writer.WritePropertyName("display"u8); + writer.WriteObjectValue(Display, options); + } + if (Optional.IsDefined(Origin)) + { + writer.WritePropertyName("origin"u8); + writer.WriteStringValue(Origin); + } + if (Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + 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 + } + } + } + + OperationResult 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(OperationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeOperationResult(document.RootElement, options); + } + + internal static OperationResult DeserializeOperationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + bool? isDataAction = default; + AvailableOperationDisplay display = default; + string origin = default; + string nextLink = 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("isDataAction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isDataAction = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("display"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + display = AvailableOperationDisplay.DeserializeAvailableOperationDisplay(property.Value, options); + continue; + } + if (property.NameEquals("origin"u8)) + { + origin = property.Value.GetString(); + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new OperationResult( + name, + isDataAction, + display, + origin, + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(OperationResult)} does not support writing '{options.Format}' format."); + } + } + + OperationResult 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 DeserializeOperationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(OperationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.cs new file mode 100644 index 000000000000..dae3bf0356c3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/OperationResult.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.ServiceFabricManagedClusters.Models +{ + /// Available operation list result. + public partial class OperationResult + { + /// + /// 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 . + internal OperationResult() + { + } + + /// Initializes a new instance of . + /// The name of the operation. + /// Indicates whether the operation is a data action. + /// The object that represents the operation. + /// Origin result. + /// The URL to use for getting the next set of results. + /// Keeps track of any properties unknown to the library. + internal OperationResult(string name, bool? isDataAction, AvailableOperationDisplay display, string origin, string nextLink, IDictionary serializedAdditionalRawData) + { + Name = name; + IsDataAction = isDataAction; + Display = display; + Origin = origin; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The name of the operation. + public string Name { get; } + /// Indicates whether the operation is a data action. + public bool? IsDataAction { get; } + /// The object that represents the operation. + public AvailableOperationDisplay Display { get; } + /// Origin result. + public string Origin { get; } + /// The URL to use for getting the next set of results. + public string NextLink { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs index 0ee96e2078b2..385c027006bb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PartitionInstanceCountScalingMechanism.cs @@ -26,7 +26,7 @@ public PartitionInstanceCountScalingMechanism(int minInstanceCount, int maxInsta } /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// /// Keeps track of any properties unknown to the library. /// Minimum number of instances of the partition. /// Maximum number of instances of the partition. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs index 5e5212d71498..57222883843a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/PolicyViolationCompensationAction.cs @@ -10,12 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. - /// Rollback specifies that the upgrade will start rolling back automatically. - /// Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. - /// - /// + /// The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. public readonly partial struct PolicyViolationCompensationAction : IEquatable { private readonly string _value; @@ -30,9 +25,9 @@ public PolicyViolationCompensationAction(string value) private const string RollbackValue = "Rollback"; private const string ManualValue = "Manual"; - /// The upgrade will start rolling back automatically. The value is 0. + /// Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. public static PolicyViolationCompensationAction Rollback { get; } = new PolicyViolationCompensationAction(RollbackValue); - /// The upgrade will switch to UnmonitoredManual upgrade mode. The value is 1. + /// Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically. public static PolicyViolationCompensationAction Manual { get; } = new PolicyViolationCompensationAction(ManualValue); /// Determines if two values are the same. public static bool operator ==(PolicyViolationCompensationAction left, PolicyViolationCompensationAction right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs index b874244c1e9e..c0d121ab3b86 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.Serialization.cs @@ -37,15 +37,15 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WritePropertyName("failureAction"u8); writer.WriteStringValue(FailureAction.ToString()); writer.WritePropertyName("healthCheckWaitDuration"u8); - writer.WriteStringValue(HealthCheckWaitDuration, "c"); + writer.WriteStringValue(HealthCheckWaitDuration); writer.WritePropertyName("healthCheckStableDuration"u8); - writer.WriteStringValue(HealthCheckStableDuration, "c"); + writer.WriteStringValue(HealthCheckStableDuration); writer.WritePropertyName("healthCheckRetryTimeout"u8); - writer.WriteStringValue(HealthCheckRetryTimeout, "c"); + writer.WriteStringValue(HealthCheckRetryTimeout); writer.WritePropertyName("upgradeTimeout"u8); - writer.WriteStringValue(UpgradeTimeout, "c"); + writer.WriteStringValue(UpgradeTimeout); writer.WritePropertyName("upgradeDomainTimeout"u8); - writer.WriteStringValue(UpgradeDomainTimeout, "c"); + writer.WriteStringValue(UpgradeDomainTimeout); if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -84,11 +84,11 @@ internal static RollingUpgradeMonitoringPolicy DeserializeRollingUpgradeMonitori return null; } PolicyViolationCompensationAction failureAction = default; - TimeSpan healthCheckWaitDuration = default; - TimeSpan healthCheckStableDuration = default; - TimeSpan healthCheckRetryTimeout = default; - TimeSpan upgradeTimeout = default; - TimeSpan upgradeDomainTimeout = default; + string healthCheckWaitDuration = default; + string healthCheckStableDuration = default; + string healthCheckRetryTimeout = default; + string upgradeTimeout = default; + string upgradeDomainTimeout = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -100,27 +100,27 @@ internal static RollingUpgradeMonitoringPolicy DeserializeRollingUpgradeMonitori } if (property.NameEquals("healthCheckWaitDuration"u8)) { - healthCheckWaitDuration = property.Value.GetTimeSpan("c"); + healthCheckWaitDuration = property.Value.GetString(); continue; } if (property.NameEquals("healthCheckStableDuration"u8)) { - healthCheckStableDuration = property.Value.GetTimeSpan("c"); + healthCheckStableDuration = property.Value.GetString(); continue; } if (property.NameEquals("healthCheckRetryTimeout"u8)) { - healthCheckRetryTimeout = property.Value.GetTimeSpan("c"); + healthCheckRetryTimeout = property.Value.GetString(); continue; } if (property.NameEquals("upgradeTimeout"u8)) { - upgradeTimeout = property.Value.GetTimeSpan("c"); + upgradeTimeout = property.Value.GetString(); continue; } if (property.NameEquals("upgradeDomainTimeout"u8)) { - upgradeDomainTimeout = property.Value.GetTimeSpan("c"); + upgradeDomainTimeout = property.Value.GetString(); continue; } if (options.Format != "W") diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.cs index 3155951d965d..594c1f91991e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/RollingUpgradeMonitoringPolicy.cs @@ -52,8 +52,15 @@ public partial class RollingUpgradeMonitoringPolicy /// The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". /// The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". /// The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". - public RollingUpgradeMonitoringPolicy(PolicyViolationCompensationAction failureAction, TimeSpan healthCheckWaitDuration, TimeSpan healthCheckStableDuration, TimeSpan healthCheckRetryTimeout, TimeSpan upgradeTimeout, TimeSpan upgradeDomainTimeout) + /// , , , or is null. + public RollingUpgradeMonitoringPolicy(PolicyViolationCompensationAction failureAction, string healthCheckWaitDuration, string healthCheckStableDuration, string healthCheckRetryTimeout, string upgradeTimeout, string upgradeDomainTimeout) { + Argument.AssertNotNull(healthCheckWaitDuration, nameof(healthCheckWaitDuration)); + Argument.AssertNotNull(healthCheckStableDuration, nameof(healthCheckStableDuration)); + Argument.AssertNotNull(healthCheckRetryTimeout, nameof(healthCheckRetryTimeout)); + Argument.AssertNotNull(upgradeTimeout, nameof(upgradeTimeout)); + Argument.AssertNotNull(upgradeDomainTimeout, nameof(upgradeDomainTimeout)); + FailureAction = failureAction; HealthCheckWaitDuration = healthCheckWaitDuration; HealthCheckStableDuration = healthCheckStableDuration; @@ -70,7 +77,7 @@ public RollingUpgradeMonitoringPolicy(PolicyViolationCompensationAction failureA /// The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". /// The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". /// Keeps track of any properties unknown to the library. - internal RollingUpgradeMonitoringPolicy(PolicyViolationCompensationAction failureAction, TimeSpan healthCheckWaitDuration, TimeSpan healthCheckStableDuration, TimeSpan healthCheckRetryTimeout, TimeSpan upgradeTimeout, TimeSpan upgradeDomainTimeout, IDictionary serializedAdditionalRawData) + internal RollingUpgradeMonitoringPolicy(PolicyViolationCompensationAction failureAction, string healthCheckWaitDuration, string healthCheckStableDuration, string healthCheckRetryTimeout, string upgradeTimeout, string upgradeDomainTimeout, IDictionary serializedAdditionalRawData) { FailureAction = failureAction; HealthCheckWaitDuration = healthCheckWaitDuration; @@ -89,14 +96,14 @@ internal RollingUpgradeMonitoringPolicy() /// The compensating action to perform when a Monitored upgrade encounters monitoring policy or health policy violations. Invalid indicates the failure action is invalid. Rollback specifies that the upgrade will start rolling back automatically. Manual indicates that the upgrade will switch to UnmonitoredManual upgrade mode. public PolicyViolationCompensationAction FailureAction { get; set; } /// The amount of time to wait after completing an upgrade domain before applying health policies. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". - public TimeSpan HealthCheckWaitDuration { get; set; } + public string HealthCheckWaitDuration { get; set; } /// The amount of time that the application or cluster must remain healthy before the upgrade proceeds to the next upgrade domain. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". - public TimeSpan HealthCheckStableDuration { get; set; } + public string HealthCheckStableDuration { get; set; } /// The amount of time to retry health evaluation when the application or cluster is unhealthy before FailureAction is executed. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". - public TimeSpan HealthCheckRetryTimeout { get; set; } + public string HealthCheckRetryTimeout { get; set; } /// The amount of time the overall upgrade has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". - public TimeSpan UpgradeTimeout { get; set; } + public string UpgradeTimeout { get; set; } /// The amount of time each upgrade domain has to complete before FailureAction is executed. Cannot be larger than 12 hours. It is interpreted as a string representing an ISO 8601 duration with following format "hh:mm:ss.fff". - public TimeSpan UpgradeDomainTimeout { get; set; } + public string UpgradeDomainTimeout { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SecurityEncryptionType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SecurityEncryptionType.cs new file mode 100644 index 000000000000..b4f83211485b --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SecurityEncryptionType.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.ServiceFabricManagedClusters.Models +{ + /// Specifies the securityEncryptionType type of the nodeType. Only DiskWithVMGuestState and VMGuestStateOnly are currently supported. + public readonly partial struct SecurityEncryptionType : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SecurityEncryptionType(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string DiskWithVmGuestStateValue = "DiskWithVMGuestState"; + private const string VmGuestStateOnlyValue = "VMGuestStateOnly"; + + /// For encryption of the managed disk along with VMGuestState blob. + public static SecurityEncryptionType DiskWithVmGuestState { get; } = new SecurityEncryptionType(DiskWithVmGuestStateValue); + /// For encryption of just the VMGuestState blob. + public static SecurityEncryptionType VmGuestStateOnly { get; } = new SecurityEncryptionType(VmGuestStateOnlyValue); + /// Determines if two values are the same. + public static bool operator ==(SecurityEncryptionType left, SecurityEncryptionType right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SecurityEncryptionType left, SecurityEncryptionType right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SecurityEncryptionType(string value) => new SecurityEncryptionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SecurityEncryptionType other && Equals(other); + /// + public bool Equals(SecurityEncryptionType 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs index 95a9e61c9e45..b6ff38c0cdaa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterIPConfiguration.cs @@ -63,7 +63,7 @@ public ServiceFabricManagedClusterIPConfiguration(string name) /// Initializes a new instance of . /// Name of the network interface. /// Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. - /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. . + /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. /// Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. /// Specifies the subnet of the network interface. /// Specifies whether the IP configuration's private IP is IPv4 or IPv6. Default is IPv4. @@ -90,7 +90,7 @@ internal ServiceFabricManagedClusterIPConfiguration() public string Name { get; set; } /// Specifies an array of references to backend address pools of application gateways. A node type can reference backend address pools of multiple application gateways. Multiple node types cannot use the same application gateway. public IList ApplicationGatewayBackendAddressPools { get; } - /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. . + /// Specifies an array of references to backend address pools of load balancers. A node type can reference backend address pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. public IList LoadBalancerBackendAddressPools { get; } /// Specifies an array of references to inbound Nat pools of the load balancers. A node type can reference inbound nat pools of one public and one internal load balancer. Multiple node types cannot use the same basic sku load balancer. public IList LoadBalancerInboundNatPools { get; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs index 40a9677722a4..8e3e13588282 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPrivateIPAddressVersion.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedClusterPrivateIPAddressVersion(string value) private const string IPv4Value = "IPv4"; private const string IPv6Value = "IPv6"; - /// IPv4. + /// The IP configuration's private IP is IPv4. public static ServiceFabricManagedClusterPrivateIPAddressVersion IPv4 { get; } = new ServiceFabricManagedClusterPrivateIPAddressVersion(IPv4Value); - /// IPv6. + /// The IP configuration's private IP is IPv6. public static ServiceFabricManagedClusterPrivateIPAddressVersion IPv6 { get; } = new ServiceFabricManagedClusterPrivateIPAddressVersion(IPv6Value); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterPrivateIPAddressVersion left, ServiceFabricManagedClusterPrivateIPAddressVersion right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs index 0364d55d0297..29653f7414db 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterPublicIPAddressVersion.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedClusterPublicIPAddressVersion(string value) private const string IPv4Value = "IPv4"; private const string IPv6Value = "IPv6"; - /// IPv4. + /// The IP configuration's public IP is IPv4. public static ServiceFabricManagedClusterPublicIPAddressVersion IPv4 { get; } = new ServiceFabricManagedClusterPublicIPAddressVersion(IPv4Value); - /// IPv6. + /// The IP configuration's public IP is IPv6. public static ServiceFabricManagedClusterPublicIPAddressVersion IPv6 { get; } = new ServiceFabricManagedClusterPublicIPAddressVersion(IPv6Value); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterPublicIPAddressVersion left, ServiceFabricManagedClusterPublicIPAddressVersion right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs index e92b13e4d122..ebe1d44168a2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterSecurityType.cs @@ -24,11 +24,14 @@ public ServiceFabricManagedClusterSecurityType(string value) private const string TrustedLaunchValue = "TrustedLaunch"; private const string StandardValue = "Standard"; + private const string ConfidentialVmValue = "ConfidentialVM"; /// Trusted Launch is a security type that secures generation 2 virtual machines. public static ServiceFabricManagedClusterSecurityType TrustedLaunch { get; } = new ServiceFabricManagedClusterSecurityType(TrustedLaunchValue); /// Standard is the default security type for all machines. public static ServiceFabricManagedClusterSecurityType Standard { get; } = new ServiceFabricManagedClusterSecurityType(StandardValue); + /// ConfidentialVM provides hardware-based encryption, trusted execution environment (TEE) and isolation of the VM memory & CPU from host. + public static ServiceFabricManagedClusterSecurityType ConfidentialVm { get; } = new ServiceFabricManagedClusterSecurityType(ConfidentialVmValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedClusterSecurityType left, ServiceFabricManagedClusterSecurityType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs index fa7d0caddfcd..05f4888f6710 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterState.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// The current state of the cluster. - /// - /// + /// The current state of the cluster. public readonly partial struct ServiceFabricManagedClusterState : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs index afcbaebcb9da..03b8f0fe5f4b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedClusterVersion.Serialization.cs @@ -127,7 +127,7 @@ internal static ServiceFabricManagedClusterVersion DeserializeServiceFabricManag } if (property0.NameEquals("supportExpiryUtc"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs index 20a60bfafb70..d7b77f613fc3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedDataDiskType.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. - /// - /// + /// Managed data disk type. IOPS and throughput are given by the disk size, to see more information go to https://docs.microsoft.com/en-us/azure/virtual-machines/disks-types. public readonly partial struct ServiceFabricManagedDataDiskType : IEquatable { private readonly string _value; @@ -25,16 +22,25 @@ public ServiceFabricManagedDataDiskType(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string StandardLrsValue = "Standard_LRS"; - private const string StandardSsdLrsValue = "StandardSSD_LRS"; - private const string PremiumLrsValue = "Premium_LRS"; + private const string StandardLRSValue = "Standard_LRS"; + private const string StandardSSDLRSValue = "StandardSSD_LRS"; + private const string PremiumLRSValue = "Premium_LRS"; + private const string PremiumV2LRSValue = "PremiumV2_LRS"; + private const string StandardSSDZRSValue = "StandardSSD_ZRS"; + private const string PremiumZRSValue = "Premium_ZRS"; /// Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. - public static ServiceFabricManagedDataDiskType StandardLrs { get; } = new ServiceFabricManagedDataDiskType(StandardLrsValue); + public static ServiceFabricManagedDataDiskType StandardLRS { get; } = new ServiceFabricManagedDataDiskType(StandardLRSValue); /// Standard SSD locally redundant storage. Best for web servers, lightly used enterprise applications and dev/test. - public static ServiceFabricManagedDataDiskType StandardSsdLrs { get; } = new ServiceFabricManagedDataDiskType(StandardSsdLrsValue); + public static ServiceFabricManagedDataDiskType StandardSSDLRS { get; } = new ServiceFabricManagedDataDiskType(StandardSSDLRSValue); /// Premium SSD locally redundant storage. Best for production and performance sensitive workloads. - public static ServiceFabricManagedDataDiskType PremiumLrs { get; } = new ServiceFabricManagedDataDiskType(PremiumLrsValue); + public static ServiceFabricManagedDataDiskType PremiumLRS { get; } = new ServiceFabricManagedDataDiskType(PremiumLRSValue); + /// Premium SSD V2 locally redundant storage. Best for production and performance sensitive workloads that consistently require low latency and high IOPS and throughput. + public static ServiceFabricManagedDataDiskType PremiumV2LRS { get; } = new ServiceFabricManagedDataDiskType(PremiumV2LRSValue); + /// Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications and dev/test that need storage resiliency against zone failures. + public static ServiceFabricManagedDataDiskType StandardSSDZRS { get; } = new ServiceFabricManagedDataDiskType(StandardSSDZRSValue); + /// Premium SSD zone redundant storage. Best for production workloads that need storage resiliency against zone failures. + public static ServiceFabricManagedDataDiskType PremiumZRS { get; } = new ServiceFabricManagedDataDiskType(PremiumZRSValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedDataDiskType left, ServiceFabricManagedDataDiskType right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs index 39249cd693d9..70ddf5f08095 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkSecurityRuleDirection.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedNetworkSecurityRuleDirection(string value) private const string InboundValue = "inbound"; private const string OutboundValue = "outbound"; - /// inbound. + /// Inbound direction. public static ServiceFabricManagedNetworkSecurityRuleDirection Inbound { get; } = new ServiceFabricManagedNetworkSecurityRuleDirection(InboundValue); - /// outbound. + /// Outbound direction. public static ServiceFabricManagedNetworkSecurityRuleDirection Outbound { get; } = new ServiceFabricManagedNetworkSecurityRuleDirection(OutboundValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNetworkSecurityRuleDirection left, ServiceFabricManagedNetworkSecurityRuleDirection right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs index cc6e9b03b4b7..a320e84cfb55 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNetworkTrafficAccess.cs @@ -25,9 +25,9 @@ public ServiceFabricManagedNetworkTrafficAccess(string value) private const string AllowValue = "allow"; private const string DenyValue = "deny"; - /// allow. + /// The network traffic is allowed. public static ServiceFabricManagedNetworkTrafficAccess Allow { get; } = new ServiceFabricManagedNetworkTrafficAccess(AllowValue); - /// deny. + /// The network traffic is denied. public static ServiceFabricManagedNetworkTrafficAccess Deny { get; } = new ServiceFabricManagedNetworkTrafficAccess(DenyValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNetworkTrafficAccess left, ServiceFabricManagedNetworkTrafficAccess right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs index d4964713d19d..1f466b3b767c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedNsgProtocol.cs @@ -30,19 +30,19 @@ public ServiceFabricManagedNsgProtocol(string value) private const string AHValue = "ah"; private const string EspValue = "esp"; - /// http. + /// Protocol applies to HTTP. public static ServiceFabricManagedNsgProtocol Http { get; } = new ServiceFabricManagedNsgProtocol(HttpValue); - /// https. + /// Protocol applies to HTTPS. public static ServiceFabricManagedNsgProtocol Https { get; } = new ServiceFabricManagedNsgProtocol(HttpsValue); - /// tcp. + /// Protocol applies to TCP. public static ServiceFabricManagedNsgProtocol Tcp { get; } = new ServiceFabricManagedNsgProtocol(TcpValue); - /// udp. + /// Protocol applies to UDP. public static ServiceFabricManagedNsgProtocol Udp { get; } = new ServiceFabricManagedNsgProtocol(UdpValue); - /// icmp. + /// Protocol applies to ICMP. public static ServiceFabricManagedNsgProtocol Icmp { get; } = new ServiceFabricManagedNsgProtocol(IcmpValue); - /// ah. + /// Protocol applies to AH. public static ServiceFabricManagedNsgProtocol AH { get; } = new ServiceFabricManagedNsgProtocol(AHValue); - /// esp. + /// Protocol applies to ESP. public static ServiceFabricManagedNsgProtocol Esp { get; } = new ServiceFabricManagedNsgProtocol(EspValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedNsgProtocol left, ServiceFabricManagedNsgProtocol right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs index 108b27d76f8b..1a7a121e303e 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceFabricManagedResourceProvisioningState.cs @@ -33,25 +33,25 @@ public ServiceFabricManagedResourceProvisioningState(string value) private const string DeletedValue = "Deleted"; private const string OtherValue = "Other"; - /// None. + /// The resource does not have a provisioning state. public static ServiceFabricManagedResourceProvisioningState None { get; } = new ServiceFabricManagedResourceProvisioningState(NoneValue); - /// Creating. + /// The resource is being created. public static ServiceFabricManagedResourceProvisioningState Creating { get; } = new ServiceFabricManagedResourceProvisioningState(CreatingValue); - /// Created. + /// The resource is created. public static ServiceFabricManagedResourceProvisioningState Created { get; } = new ServiceFabricManagedResourceProvisioningState(CreatedValue); - /// Updating. + /// The resource is being updated. public static ServiceFabricManagedResourceProvisioningState Updating { get; } = new ServiceFabricManagedResourceProvisioningState(UpdatingValue); - /// Succeeded. + /// The resource provisioning has succeeded. public static ServiceFabricManagedResourceProvisioningState Succeeded { get; } = new ServiceFabricManagedResourceProvisioningState(SucceededValue); - /// Failed. + /// The resource provisioning has failed. public static ServiceFabricManagedResourceProvisioningState Failed { get; } = new ServiceFabricManagedResourceProvisioningState(FailedValue); - /// Canceled. + /// The resource provisioning has been canceled. public static ServiceFabricManagedResourceProvisioningState Canceled { get; } = new ServiceFabricManagedResourceProvisioningState(CanceledValue); - /// Deleting. + /// The resource is being deleted. public static ServiceFabricManagedResourceProvisioningState Deleting { get; } = new ServiceFabricManagedResourceProvisioningState(DeletingValue); - /// Deleted. + /// The resource has been deleted. public static ServiceFabricManagedResourceProvisioningState Deleted { get; } = new ServiceFabricManagedResourceProvisioningState(DeletedValue); - /// Other. + /// The resource provisioning state is a state other than the previously specified states. public static ServiceFabricManagedResourceProvisioningState Other { get; } = new ServiceFabricManagedResourceProvisioningState(OtherValue); /// Determines if two values are the same. public static bool operator ==(ServiceFabricManagedResourceProvisioningState left, ServiceFabricManagedResourceProvisioningState right) => left.Equals(right); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs index cff1f5445b2d..9ebfd004ef3b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementInvalidDomainPolicy.cs @@ -21,17 +21,17 @@ public ServicePlacementInvalidDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.InvalidDomain; + Type = ServicePlacementPolicyType.InvalidDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should not be used for placement. - internal ServicePlacementInvalidDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementInvalidDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs index 7aa19caf4d91..ecd13bad6e39 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementNonPartiallyPlaceServicePolicy.cs @@ -10,21 +10,21 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// ServicePlacementNonPartiallyPlaceServicePolicy. + /// The type of placement policy for a service fabric service. Following are the possible values. public partial class ServicePlacementNonPartiallyPlaceServicePolicy : ManagedServicePlacementPolicy { /// Initializes a new instance of . public ServicePlacementNonPartiallyPlaceServicePolicy() { - ServicePlacementPolicyType = ServicePlacementPolicyType.NonPartiallyPlaceService; + Type = ServicePlacementPolicyType.NonPartiallyPlaceService; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. - internal ServicePlacementNonPartiallyPlaceServicePolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementNonPartiallyPlaceServicePolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) { - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs index 86b67e4edbd6..eb7bd946493c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementPreferPrimaryDomainPolicy.cs @@ -19,7 +19,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// be located in a particular fault domain, which in geo-distributed scenarios usually aligns with regional /// or datacenter boundaries. Note that since this is an optimization it is possible that the Primary replica /// may not end up located in this domain due to failures, capacity limits, or other constraints. - /// /// public partial class ServicePlacementPreferPrimaryDomainPolicy : ManagedServicePlacementPolicy { @@ -31,17 +30,17 @@ public ServicePlacementPreferPrimaryDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.PreferredPrimaryDomain; + Type = ServicePlacementPolicyType.PreferredPrimaryDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementPreferPrimaryDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementPreferPrimaryDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs index d28185f9259e..8b23ccfaad15 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequireDomainDistributionPolicy.cs @@ -20,7 +20,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models /// In the event that one of the datacenters goes offline, normally the replica that was placed in that /// datacenter will be packed into one of the remaining datacenters. If this is not desirable then this /// policy should be set. - /// /// public partial class ServicePlacementRequireDomainDistributionPolicy : ManagedServicePlacementPolicy { @@ -32,17 +31,17 @@ public ServicePlacementRequireDomainDistributionPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.RequiredDomainDistribution; + Type = ServicePlacementPolicyType.RequiredDomainDistribution; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementRequireDomainDistributionPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementRequireDomainDistributionPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs index 8689e98740ad..c07a4630f0e5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServicePlacementRequiredDomainPolicy.cs @@ -21,17 +21,17 @@ public ServicePlacementRequiredDomainPolicy(string domainName) Argument.AssertNotNull(domainName, nameof(domainName)); DomainName = domainName; - ServicePlacementPolicyType = ServicePlacementPolicyType.RequiredDomain; + Type = ServicePlacementPolicyType.RequiredDomain; } /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. + /// /// Keeps track of any properties unknown to the library. /// The name of the domain that should used for placement as per this policy. - internal ServicePlacementRequiredDomainPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData, string domainName) : base(servicePlacementPolicyType, serializedAdditionalRawData) + internal ServicePlacementRequiredDomainPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData, string domainName) : base(type, serializedAdditionalRawData) { DomainName = domainName; - ServicePlacementPolicyType = servicePlacementPolicyType; + Type = type; } /// Initializes a new instance of for deserialization. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs index c39d77767ed2..e98c7a0253e0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.Serialization.cs @@ -34,20 +34,17 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(ServiceResourceList)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(Value)) + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) { - writer.WritePropertyName("value"u8); - writer.WriteStartArray(); - foreach (var item in Value) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); + writer.WriteObjectValue(item, options); } - if (options.Format != "W" && Optional.IsDefined(NextLink)) + writer.WriteEndArray(); + if (Optional.IsDefined(NextLink)) { writer.WritePropertyName("nextLink"u8); - writer.WriteStringValue(NextLink); + writer.WriteStringValue(NextLink.AbsoluteUri); } if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -87,17 +84,13 @@ internal static ServiceResourceList DeserializeServiceResourceList(JsonElement e return null; } IReadOnlyList value = default; - string nextLink = default; + Uri nextLink = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } List array = new List(); foreach (var item in property.Value.EnumerateArray()) { @@ -108,7 +101,11 @@ internal static ServiceResourceList DeserializeServiceResourceList(JsonElement e } if (property.NameEquals("nextLink"u8)) { - nextLink = property.Value.GetString(); + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + nextLink = new Uri(property.Value.GetString()); continue; } if (options.Format != "W") @@ -117,7 +114,7 @@ internal static ServiceResourceList DeserializeServiceResourceList(JsonElement e } } serializedAdditionalRawData = rawDataDictionary; - return new ServiceResourceList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + return new ServiceResourceList(value, nextLink, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs index b68a170e23ab..37710bc7652f 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceResourceList.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.Linq; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -46,25 +47,34 @@ internal partial class ServiceResourceList private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - internal ServiceResourceList() + /// The ServiceResource items on this page. + /// is null. + internal ServiceResourceList(IEnumerable value) { - Value = new ChangeTrackingList(); + Argument.AssertNotNull(value, nameof(value)); + + Value = value.ToList(); } /// Initializes a new instance of . - /// - /// URL to get the next set of service list results if there are any. + /// The ServiceResource items on this page. + /// The link to the next page of items. /// Keeps track of any properties unknown to the library. - internal ServiceResourceList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + internal ServiceResourceList(IReadOnlyList value, Uri nextLink, IDictionary serializedAdditionalRawData) { Value = value; NextLink = nextLink; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Gets the value. + /// Initializes a new instance of for deserialization. + internal ServiceResourceList() + { + } + + /// The ServiceResource items on this page. public IReadOnlyList Value { get; } - /// URL to get the next set of service list results if there are any. - public string NextLink { get; } + /// The link to the next page of items. + public Uri NextLink { get; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs index abf72db581a0..6bc723f9336a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ServiceTypeHealthPolicy.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Represents the health policy used to evaluate the health of services belonging to a service type. - /// - /// + /// Represents the health policy used to evaluate the health of services belonging to a service type. public partial class ServiceTypeHealthPolicy { /// @@ -56,7 +53,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// /// /// The maximum allowed percentage of unhealthy partitions per service. @@ -65,7 +61,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// /// /// The maximum allowed percentage of unhealthy replicas per partition. @@ -74,7 +69,6 @@ public partial class ServiceTypeHealthPolicy /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUnhealthyPartitionsPerService, int maxPercentUnhealthyReplicasPerPartition) { @@ -91,7 +85,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// /// /// The maximum allowed percentage of unhealthy partitions per service. @@ -100,7 +93,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// /// /// The maximum allowed percentage of unhealthy replicas per partition. @@ -109,7 +101,6 @@ public ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUn /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// /// Keeps track of any properties unknown to the library. internal ServiceTypeHealthPolicy(int maxPercentUnhealthyServices, int maxPercentUnhealthyPartitionsPerService, int maxPercentUnhealthyReplicasPerPartition, IDictionary serializedAdditionalRawData) @@ -132,7 +123,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy service, the health is evaluated as Warning. /// This is calculated by dividing the number of unhealthy services of the specific service type over the total number of services of the specific service type. /// The computation rounds up to tolerate one failure on small numbers of services. - /// /// public int MaxPercentUnhealthyServices { get; set; } /// @@ -142,7 +132,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy partition, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy partitions over the total number of partitions in the service. /// The computation rounds up to tolerate one failure on small numbers of partitions. - /// /// public int MaxPercentUnhealthyPartitionsPerService { get; set; } /// @@ -152,7 +141,6 @@ internal ServiceTypeHealthPolicy() /// If the percentage is respected but there is at least one unhealthy replica, the health is evaluated as Warning. /// The percentage is calculated by dividing the number of unhealthy replicas over the total number of replicas in the partition. /// The computation rounds up to tolerate one failure on small numbers of replicas. - /// /// public int MaxPercentUnhealthyReplicasPerPartition { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.cs new file mode 100644 index 000000000000..b326cec7d4fe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SfmcOperationStatus.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.ServiceFabricManagedClusters.Models +{ + /// Sfmc operation status. + public readonly partial struct SfmcOperationStatus : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SfmcOperationStatus(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string StartedValue = "Started"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string AbortedValue = "Aborted"; + private const string CanceledValue = "Canceled"; + + /// Operation created. + public static SfmcOperationStatus Created { get; } = new SfmcOperationStatus(CreatedValue); + /// Operation started. + public static SfmcOperationStatus Started { get; } = new SfmcOperationStatus(StartedValue); + /// Operation succeeded. + public static SfmcOperationStatus Succeeded { get; } = new SfmcOperationStatus(SucceededValue); + /// Operation failed. + public static SfmcOperationStatus Failed { get; } = new SfmcOperationStatus(FailedValue); + /// Operation aborted. + public static SfmcOperationStatus Aborted { get; } = new SfmcOperationStatus(AbortedValue); + /// Operation canceled. + public static SfmcOperationStatus Canceled { get; } = new SfmcOperationStatus(CanceledValue); + /// Determines if two values are the same. + public static bool operator ==(SfmcOperationStatus left, SfmcOperationStatus right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SfmcOperationStatus left, SfmcOperationStatus right) => !left.Equals(right); + /// Converts a to a . + public static implicit operator SfmcOperationStatus(string value) => new SfmcOperationStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SfmcOperationStatus other && Equals(other); + /// + public bool Equals(SfmcOperationStatus 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/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs index f65db2f707c3..53608354b2b2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/SingletonPartitionScheme.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// SingletonPartitionScheme. + /// Describes the partition scheme of a singleton-partitioned, or non-partitioned service. public partial class SingletonPartitionScheme : ManagedServicePartitionScheme { /// Initializes a new instance of . @@ -20,7 +20,7 @@ public SingletonPartitionScheme() } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. internal SingletonPartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) : base(partitionScheme, serializedAdditionalRawData) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs index 941086994bf7..8431407dc146 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.Serialization.cs @@ -53,22 +53,22 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri if (Optional.IsDefined(ReplicaRestartWaitDuration)) { writer.WritePropertyName("replicaRestartWaitDuration"u8); - writer.WriteStringValue(ReplicaRestartWaitDuration.Value, "c"); + writer.WriteStringValue(ReplicaRestartWaitDuration); } if (Optional.IsDefined(QuorumLossWaitDuration)) { writer.WritePropertyName("quorumLossWaitDuration"u8); - writer.WriteStringValue(QuorumLossWaitDuration.Value, "c"); + writer.WriteStringValue(QuorumLossWaitDuration); } if (Optional.IsDefined(StandByReplicaKeepDuration)) { writer.WritePropertyName("standByReplicaKeepDuration"u8); - writer.WriteStringValue(StandByReplicaKeepDuration.Value, "c"); + writer.WriteStringValue(StandByReplicaKeepDuration); } if (Optional.IsDefined(ServicePlacementTimeLimit)) { writer.WritePropertyName("servicePlacementTimeLimit"u8); - writer.WriteStringValue(ServicePlacementTimeLimit.Value, "c"); + writer.WriteStringValue(ServicePlacementTimeLimit); } } @@ -95,10 +95,10 @@ internal static StatefulServiceProperties DeserializeStatefulServiceProperties(J bool? hasPersistedState = default; int? targetReplicaSetSize = default; int? minReplicaSetSize = default; - TimeSpan? replicaRestartWaitDuration = default; - TimeSpan? quorumLossWaitDuration = default; - TimeSpan? standByReplicaKeepDuration = default; - TimeSpan? servicePlacementTimeLimit = default; + string replicaRestartWaitDuration = default; + string quorumLossWaitDuration = default; + string standByReplicaKeepDuration = default; + string servicePlacementTimeLimit = default; string provisioningState = default; ServiceKind serviceKind = default; string serviceTypeName = default; @@ -144,38 +144,22 @@ internal static StatefulServiceProperties DeserializeStatefulServiceProperties(J } if (property.NameEquals("replicaRestartWaitDuration"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - replicaRestartWaitDuration = property.Value.GetTimeSpan("c"); + replicaRestartWaitDuration = property.Value.GetString(); continue; } if (property.NameEquals("quorumLossWaitDuration"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - quorumLossWaitDuration = property.Value.GetTimeSpan("c"); + quorumLossWaitDuration = property.Value.GetString(); continue; } if (property.NameEquals("standByReplicaKeepDuration"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - standByReplicaKeepDuration = property.Value.GetTimeSpan("c"); + standByReplicaKeepDuration = property.Value.GetString(); continue; } if (property.NameEquals("servicePlacementTimeLimit"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - servicePlacementTimeLimit = property.Value.GetTimeSpan("c"); + servicePlacementTimeLimit = property.Value.GetString(); continue; } if (property.NameEquals("provisioningState"u8)) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs index 155996858673..9f1171dca31c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatefulServiceProperties.cs @@ -54,7 +54,6 @@ public StatefulServiceProperties(string serviceTypeName, ManagedServicePartition /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false. /// The target replica set size as a number. @@ -63,7 +62,7 @@ public StatefulServiceProperties(string serviceTypeName, ManagedServicePartition /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". - internal StatefulServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName, bool? hasPersistedState, int? targetReplicaSetSize, int? minReplicaSetSize, TimeSpan? replicaRestartWaitDuration, TimeSpan? quorumLossWaitDuration, TimeSpan? standByReplicaKeepDuration, TimeSpan? servicePlacementTimeLimit) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) + internal StatefulServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName, bool? hasPersistedState, int? targetReplicaSetSize, int? minReplicaSetSize, string replicaRestartWaitDuration, string quorumLossWaitDuration, string standByReplicaKeepDuration, string servicePlacementTimeLimit) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) { HasPersistedState = hasPersistedState; TargetReplicaSetSize = targetReplicaSetSize; @@ -87,12 +86,12 @@ internal StatefulServiceProperties() /// The minimum replica set size as a number. public int? MinReplicaSetSize { get; set; } /// The duration between when a replica goes down and when a new replica is created, represented in ISO 8601 format "hh:mm:ss". - public TimeSpan? ReplicaRestartWaitDuration { get; set; } + public string ReplicaRestartWaitDuration { get; set; } /// The maximum duration for which a partition is allowed to be in a state of quorum loss, represented in ISO 8601 format "hh:mm:ss". - public TimeSpan? QuorumLossWaitDuration { get; set; } + public string QuorumLossWaitDuration { get; set; } /// The definition on how long StandBy replicas should be maintained before being removed, represented in ISO 8601 format "hh:mm:ss". - public TimeSpan? StandByReplicaKeepDuration { get; set; } + public string StandByReplicaKeepDuration { get; set; } /// The duration for which replicas can stay InBuild before reporting that build is stuck, represented in ISO 8601 format "hh:mm:ss". - public TimeSpan? ServicePlacementTimeLimit { get; set; } + public string ServicePlacementTimeLimit { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs index 93129f40d5e1..fd3d6be14ccb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/StatelessServiceProperties.cs @@ -56,7 +56,6 @@ public StatelessServiceProperties(string serviceTypeName, ManagedServicePartitio /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// /// The instance count. /// MinInstanceCount is the minimum number of instances that must be up to meet the EnsureAvailability safety check during operations like upgrade or deactivate node. The actual number that is used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). Note, if InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs index 67b928a41677..5bf473d31704 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UniformInt64RangePartitionScheme.cs @@ -18,12 +18,10 @@ public partial class UniformInt64RangePartitionScheme : ManagedServicePartitionS /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public UniformInt64RangePartitionScheme(int count, long lowKey, long highKey) { @@ -34,18 +32,16 @@ public UniformInt64RangePartitionScheme(int count, long lowKey, long highKey) } /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// /// Keeps track of any properties unknown to the library. /// The number of partitions. /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// internal UniformInt64RangePartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData, int count, long lowKey, long highKey) : base(partitionScheme, serializedAdditionalRawData) { @@ -65,13 +61,11 @@ internal UniformInt64RangePartitionScheme() /// /// The lower bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public long LowKey { get; set; } /// /// The upper bound of the partition key range that /// should be split between the partition ‘Count’ - /// /// public long HighKey { get; set; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..0a893388e133 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.Serialization.cs @@ -0,0 +1,130 @@ +// 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.ServiceFabricManagedClusters.Models +{ + internal partial class UnknownFaultSimulationContent : 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(FaultSimulationContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + } + + FaultSimulationContent 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(FaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFaultSimulationContent(document.RootElement, options); + } + + internal static UnknownFaultSimulationContent DeserializeUnknownFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + FaultKind faultKind = "Unknown"; + bool? force = default; + FaultSimulationConstraints constraints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("force"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + force = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new UnknownFaultSimulationContent(faultKind, force, constraints, 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + FaultSimulationContent 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 DeserializeFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs new file mode 100644 index 000000000000..d150971bc6db --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownFaultSimulationContent.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Unknown version of FaultSimulationContent. + internal partial class UnknownFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + internal UnknownFaultSimulationContent(FaultKind faultKind, bool? force, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData) : base(faultKind, force, constraints, serializedAdditionalRawData) + { + FaultKind = faultKind; + } + + /// Initializes a new instance of for deserialization. + internal UnknownFaultSimulationContent() + { + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePartitionScheme.Serialization.cs similarity index 92% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePartitionScheme.Serialization.cs index 930bf53122a7..75741f1bdd84 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePartitionScheme.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class UnknownPartition : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownManagedServicePartitionScheme : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -49,7 +49,7 @@ ManagedServicePartitionScheme IJsonModel.Create(r return DeserializeManagedServicePartitionScheme(document.RootElement, options); } - internal static UnknownPartition DeserializeUnknownPartition(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownManagedServicePartitionScheme DeserializeUnknownManagedServicePartitionScheme(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -73,7 +73,7 @@ internal static UnknownPartition DeserializeUnknownPartition(JsonElement element } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownPartition(partitionScheme, serializedAdditionalRawData); + return new UnknownManagedServicePartitionScheme(partitionScheme, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePartitionScheme.cs similarity index 50% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePartitionScheme.cs index 9d8e065b17dc..837a8816aaec 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownPartition.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePartitionScheme.cs @@ -10,19 +10,19 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of Partition. - internal partial class UnknownPartition : ManagedServicePartitionScheme + /// Unknown version of ManagedServicePartitionScheme. + internal partial class UnknownManagedServicePartitionScheme : ManagedServicePartitionScheme { - /// Initializes a new instance of . - /// Specifies how the service is partitioned. + /// Initializes a new instance of . + /// /// Keeps track of any properties unknown to the library. - internal UnknownPartition(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) : base(partitionScheme, serializedAdditionalRawData) + internal UnknownManagedServicePartitionScheme(PartitionScheme partitionScheme, IDictionary serializedAdditionalRawData) : base(partitionScheme, serializedAdditionalRawData) { PartitionScheme = partitionScheme; } - /// Initializes a new instance of for deserialization. - internal UnknownPartition() + /// Initializes a new instance of for deserialization. + internal UnknownManagedServicePartitionScheme() { } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePlacementPolicy.Serialization.cs similarity index 92% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePlacementPolicy.Serialization.cs index d585deefaa88..1f3471049ffe 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePlacementPolicy.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class UnknownServicePlacementPolicy : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownManagedServicePlacementPolicy : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -49,7 +49,7 @@ ManagedServicePlacementPolicy IJsonModel.Create(r return DeserializeManagedServicePlacementPolicy(document.RootElement, options); } - internal static UnknownServicePlacementPolicy DeserializeUnknownServicePlacementPolicy(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownManagedServicePlacementPolicy DeserializeUnknownManagedServicePlacementPolicy(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -73,7 +73,7 @@ internal static UnknownServicePlacementPolicy DeserializeUnknownServicePlacement } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownServicePlacementPolicy(type, serializedAdditionalRawData); + return new UnknownManagedServicePlacementPolicy(type, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePlacementPolicy.cs new file mode 100644 index 000000000000..2674fd4598d3 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServicePlacementPolicy.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.ServiceFabricManagedClusters.Models +{ + /// Unknown version of ManagedServicePlacementPolicy. + internal partial class UnknownManagedServicePlacementPolicy : ManagedServicePlacementPolicy + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownManagedServicePlacementPolicy(ServicePlacementPolicyType type, IDictionary serializedAdditionalRawData) : base(type, serializedAdditionalRawData) + { + Type = type; + } + + /// Initializes a new instance of for deserialization. + internal UnknownManagedServicePlacementPolicy() + { + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs similarity index 96% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs index 78ef62747428..c736bfd5a8a7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class UnknownServiceResourceProperties : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownManagedServiceProperties : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -49,7 +49,7 @@ ManagedServiceProperties IJsonModel.Create(ref Utf8Jso return DeserializeManagedServiceProperties(document.RootElement, options); } - internal static UnknownServiceResourceProperties DeserializeUnknownServiceResourceProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownManagedServiceProperties DeserializeUnknownManagedServiceProperties(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -183,7 +183,7 @@ internal static UnknownServiceResourceProperties DeserializeUnknownServiceResour } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownServiceResourceProperties( + return new UnknownManagedServiceProperties( placementConstraints, correlationScheme ?? new ChangeTrackingList(), serviceLoadMetrics ?? new ChangeTrackingList(), diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs similarity index 74% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs index cdab207081e0..db7381e5d678 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServiceResourceProperties.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceProperties.cs @@ -10,10 +10,10 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ServiceResourceProperties. - internal partial class UnknownServiceResourceProperties : ManagedServiceProperties + /// Unknown version of ManagedServiceProperties. + internal partial class UnknownManagedServiceProperties : ManagedServiceProperties { - /// Initializes a new instance of . + /// Initializes a new instance of . /// The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". /// A list that describes the correlation of the service with other services. /// The service load metrics is given as an array of ServiceLoadMetric objects. @@ -38,15 +38,14 @@ internal partial class UnknownServiceResourceProperties : ManagedServiceProperti /// Dns name used for the service. If this is specified, then the DNS name can be used to return the IP addresses of service endpoints for application layer protocols (e.g., HTTP). /// When updating serviceDnsName, old name may be temporarily resolvable. However, rely on new name. /// When removing serviceDnsName, removed name may temporarily be resolvable. Do not rely on the name being unresolvable. - /// /// - internal UnknownServiceResourceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) + internal UnknownManagedServiceProperties(string placementConstraints, IList correlationScheme, IList serviceLoadMetrics, IList servicePlacementPolicies, ServiceFabricManagedServiceMoveCost? defaultMoveCost, IList scalingPolicies, IDictionary serializedAdditionalRawData, string provisioningState, ServiceKind serviceKind, string serviceTypeName, ManagedServicePartitionScheme partitionDescription, ManagedServicePackageActivationMode? servicePackageActivationMode, string serviceDnsName) : base(placementConstraints, correlationScheme, serviceLoadMetrics, servicePlacementPolicies, defaultMoveCost, scalingPolicies, serializedAdditionalRawData, provisioningState, serviceKind, serviceTypeName, partitionDescription, servicePackageActivationMode, serviceDnsName) { ServiceKind = serviceKind; } - /// Initializes a new instance of for deserialization. - internal UnknownServiceResourceProperties() + /// Initializes a new instance of for deserialization. + internal UnknownManagedServiceProperties() { } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingMechanism.Serialization.cs similarity index 92% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingMechanism.Serialization.cs index 25bf26ebace9..2b6eb4d9af75 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingMechanism.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class UnknownScalingMechanism : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownManagedServiceScalingMechanism : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -49,7 +49,7 @@ ManagedServiceScalingMechanism IJsonModel.Create return DeserializeManagedServiceScalingMechanism(document.RootElement, options); } - internal static UnknownScalingMechanism DeserializeUnknownScalingMechanism(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownManagedServiceScalingMechanism DeserializeUnknownManagedServiceScalingMechanism(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -73,7 +73,7 @@ internal static UnknownScalingMechanism DeserializeUnknownScalingMechanism(JsonE } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownScalingMechanism(kind, serializedAdditionalRawData); + return new UnknownManagedServiceScalingMechanism(kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingMechanism.cs new file mode 100644 index 000000000000..6de1727919c7 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingMechanism.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.ServiceFabricManagedClusters.Models +{ + /// Unknown version of ManagedServiceScalingMechanism. + internal partial class UnknownManagedServiceScalingMechanism : ManagedServiceScalingMechanism + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownManagedServiceScalingMechanism(ServiceScalingMechanismKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) + { + Kind = kind; + } + + /// Initializes a new instance of for deserialization. + internal UnknownManagedServiceScalingMechanism() + { + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingTrigger.Serialization.cs similarity index 92% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingTrigger.Serialization.cs index 88d87b1fbe6f..410249702038 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingTrigger.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class UnknownScalingTrigger : IUtf8JsonSerializable, IJsonModel + internal partial class UnknownManagedServiceScalingTrigger : IUtf8JsonSerializable, IJsonModel { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); @@ -49,7 +49,7 @@ ManagedServiceScalingTrigger IJsonModel.Create(ref return DeserializeManagedServiceScalingTrigger(document.RootElement, options); } - internal static UnknownScalingTrigger DeserializeUnknownScalingTrigger(JsonElement element, ModelReaderWriterOptions options = null) + internal static UnknownManagedServiceScalingTrigger DeserializeUnknownManagedServiceScalingTrigger(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -73,7 +73,7 @@ internal static UnknownScalingTrigger DeserializeUnknownScalingTrigger(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new UnknownScalingTrigger(kind, serializedAdditionalRawData); + return new UnknownManagedServiceScalingTrigger(kind, serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingTrigger.cs similarity index 50% rename from sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingTrigger.cs index c3924d9086b9..7406dd5d9a07 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingMechanism.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownManagedServiceScalingTrigger.cs @@ -10,19 +10,19 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Unknown version of ScalingMechanism. - internal partial class UnknownScalingMechanism : ManagedServiceScalingMechanism + /// Unknown version of ManagedServiceScalingTrigger. + internal partial class UnknownManagedServiceScalingTrigger : ManagedServiceScalingTrigger { - /// Initializes a new instance of . - /// Specifies the mechanism associated with this scaling policy. + /// Initializes a new instance of . + /// /// Keeps track of any properties unknown to the library. - internal UnknownScalingMechanism(ServiceScalingMechanismKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) + internal UnknownManagedServiceScalingTrigger(ServiceScalingTriggerKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) { Kind = kind; } - /// Initializes a new instance of for deserialization. - internal UnknownScalingMechanism() + /// Initializes a new instance of for deserialization. + internal UnknownManagedServiceScalingTrigger() { } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs deleted file mode 100644 index 170529134bd4..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownScalingTrigger.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models -{ - /// Unknown version of ScalingTrigger. - internal partial class UnknownScalingTrigger : ManagedServiceScalingTrigger - { - /// Initializes a new instance of . - /// Specifies the trigger associated with this scaling policy. - /// Keeps track of any properties unknown to the library. - internal UnknownScalingTrigger(ServiceScalingTriggerKind kind, IDictionary serializedAdditionalRawData) : base(kind, serializedAdditionalRawData) - { - Kind = kind; - } - - /// Initializes a new instance of for deserialization. - internal UnknownScalingTrigger() - { - } - } -} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs deleted file mode 100644 index 11a95e1f3b96..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/UnknownServicePlacementPolicy.cs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models -{ - /// Unknown version of ServicePlacementPolicy. - internal partial class UnknownServicePlacementPolicy : ManagedServicePlacementPolicy - { - /// Initializes a new instance of . - /// The type of placement policy for a service fabric service. Following are the possible values. - /// Keeps track of any properties unknown to the library. - internal UnknownServicePlacementPolicy(ServicePlacementPolicyType servicePlacementPolicyType, IDictionary serializedAdditionalRawData) : base(servicePlacementPolicyType, serializedAdditionalRawData) - { - ServicePlacementPolicyType = servicePlacementPolicyType; - } - - /// Initializes a new instance of for deserialization. - internal UnknownServicePlacementPolicy() - { - } - } -} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs index 14f95717e1d4..1d375b50c5a7 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmImagePlan.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started ->. Enter any required information and then click Save. + /// Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click Want to deploy programmatically, Get Started. Enter any required information and then click Save. public partial class VmImagePlan { /// diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs index 12630a76caf1..1935302f089d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.Serialization.cs @@ -34,17 +34,12 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(VmManagedIdentity)} does not support writing '{format}' format."); } - if (Optional.IsCollectionDefined(UserAssignedIdentities)) + if (Optional.IsCollectionDefined(ArmId)) { writer.WritePropertyName("userAssignedIdentities"u8); writer.WriteStartArray(); - foreach (var item in UserAssignedIdentities) + foreach (var item in ArmId) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } writer.WriteStringValue(item); } writer.WriteEndArray(); @@ -86,7 +81,7 @@ internal static VmManagedIdentity DeserializeVmManagedIdentity(JsonElement eleme { return null; } - IList userAssignedIdentities = default; + IList userAssignedIdentities = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -97,17 +92,10 @@ internal static VmManagedIdentity DeserializeVmManagedIdentity(JsonElement eleme { continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(new ResourceIdentifier(item.GetString())); - } + array.Add(item.GetString()); } userAssignedIdentities = array; continue; @@ -118,7 +106,7 @@ internal static VmManagedIdentity DeserializeVmManagedIdentity(JsonElement eleme } } serializedAdditionalRawData = rawDataDictionary; - return new VmManagedIdentity(userAssignedIdentities ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new VmManagedIdentity(userAssignedIdentities ?? new ChangeTrackingList(), serializedAdditionalRawData); } BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.cs index 06c1b954a85d..d5f4eba84fcc 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmManagedIdentity.cs @@ -7,7 +7,6 @@ using System; using System.Collections.Generic; -using Azure.Core; namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { @@ -49,19 +48,19 @@ internal partial class VmManagedIdentity /// Initializes a new instance of . public VmManagedIdentity() { - UserAssignedIdentities = new ChangeTrackingList(); + ArmId = new ChangeTrackingList(); } /// Initializes a new instance of . - /// The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// Keeps track of any properties unknown to the library. - internal VmManagedIdentity(IList userAssignedIdentities, IDictionary serializedAdditionalRawData) + internal VmManagedIdentity(IList armId, IDictionary serializedAdditionalRawData) { - UserAssignedIdentities = userAssignedIdentities; + ArmId = armId; _serializedAdditionalRawData = serializedAdditionalRawData; } /// The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - public IList UserAssignedIdentities { get; } + public IList ArmId { get; } } } diff --git a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupUpdateProperties.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesProtectedSettings.Serialization.cs similarity index 58% rename from sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupUpdateProperties.Serialization.cs rename to sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesProtectedSettings.Serialization.cs index d9977673adf2..d7d634c06d55 100644 --- a/sdk/oracle/Azure.ResourceManager.OracleDatabase/src/Generated/Models/AutonomousDatabaseBackupUpdateProperties.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesProtectedSettings.Serialization.cs @@ -11,13 +11,13 @@ using System.Text.Json; using Azure.Core; -namespace Azure.ResourceManager.OracleDatabase.Models +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - internal partial class AutonomousDatabaseBackupUpdateProperties : IUtf8JsonSerializable, IJsonModel + public partial class VmSSExtensionPropertiesProtectedSettings : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,17 +28,12 @@ void IJsonModel.Write(Utf8JsonWriter w /// 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; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AutonomousDatabaseBackupUpdateProperties)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(VmSSExtensionPropertiesProtectedSettings)} does not support writing '{format}' format."); } - if (Optional.IsDefined(RetentionPeriodInDays)) - { - writer.WritePropertyName("retentionPeriodInDays"u8); - writer.WriteNumberValue(RetentionPeriodInDays.Value); - } if (options.Format != "W" && _serializedAdditionalRawData != null) { foreach (var item in _serializedAdditionalRawData) @@ -56,19 +51,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AutonomousDatabaseBackupUpdateProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + VmSSExtensionPropertiesProtectedSettings IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AutonomousDatabaseBackupUpdateProperties)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(VmSSExtensionPropertiesProtectedSettings)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAutonomousDatabaseBackupUpdateProperties(document.RootElement, options); + return DeserializeVmSSExtensionPropertiesProtectedSettings(document.RootElement, options); } - internal static AutonomousDatabaseBackupUpdateProperties DeserializeAutonomousDatabaseBackupUpdateProperties(JsonElement element, ModelReaderWriterOptions options = null) + internal static VmSSExtensionPropertiesProtectedSettings DeserializeVmSSExtensionPropertiesProtectedSettings(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -76,58 +71,48 @@ internal static AutonomousDatabaseBackupUpdateProperties DeserializeAutonomousDa { return null; } - int? retentionPeriodInDays = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("retentionPeriodInDays"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - retentionPeriodInDays = property.Value.GetInt32(); - continue; - } if (options.Format != "W") { rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } } serializedAdditionalRawData = rawDataDictionary; - return new AutonomousDatabaseBackupUpdateProperties(retentionPeriodInDays, serializedAdditionalRawData); + return new VmSSExtensionPropertiesProtectedSettings(serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureResourceManagerOracleDatabaseContext.Default); + return ModelReaderWriter.Write(this, options, AzureResourceManagerServiceFabricManagedClustersContext.Default); default: - throw new FormatException($"The model {nameof(AutonomousDatabaseBackupUpdateProperties)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(VmSSExtensionPropertiesProtectedSettings)} does not support writing '{options.Format}' format."); } } - AutonomousDatabaseBackupUpdateProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + VmSSExtensionPropertiesProtectedSettings IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAutonomousDatabaseBackupUpdateProperties(document.RootElement, options); + return DeserializeVmSSExtensionPropertiesProtectedSettings(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AutonomousDatabaseBackupUpdateProperties)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(VmSSExtensionPropertiesProtectedSettings)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesProtectedSettings.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesProtectedSettings.cs new file mode 100644 index 000000000000..e12127408216 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesProtectedSettings.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.ServiceFabricManagedClusters.Models +{ + /// The VmSSExtensionPropertiesProtectedSettings. + public partial class VmSSExtensionPropertiesProtectedSettings + { + /// + /// 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 VmSSExtensionPropertiesProtectedSettings() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal VmSSExtensionPropertiesProtectedSettings(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesSettings.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesSettings.Serialization.cs new file mode 100644 index 000000000000..df0cf2844e7d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesSettings.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.ServiceFabricManagedClusters.Models +{ + public partial class VmSSExtensionPropertiesSettings : 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(VmSSExtensionPropertiesSettings)} 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 + } + } + } + + VmSSExtensionPropertiesSettings 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(VmSSExtensionPropertiesSettings)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeVmSSExtensionPropertiesSettings(document.RootElement, options); + } + + internal static VmSSExtensionPropertiesSettings DeserializeVmSSExtensionPropertiesSettings(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 VmSSExtensionPropertiesSettings(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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(VmSSExtensionPropertiesSettings)} does not support writing '{options.Format}' format."); + } + } + + VmSSExtensionPropertiesSettings 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 DeserializeVmSSExtensionPropertiesSettings(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(VmSSExtensionPropertiesSettings)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesSettings.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesSettings.cs new file mode 100644 index 000000000000..41e140051ab1 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmSSExtensionPropertiesSettings.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.ServiceFabricManagedClusters.Models +{ + /// The VmSSExtensionPropertiesSettings. + public partial class VmSSExtensionPropertiesSettings + { + /// + /// 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 VmSSExtensionPropertiesSettings() + { + } + + /// Initializes a new instance of . + /// Keeps track of any properties unknown to the library. + internal VmSSExtensionPropertiesSettings(IDictionary serializedAdditionalRawData) + { + _serializedAdditionalRawData = serializedAdditionalRawData; + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs index 8f16c4924940..98c99b5c76fa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/VmssExtensionSetupOrder.cs @@ -10,10 +10,7 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models { - /// - /// Vm extension setup order. - /// - /// + /// Vm extension setup order. public readonly partial struct VmssExtensionSetupOrder : IEquatable { private readonly string _value; diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs new file mode 100644 index 000000000000..bebe86a84e5f --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.Serialization.cs @@ -0,0 +1,155 @@ +// 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.ServiceFabricManagedClusters.Models +{ + public partial class ZoneFaultSimulationContent : 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(ZoneFaultSimulationContent)} does not support writing '{format}' format."); + } + + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(Zones)) + { + writer.WritePropertyName("zones"u8); + writer.WriteStartArray(); + foreach (var item in Zones) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + } + + ZoneFaultSimulationContent 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(ZoneFaultSimulationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + + internal static ZoneFaultSimulationContent DeserializeZoneFaultSimulationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList zones = default; + FaultKind faultKind = default; + bool? force = default; + FaultSimulationConstraints constraints = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("zones"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + zones = array; + continue; + } + if (property.NameEquals("faultKind"u8)) + { + faultKind = new FaultKind(property.Value.GetString()); + continue; + } + if (property.NameEquals("force"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + force = property.Value.GetBoolean(); + continue; + } + if (property.NameEquals("constraints"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + constraints = FaultSimulationConstraints.DeserializeFaultSimulationConstraints(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ZoneFaultSimulationContent(faultKind, force, constraints, serializedAdditionalRawData, zones ?? new ChangeTrackingList()); + } + + 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, AzureResourceManagerServiceFabricManagedClustersContext.Default); + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support writing '{options.Format}' format."); + } + } + + ZoneFaultSimulationContent 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 DeserializeZoneFaultSimulationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ZoneFaultSimulationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs new file mode 100644 index 000000000000..7b735ef01745 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/Models/ZoneFaultSimulationContent.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models +{ + /// Parameters for Zone Fault Simulation action. + public partial class ZoneFaultSimulationContent : FaultSimulationContent + { + /// Initializes a new instance of . + public ZoneFaultSimulationContent() + { + Zones = new ChangeTrackingList(); + FaultKind = FaultKind.Zone; + } + + /// Initializes a new instance of . + /// The kind of fault to be simulated. + /// Force the action to go through without any check on the cluster. + /// Constraints for Fault Simulation action. + /// Keeps track of any properties unknown to the library. + /// Indicates the zones of the fault simulation. + internal ZoneFaultSimulationContent(FaultKind faultKind, bool? force, FaultSimulationConstraints constraints, IDictionary serializedAdditionalRawData, IList zones) : base(faultKind, force, constraints, serializedAdditionalRawData) + { + Zones = zones; + FaultKind = faultKind; + } + + /// Indicates the zones of the fault simulation. + public IList Zones { get; } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs index 93cabb6d0fa1..4300bba394b2 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypeVersionsRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ApplicationTypeVersionsRestOperations /// Initializes a new instance of ApplicationTypeVersionsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationTypeVersionsRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -65,7 +65,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -114,8 +114,8 @@ public async Task> GetA } /// Get a Service Fabric managed application type version resource created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -156,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -177,7 +177,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -195,8 +195,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -226,8 +226,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -264,7 +264,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -285,7 +285,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -303,8 +303,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of an application type version resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -338,8 +338,8 @@ public async Task> Upda } /// Updates the tags of an application type version resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -380,7 +380,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -401,7 +401,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -415,8 +415,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -435,7 +435,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -445,8 +444,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed application type version resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type version. @@ -465,7 +464,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -482,7 +480,7 @@ internal RequestUriBuilder CreateListByApplicationTypesRequestUri(string subscri uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -502,7 +500,7 @@ internal HttpMessage CreateListByApplicationTypesRequest(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -515,8 +513,8 @@ internal HttpMessage CreateListByApplicationTypesRequest(string subscriptionId, } /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -546,8 +544,8 @@ public async Task> ListByApplicatio } /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -600,8 +598,8 @@ internal HttpMessage CreateListByApplicationTypesNextPageRequest(string nextLink /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -633,8 +631,8 @@ public async Task> ListByApplicatio /// Gets all application type version resources created or in the process of being created in the Service Fabric managed application type name resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs index 939894f7a141..c6aeda2e269c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationTypesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ApplicationTypesRestOperations /// Initializes a new instance of ApplicationTypesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationTypesRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -63,7 +63,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -75,8 +75,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -108,8 +108,8 @@ public async Task> GetAsync(st } /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -148,7 +148,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -167,7 +167,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -183,8 +183,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type name resource. @@ -216,8 +216,8 @@ public async Task> CreateOrUpd } /// Create or update a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type name resource. @@ -256,7 +256,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -275,7 +275,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -291,8 +291,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of an application type resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type resource updated tags. @@ -324,8 +324,8 @@ public async Task> UpdateAsync } /// Updates the tags of an application type resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The application type resource updated tags. @@ -364,7 +364,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -383,7 +383,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes/", false); uri.AppendPath(applicationTypeName, true); @@ -395,8 +395,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -413,7 +413,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -423,8 +422,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed application type name resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application type name resource. /// The cancellation token to use. @@ -441,7 +440,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -458,7 +456,7 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -476,7 +474,7 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applicationTypes", false); uri.AppendQuery("api-version", _apiVersion, true); @@ -487,8 +485,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -516,8 +514,8 @@ public async Task> ListAsync(string subscr } /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -568,8 +566,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -599,8 +597,8 @@ public async Task> ListNextPageAsync(strin /// Gets all application type name resources created or in the process of being created in the Service Fabric managed cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs index 255649d6246a..72755491e210 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ApplicationsRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ApplicationsRestOperations /// Initializes a new instance of ApplicationsRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ApplicationsRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -48,16 +48,15 @@ internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, st uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Get; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -68,7 +67,6 @@ internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string reso uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -76,59 +74,73 @@ internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string reso return message; } - /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ReadUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ReadUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -140,16 +152,15 @@ internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -160,33 +171,39 @@ internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string re uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/startRollback", false); 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; } - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - /// The customer subscription identifier. - /// The name of the resource group. + /// Create or update a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The application resource. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task StartRollbackAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -194,25 +211,28 @@ public async Task StartRollbackAsync(string subscriptionId, string res } } - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. - /// The customer subscription identifier. - /// The name of the resource group. + /// Create or update a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The application resource. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response StartRollback(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(data, nameof(data)); - using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { + case 200: case 202: return message.Response; default: @@ -220,7 +240,7 @@ public Response StartRollback(string subscriptionId, string resourceGroupName, s } } - internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -232,16 +252,15 @@ internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Patch; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -252,75 +271,84 @@ internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string re uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); - uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - /// The customer subscription identifier. - /// The name of the resource group. + /// Updates the tags of an application resource of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The parameters for resuming an application upgrade. + /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ResumeUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. - /// The customer subscription identifier. - /// The name of the resource group. + /// Updates the tags of an application resource of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The parameters for resuming an application upgrade. + /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ResumeUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 202: - return message.Response; + case 200: + { + ServiceFabricManagedApplicationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -328,7 +356,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -336,18 +364,18 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -358,73 +386,61 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou return message; } - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Delete a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application 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 clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Delete a Service Fabric managed application resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application 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 clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedApplicationData)null, message.Response); + case 202: + case 204: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -432,99 +448,93 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); + uri.AppendPath("/applications", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationData data) + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications/", false); - uri.AppendPath(applicationName, true); + uri.AppendPath("/applications", false); 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 or update a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The name of the application resource. - /// The application resource. /// 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 clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ApplicationResourceList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create or update a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The name of the application resource. - /// The application resource. /// 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 clusterName, string applicationName, ServiceFabricManagedApplicationData data, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, data); + using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + ApplicationResourceList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) + internal RequestUriBuilder CreateReadUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -532,107 +542,91 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/fetchUpgradeStatus", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch) + internal HttpMessage CreateReadUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/fetchUpgradeStatus", false); 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; _userAgent.Apply(message); return message; } - /// Updates the tags of an application resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) + public async Task ReadUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); + using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Updates the tags of an application resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get the status of the latest application upgrade. It will query the cluster to find the status of the latest application upgrade. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. - /// The application resource updated tags. /// The cancellation token to use. - /// , , , or is null. + /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, ServiceFabricManagedApplicationPatch patch, CancellationToken cancellationToken = default) + public Response ReadUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - Argument.AssertNotNull(patch, nameof(patch)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, applicationName, patch); + using var message = CreateReadUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedApplicationData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedApplicationData.DeserializeServiceFabricManagedApplicationData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal RequestUriBuilder CreateResumeUpgradeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -640,93 +634,99 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) + internal HttpMessage CreateResumeUpgradeRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); + uri.AppendPath("/resumeUpgrade", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Delete a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public async Task ResumeUpgradeAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Delete a Service Fabric managed application resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. + /// The parameters for resuming an application upgrade. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) + public Response ResumeUpgrade(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, applicationName); + using var message = CreateResumeUpgradeRequest(subscriptionId, resourceGroupName, clusterName, applicationName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateStartRollbackRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -734,27 +734,31 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications", false); + uri.AppendPath("/applications/", false); + uri.AppendPath(applicationName, true); + uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateStartRollbackRequest(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; 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.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/applications", false); + uri.AppendPath("/applications/", false); + uri.AppendPath(applicationName, true); + uri.AppendPath("/startRollback", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -762,59 +766,53 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro return message; } - /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the application resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task StartRollbackAsync(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ApplicationResourceList value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the application resource. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response StartRollback(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(applicationName, nameof(applicationName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStartRollbackRequest(subscriptionId, resourceGroupName, clusterName, applicationName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ApplicationResourceList value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ApplicationResourceList.DeserializeApplicationResourceList(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -844,8 +842,8 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -875,8 +873,8 @@ public async Task> ListNextPageAsync(string ne /// Gets all managed application resources created or in the process of being created in the Service Fabric cluster resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs index c45acb409fec..dc85f94ae1a5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedApplyMaintenanceWindowRestOperations.cs @@ -23,14 +23,14 @@ internal partial class ManagedApplyMaintenanceWindowRestOperations /// Initializes a new instance of ManagedApplyMaintenanceWindowRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedApplyMaintenanceWindowRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -71,8 +71,8 @@ internal HttpMessage CreatePostRequest(string subscriptionId, string resourceGro } /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -95,8 +95,8 @@ public async Task PostAsync(string subscriptionId, string resourceGrou } /// Action to Apply Maintenance window on the Service Fabric Managed Clusters, right now. Any pending update will be applied. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs index 0d6bb642c742..7a724c0ffafb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedAzResiliencyStatusRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ManagedAzResiliencyStatusRestOperations /// Initializes a new instance of ManagedAzResiliencyStatusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedAzResiliencyStatusRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetManagedAzResiliencyStatusRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetManagedAzResiliencyStatusRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -73,19 +73,19 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + public async Task> GetManagedAzResiliencyStatusAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetManagedAzResiliencyStatusRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -102,19 +102,19 @@ public async Task> GetAsync(string subscript } /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + public Response GetManagedAzResiliencyStatus(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetManagedAzResiliencyStatusRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs index 1f6de46f3826..170cb02e5cf8 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClusterVersionRestOperations.cs @@ -26,18 +26,18 @@ internal partial class ManagedClusterVersionRestOperations /// Initializes a new instance of ManagedClusterVersionRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedClusterVersionRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string clusterVersion) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string location, string clusterVersion) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -51,7 +51,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocat return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string clusterVersion) + internal HttpMessage CreateGetRequest(string subscriptionId, string location, string clusterVersion) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -72,15 +72,16 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat } /// Gets information about an available Service Fabric managed cluster code version. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cluster code version. /// 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, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); using var message = CreateGetRequest(subscriptionId, location, clusterVersion); @@ -100,15 +101,16 @@ public async Task> GetAsync(string } /// Gets information about an available Service Fabric managed cluster code version. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cluster code version. /// 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, AzureLocation location, string clusterVersion, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string location, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); using var message = CreateGetRequest(subscriptionId, location, clusterVersion); @@ -127,7 +129,7 @@ public Response Get(string subscriptionId, A } } - internal RequestUriBuilder CreateGetByEnvironmentRequestUri(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -135,15 +137,12 @@ internal RequestUriBuilder CreateGetByEnvironmentRequestUri(string subscriptionI uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(environment.ToString(), true); - uri.AppendPath("/managedClusterVersions/", false); - uri.AppendPath(clusterVersion, true); + uri.AppendPath("/managedClusterVersions", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion) + internal HttpMessage CreateListRequest(string subscriptionId, string location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -154,10 +153,7 @@ internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureL uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/environments/", false); - uri.AppendPath(environment.ToString(), true); - uri.AppendPath("/managedClusterVersions/", false); - uri.AppendPath(clusterVersion, true); + uri.AppendPath("/managedClusterVersions", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -165,28 +161,31 @@ internal HttpMessage CreateGetByEnvironmentRequest(string subscriptionId, AzureL return message; } - /// Gets information about an available Service Fabric cluster code version by environment. - /// The customer subscription identifier. + /// Gets all available code versions for Service Fabric cluster resources by location. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> GetByEnvironmentAsync(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task>> ListAsync(string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateGetByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); + using var message = CreateListRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterVersion value = default; + IReadOnlyList value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); + } + value = array; return Response.FromValue(value, message.Response); } default: @@ -194,28 +193,31 @@ public async Task> GetByEnvironment } } - /// Gets information about an available Service Fabric cluster code version by environment. - /// The customer subscription identifier. + /// Gets all available code versions for Service Fabric cluster resources by location. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. - /// The cluster code version. /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response GetByEnvironment(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response> List(string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateGetByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); + using var message = CreateListRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterVersion value = default; + IReadOnlyList value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); + List array = new List(); + foreach (var item in document.RootElement.EnumerateArray()) + { + array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); + } + value = array; return Response.FromValue(value, message.Response); } default: @@ -223,7 +225,7 @@ public Response GetByEnvironment(string subs } } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedClusterVersionByEnvironmentRequestUri(string subscriptionId, string location, ManagedClusterVersionEnvironment environment, string clusterVersion) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -231,12 +233,15 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLoca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedClusterVersions", false); + uri.AppendPath("/environments/", false); + uri.AppendPath(environment.ToString(), true); + uri.AppendPath("/managedClusterVersions/", false); + uri.AppendPath(clusterVersion, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedClusterVersionByEnvironmentRequest(string subscriptionId, string location, ManagedClusterVersionEnvironment environment, string clusterVersion) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -247,7 +252,10 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedClusterVersions", false); + uri.AppendPath("/environments/", false); + uri.AppendPath(environment.ToString(), true); + uri.AppendPath("/managedClusterVersions/", false); + uri.AppendPath(clusterVersion, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -255,30 +263,29 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca return message; } - /// Gets all available code versions for Service Fabric cluster resources by location. - /// The customer subscription identifier. + /// Gets information about an available Service Fabric cluster code version by environment. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task>> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetManagedClusterVersionByEnvironmentAsync(string subscriptionId, string location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedClusterVersionByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - IReadOnlyList value = default; + ServiceFabricManagedClusterVersion value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); - } - value = array; + value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -286,30 +293,29 @@ public async Task>> L } } - /// Gets all available code versions for Service Fabric cluster resources by location. - /// The customer subscription identifier. + /// Gets information about an available Service Fabric cluster code version by environment. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// The operating system of the cluster. + /// The cluster code version. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response> List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetManagedClusterVersionByEnvironment(string subscriptionId, string location, ManagedClusterVersionEnvironment environment, string clusterVersion, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(clusterVersion, nameof(clusterVersion)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedClusterVersionByEnvironmentRequest(subscriptionId, location, environment, clusterVersion); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - IReadOnlyList value = default; + ServiceFabricManagedClusterVersion value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - List array = new List(); - foreach (var item in document.RootElement.EnumerateArray()) - { - array.Add(ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(item)); - } - value = array; + value = ServiceFabricManagedClusterVersion.DeserializeServiceFabricManagedClusterVersion(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -317,7 +323,7 @@ public Response> List(string s } } - internal RequestUriBuilder CreateListByEnvironmentRequestUri(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment) + internal RequestUriBuilder CreateListByEnvironmentRequestUri(string subscriptionId, string location, ManagedClusterVersionEnvironment environment) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -332,7 +338,7 @@ internal RequestUriBuilder CreateListByEnvironmentRequestUri(string subscription return uri; } - internal HttpMessage CreateListByEnvironmentRequest(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment) + internal HttpMessage CreateListByEnvironmentRequest(string subscriptionId, string location, ManagedClusterVersionEnvironment environment) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -354,15 +360,16 @@ internal HttpMessage CreateListByEnvironmentRequest(string subscriptionId, Azure } /// Gets all available code versions for Service Fabric cluster resources by environment. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task>> ListByEnvironmentAsync(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task>> ListByEnvironmentAsync(string subscriptionId, string location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); using var message = CreateListByEnvironmentRequest(subscriptionId, location, environment); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); @@ -386,15 +393,16 @@ public async Task>> L } /// Gets all available code versions for Service Fabric cluster resources by environment. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// The operating system of the cluster. The default means all. + /// The operating system of the cluster. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response> ListByEnvironment(string subscriptionId, AzureLocation location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response> ListByEnvironment(string subscriptionId, string location, ManagedClusterVersionEnvironment environment, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); using var message = CreateListByEnvironmentRequest(subscriptionId, location, environment); _pipeline.Send(message, cancellationToken); diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs index 2b4e2d0f01f7..5260fa9abd15 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedClustersRestOperations.cs @@ -25,17 +25,389 @@ internal partial class ManagedClustersRestOperations /// Initializes a new instance of ManagedClustersRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedClustersRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, 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 or update a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cluster resource. + /// 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 clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cluster resource. + /// 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 clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the tags of of a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The managed cluster resource updated tags. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the tags of of a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The managed cluster resource updated tags. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceFabricManagedClusterData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + 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 Service Fabric managed cluster resource with the specified name. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster 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 clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListByResourceGroupRequestUri(string subscriptionId, string resourceGroupName) { var uri = new RawRequestUriBuilder(); @@ -69,8 +441,8 @@ internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, str } /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -96,8 +468,8 @@ public async Task> ListByResourceGroupAsync(s } /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. @@ -151,7 +523,7 @@ internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId) } /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -176,7 +548,7 @@ public async Task> ListBySubscriptionAsync(st } /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -200,7 +572,7 @@ public Response ListBySubscription(string subscription } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -210,15 +582,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -227,76 +600,81 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public async Task> GetFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterData value = default; + FaultSimulation value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric managed cluster resource created or in the process of being created in the specified resource group. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public Response GetFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedClusterData value = default; + FaultSimulation value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); return Response.FromValue(value, message.Response); } - case 404: - return Response.FromValue((ServiceFabricManagedClusterData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + internal RequestUriBuilder CreateListFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -306,15 +684,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data) + internal HttpMessage CreateListFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -323,72 +702,73 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/listFaultSimulation", false); 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 or update a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The cluster resource. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + public async Task> ListFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Create or update a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The cluster resource. /// The cancellation token to use. - /// , , or is null. + /// , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterData data, CancellationToken cancellationToken = default) + public Response ListFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(data, nameof(data)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, data); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + internal RequestUriBuilder CreateStartFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -398,15 +778,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch) + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -415,80 +796,71 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/startFaultSimulation", false); 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(patch, ModelSerializationExtensions.WireOptions); + content.JsonWriter.WriteObjectValue(faultSimulationContentWrapper, ModelSerializationExtensions.WireOptions); request.Content = content; _userAgent.Apply(message); return message; } - /// Update the tags of of a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The managed cluster resource updated tags. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + public async Task StartFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, faultSimulationContentWrapper); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedClusterData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Update the tags of of a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. - /// The managed cluster resource updated tags. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, ServiceFabricManagedClusterPatch patch, CancellationToken cancellationToken = default) + public Response StartFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, patch); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, faultSimulationContentWrapper); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedClusterData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedClusterData.DeserializeServiceFabricManagedClusterData(document.RootElement); - return Response.FromValue(value, message.Response); - } + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateStopFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -498,15 +870,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -515,59 +888,64 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Delete a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public async Task StopFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Delete a Service Fabric managed cluster resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , or is null. + /// , , or is null. /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + public Response StopFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: - case 204: return message.Response; default: throw new RequestFailedException(message.Response); @@ -598,8 +976,8 @@ internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, s /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -627,8 +1005,8 @@ public async Task> ListByResourceGroupNextPag /// Gets all Service Fabric cluster resources created or in the process of being created in the resource group. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// , or is null. /// or is an empty string, and was expected to be non-empty. @@ -678,7 +1056,7 @@ internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, st /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -705,7 +1083,7 @@ public async Task> ListBySubscriptionNextPage /// Gets all Service Fabric cluster resources created or in the process of being created in the subscription. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -729,5 +1107,89 @@ public Response ListBySubscriptionNextPage(string next throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListFaultSimulationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListFaultSimulationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName) + { + 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; + } + + /// Gets the list of recent fault simulations for the cluster. + /// 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. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListFaultSimulationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recent fault simulations for the cluster. + /// 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. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListFaultSimulationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs index c63da012f10e..da9210d94c46 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedMaintenanceWindowStatusRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ManagedMaintenanceWindowStatusRestOperations /// Initializes a new instance of ManagedMaintenanceWindowStatusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedMaintenanceWindowStatusRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -73,8 +73,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. @@ -102,8 +102,8 @@ public async Task> GetAsync(string subs } /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , or is null. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs index 93113c271520..52cb7970bca5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ManagedUnsupportedVMSizesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class ManagedUnsupportedVMSizesRestOperations /// Initializes a new instance of ManagedUnsupportedVMSizesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ManagedUnsupportedVMSizesRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizeRequestUri(string subscriptionId, string location, string vmSize) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -44,12 +44,13 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, AzureLoca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes", false); + uri.AppendPath("/managedUnsupportedVMSizes/", false); + uri.AppendPath(vmSize, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedUnsupportedVmSizeRequest(string subscriptionId, string location, string vmSize) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -60,7 +61,8 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes", false); + uri.AppendPath("/managedUnsupportedVMSizes/", false); + uri.AppendPath(vmSize, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -68,25 +70,28 @@ internal HttpMessage CreateListRequest(string subscriptionId, AzureLocation loca return message; } - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> GetManagedUnsupportedVmSizeAsync(string subscriptionId, string location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizeRequest(subscriptionId, location, vmSize); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ManagedVmSizesResult value = default; + ServiceFabricManagedUnsupportedVmSize value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); + value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -94,25 +99,28 @@ public async Task> ListAsync(string subscriptionI } } - /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get unsupported vm size for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. + /// VM Size name. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response GetManagedUnsupportedVmSize(string subscriptionId, string location, string vmSize, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); + Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); - using var message = CreateListRequest(subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizeRequest(subscriptionId, location, vmSize); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ManagedVmSizesResult value = default; + ServiceFabricManagedUnsupportedVmSize value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); + value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -120,7 +128,7 @@ public Response List(string subscriptionId, AzureLocation } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string vmSize) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizesRequestUri(string subscriptionId, string location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -128,13 +136,12 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes/", false); - uri.AppendPath(vmSize, true); + uri.AppendPath("/managedUnsupportedVMSizes", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string vmSize) + internal HttpMessage CreateGetManagedUnsupportedVmSizesRequest(string subscriptionId, string location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -145,8 +152,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat uri.AppendPath(subscriptionId, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); uri.AppendPath(location, true); - uri.AppendPath("/managedUnsupportedVMSizes/", false); - uri.AppendPath(vmSize, true); + uri.AppendPath("/managedUnsupportedVMSizes", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -154,27 +160,26 @@ internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation locat return message; } - /// Get unsupported vm size for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// 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, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetManagedUnsupportedVmSizesAsync(string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateGetRequest(subscriptionId, location, vmSize); + using var message = CreateGetManagedUnsupportedVmSizesRequest(subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - ServiceFabricManagedUnsupportedVmSize value = default; + ManagedVmSizesResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); + value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -182,27 +187,26 @@ public async Task> GetAsync(stri } } - /// Get unsupported vm size for Service Fabric Managed Clusters. - /// The customer subscription identifier. + /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. - /// VM Size name. /// 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, AzureLocation location, string vmSize, CancellationToken cancellationToken = default) + /// or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetManagedUnsupportedVmSizes(string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(vmSize, nameof(vmSize)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateGetRequest(subscriptionId, location, vmSize); + using var message = CreateGetManagedUnsupportedVmSizesRequest(subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - ServiceFabricManagedUnsupportedVmSize value = default; + ManagedVmSizesResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedUnsupportedVmSize.DeserializeServiceFabricManagedUnsupportedVmSize(document.RootElement); + value = ManagedVmSizesResult.DeserializeManagedVmSizesResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -210,7 +214,7 @@ public Response Get(string subscriptionId } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, AzureLocation location) + internal RequestUriBuilder CreateGetManagedUnsupportedVmSizesNextPageRequestUri(string nextLink, string subscriptionId, string location) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -218,7 +222,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, AzureLocation location) + internal HttpMessage CreateGetManagedUnsupportedVmSizesNextPageRequest(string nextLink, string subscriptionId, string location) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -234,17 +238,18 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> GetManagedUnsupportedVmSizesNextPageAsync(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, subscriptionId, location); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -262,17 +267,18 @@ public async Task> ListNextPageAsync(string nextL /// Get the lists of unsupported vm sizes for Service Fabric Managed Clusters. /// The URL to the next page of results. - /// The customer subscription identifier. + /// The ID of the target subscription. The value must be an UUID. /// The location for the cluster code versions. This is different from cluster location. /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, AzureLocation location, CancellationToken cancellationToken = default) + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response GetManagedUnsupportedVmSizesNextPage(string nextLink, string subscriptionId, string location, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(location, nameof(location)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, location); + using var message = CreateGetManagedUnsupportedVmSizesNextPageRequest(nextLink, subscriptionId, location); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs index 1b2c284ea8e5..7776f44c54d1 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypeSkusRestOperations.cs @@ -25,18 +25,18 @@ internal partial class NodeTypeSkusRestOperations /// Initializes a new instance of NodeTypeSkusRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public NodeTypeSkusRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateGetAvailableSkusRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -53,7 +53,7 @@ internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string re return uri; } - internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateGetAvailableSkusRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -77,21 +77,21 @@ internal HttpMessage CreateListRequest(string subscriptionId, string resourceGro } /// Get a Service Fabric node type supported SKUs. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> GetAvailableSkusAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -108,21 +108,21 @@ public async Task> ListAsync(string subscription } /// Get a Service Fabric node type supported SKUs. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response List(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response GetAvailableSkus(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -138,7 +138,7 @@ public Response List(string subscriptionId, string resour } } - internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateGetAvailableSkusNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -146,7 +146,7 @@ internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string return uri; } - internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateGetAvailableSkusNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -162,14 +162,14 @@ internal HttpMessage CreateListNextPageRequest(string nextLink, string subscript /// Get a Service Fabric node type supported SKUs. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> GetAvailableSkusNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -177,7 +177,7 @@ public async Task> ListNextPageAsync(string next Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -195,14 +195,14 @@ public async Task> ListNextPageAsync(string next /// Get a Service Fabric node type supported SKUs. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response GetAvailableSkusNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNull(nextLink, nameof(nextLink)); Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); @@ -210,7 +210,7 @@ public Response ListNextPage(string nextLink, string subs Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateGetAvailableSkusNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs index dd4e1bb607d6..49e9cf63bc16 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/NodeTypesRestOperations.cs @@ -25,18 +25,18 @@ internal partial class NodeTypesRestOperations /// Initializes a new instance of NodeTypesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public NodeTypesRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } - internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -46,12 +46,13 @@ internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscrip uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/nodeTypes", false); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, string resourceGroupName, string clusterName) + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -64,7 +65,8 @@ internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, s uri.AppendPath(resourceGroupName, true); uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); - uri.AppendPath("/nodeTypes", false); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -72,65 +74,73 @@ internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, s return message; } - /// Gets all Node types of the specified managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the node type. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> ListByManagedClustersAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: { - NodeTypeListResult value = default; + ServiceFabricManagedNodeTypeData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - /// Gets all Node types of the specified managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Get a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. + /// The name of the node type. /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response ListByManagedClusters(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: { - NodeTypeListResult value = default; + ServiceFabricManagedNodeTypeData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); return Response.FromValue(value, message.Response); } + case 404: + return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -142,16 +152,15 @@ internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Post; + request.Method = RequestMethod.Put; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -162,7 +171,694 @@ internal HttpMessage CreateRestartRequest(string subscriptionId, string resource uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/restart", false); + 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 or update a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The node type resource. + /// 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 clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or update a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The node type resource. + /// 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 clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(data, nameof(data)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, 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(patch, ModelSerializationExtensions.WireOptions); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the configuration of a node type of a given managed cluster, only updating tags. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The parameters to update the node type configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the configuration of a node type of a given managed cluster, only updating tags. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// The parameters to update the node type configuration. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(patch, nameof(patch)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete a Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + 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 Service Fabric node type of a given managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListByManagedClustersRequestUri(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListByManagedClustersRequest(string subscriptionId, string resourceGroupName, string clusterName) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets all Node types of the specified managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByManagedClustersAsync(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NodeTypeListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets all Node types of the specified managed cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByManagedClusters(string subscriptionId, string resourceGroupName, string clusterName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + + using var message = CreateListByManagedClustersRequest(subscriptionId, resourceGroupName, clusterName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NodeTypeListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = NodeTypeListResult.DeserializeNodeTypeListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeallocateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deallocate", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeallocateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deallocate", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for deallocate action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeallocateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for deallocate action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Deallocate(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeallocateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deleteNode", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/deleteNode", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for delete action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteNodeAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for delete action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response DeleteNode(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateRedeployRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/redeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateRedeployRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/redeploy", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for redeploy action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task RedeployAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the cluster resource. + /// The name of the node type. + /// parameters for redeploy action. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Redeploy(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateRedeployRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/reimage", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReimageRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + 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.ServiceFabric/managedClusters/", false); + uri.AppendPath(clusterName, true); + uri.AppendPath("/nodeTypes/", false); + uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/reimage", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -174,16 +870,16 @@ internal HttpMessage CreateRestartRequest(string subscriptionId, string resource return message; } - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for restart action. + /// parameters for reimage action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task RestartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task ReimageAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -191,11 +887,10 @@ public async Task RestartAsync(string subscriptionId, string resourceG Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -203,16 +898,16 @@ public async Task RestartAsync(string subscriptionId, string resourceG } } - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for restart action. + /// parameters for reimage action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Restart(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Reimage(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -220,11 +915,10 @@ public Response Restart(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -232,7 +926,7 @@ public Response Restart(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateRestartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -244,12 +938,12 @@ internal RequestUriBuilder CreateReimageRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/reimage", false); + uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateReimageRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateRestartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -264,7 +958,7 @@ internal HttpMessage CreateReimageRequest(string subscriptionId, string resource uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/reimage", false); + uri.AppendPath("/restart", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -276,16 +970,16 @@ internal HttpMessage CreateReimageRequest(string subscriptionId, string resource return message; } - /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for reimage action. + /// parameters for restart action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task ReimageAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task RestartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -293,11 +987,10 @@ public async Task ReimageAsync(string subscriptionId, string resourceG Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -305,16 +998,16 @@ public async Task ReimageAsync(string subscriptionId, string resourceG } } - /// Reimages one or more nodes on the node type. It will disable the fabric nodes, trigger a reimage on the VMs and activate the nodes back again. - /// The customer subscription identifier. - /// The name of the resource group. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for reimage action. + /// parameters for restart action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Reimage(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Restart(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -322,11 +1015,10 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateReimageRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateRestartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -334,7 +1026,7 @@ public Response Reimage(string subscriptionId, string resourceGroupName, string } } - internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal RequestUriBuilder CreateStartRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -346,12 +1038,12 @@ internal RequestUriBuilder CreateDeleteNodeRequestUri(string subscriptionId, str uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/deleteNode", false); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) + internal HttpMessage CreateStartRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -366,7 +1058,7 @@ internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resou uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); - uri.AppendPath("/deleteNode", false); + uri.AppendPath("/start", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -378,16 +1070,16 @@ internal HttpMessage CreateDeleteNodeRequest(string subscriptionId, string resou return message; } - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for delete action. + /// parameters for start action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task DeleteNodeAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public async Task StartAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -395,11 +1087,10 @@ public async Task DeleteNodeAsync(string subscriptionId, string resour Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -407,16 +1098,16 @@ public async Task DeleteNodeAsync(string subscriptionId, string resour } } - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// parameters for delete action. + /// parameters for start action. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response DeleteNode(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public Response Start(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -424,11 +1115,10 @@ public Response DeleteNode(string subscriptionId, string resourceGroupName, stri Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); Argument.AssertNotNull(content, nameof(content)); - using var message = CreateDeleteNodeRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); + using var message = CreateStartRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -436,7 +1126,7 @@ public Response DeleteNode(string subscriptionId, string resourceGroupName, stri } } - internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateStartFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -448,15 +1138,16 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/startFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateStartFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Get; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -467,80 +1158,75 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/startFaultSimulation", false); 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(faultSimulationContentWrapper, ModelSerializationExtensions.WireOptions); + request.Content = content; _userAgent.Apply(message); return message; } - /// Get a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task StartFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, faultSimulationContentWrapper); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedNodeTypeData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); - value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - /// Get a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Starts a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. + /// parameters describing the fault simulation. /// The cancellation token to use. - /// , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response StartFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); - using var message = CreateGetRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateStartFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, faultSimulationContentWrapper); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: - { - ServiceFabricManagedNodeTypeData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); - value = ServiceFabricManagedNodeTypeData.DeserializeServiceFabricManagedNodeTypeData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((ServiceFabricManagedNodeTypeData)null, message.Response); + case 202: + return message.Response; default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) + internal RequestUriBuilder CreateStopFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -552,15 +1238,16 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/stopFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data) + internal HttpMessage CreateStopFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Put; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -571,39 +1258,39 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/stopFaultSimulation", false); 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; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Create or update a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The node type resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + public async Task StopFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -611,28 +1298,27 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } } - /// Create or update a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Stops a fault simulation on the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The node type resource. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypeData data, CancellationToken cancellationToken = default) + public Response StopFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(data, nameof(data)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, data); + using var message = CreateStopFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: return message.Response; default: @@ -640,7 +1326,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, } } - internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + internal RequestUriBuilder CreateGetFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -652,15 +1338,16 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/getFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch) + internal HttpMessage CreateGetFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Patch; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -671,76 +1358,85 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/getFaultSimulation", false); 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(patch, ModelSerializationExtensions.WireOptions); - request.Content = content; + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; _userAgent.Apply(message); return message; } - /// Update the configuration of a node type of a given managed cluster, only updating tags. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The parameters to update the node type configuration. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task UpdateAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + public async Task> GetFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulation value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Update the configuration of a node type of a given managed cluster, only updating tags. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets a fault simulation by the simulationId. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. - /// The parameters to update the node type configuration. + /// parameter with fault simulation id. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, ServiceFabricManagedNodeTypePatch patch, CancellationToken cancellationToken = default) + public Response GetFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, FaultSimulationIdContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(content, nameof(content)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, patch); + using var message = CreateGetFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName, content); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - return message.Response; + { + FaultSimulation value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulation.DeserializeFaultSimulation(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal RequestUriBuilder CreateListFaultSimulationRequestUri(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); @@ -752,15 +1448,16 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); return uri; } - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + internal HttpMessage CreateListFaultSimulationRequest(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) { var message = _pipeline.CreateMessage(); var request = message.Request; - request.Method = RequestMethod.Delete; + request.Method = RequestMethod.Post; var uri = new RawRequestUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/subscriptions/", false); @@ -771,6 +1468,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(clusterName, true); uri.AppendPath("/nodeTypes/", false); uri.AppendPath(nodeTypeName, true); + uri.AppendPath("/listFaultSimulation", false); uri.AppendQuery("api-version", _apiVersion, true); request.Uri = uri; request.Headers.Add("Accept", "application/json"); @@ -778,57 +1476,63 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG return message; } - /// Delete a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public async Task> ListFaultSimulationAsync(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } } - /// Delete a Service Fabric node type of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// Gets the list of recent fault simulations for the node type. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the node type. /// 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 clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + public Response ListFaultSimulation(string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); + using var message = CreateListFaultSimulationRequest(subscriptionId, resourceGroupName, clusterName, nodeTypeName); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { case 200: - case 202: - case 204: - return message.Response; + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } default: throw new RequestFailedException(message.Response); } @@ -858,8 +1562,8 @@ internal HttpMessage CreateListByManagedClustersNextPageRequest(string nextLink, /// Gets all Node types of the specified managed cluster. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -889,8 +1593,8 @@ public async Task> ListByManagedClustersNextPageAsy /// Gets all Node types of the specified managed cluster. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The cancellation token to use. /// , , or is null. @@ -917,5 +1621,93 @@ public Response ListByManagedClustersNextPage(string nextLin throw new RequestFailedException(message.Response); } } + + internal RequestUriBuilder CreateListFaultSimulationNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListFaultSimulationNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName) + { + 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; + } + + /// Gets the list of recent fault simulations for the node type. + /// 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. + /// The name of the cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> ListFaultSimulationNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the list of recent fault simulations for the node type. + /// 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. + /// The name of the cluster resource. + /// The name of the node type. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response ListFaultSimulationNextPage(string nextLink, string subscriptionId, string resourceGroupName, string clusterName, string nodeTypeName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(clusterName, nameof(clusterName)); + Argument.AssertNotNullOrEmpty(nodeTypeName, nameof(nodeTypeName)); + + using var message = CreateListFaultSimulationNextPageRequest(nextLink, subscriptionId, resourceGroupName, clusterName, nodeTypeName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + FaultSimulationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = FaultSimulationListResult.DeserializeFaultSimulationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationResultsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationResultsRestOperations.cs new file mode 100644 index 000000000000..b033ef044bbf --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationResultsRestOperations.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class OperationResultsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationResultsRestOperations. + /// 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 OperationResultsRestOperations(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-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string operationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperationResults/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string operationId) + { + 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("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperationResults/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get long running operation result. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// 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, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get long running operation result. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// 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, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationStatusRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationStatusRestOperations.cs new file mode 100644 index 000000000000..25b7afe5e718 --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationStatusRestOperations.cs @@ -0,0 +1,129 @@ +// 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.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class OperationStatusRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationStatusRestOperations. + /// 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 OperationStatusRestOperations(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-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, AzureLocation location, string operationId) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, AzureLocation location, string operationId) + { + 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("/providers/Microsoft.ServiceFabric/locations/", false); + uri.AppendPath(location, true); + uri.AppendPath("/managedClusterOperations/", false); + uri.AppendPath(operationId, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get long running operation status. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// 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, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LongRunningOperationResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = LongRunningOperationResult.DeserializeLongRunningOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get long running operation status. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// operation identifier. + /// 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, AzureLocation location, string operationId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(operationId, nameof(operationId)); + + using var message = CreateGetRequest(subscriptionId, location, operationId); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LongRunningOperationResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = LongRunningOperationResult.DeserializeLongRunningOperationResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationsRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationsRestOperations.cs new file mode 100644 index 000000000000..2b297ac70ffe --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/OperationsRestOperations.cs @@ -0,0 +1,173 @@ +// 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.ServiceFabricManagedClusters.Models; + +namespace Azure.ResourceManager.ServiceFabricManagedClusters +{ + internal partial class OperationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of OperationsRestOperations. + /// 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 OperationsRestOperations(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-03-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateListRequestUri() + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.ServiceFabric/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest() + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.ServiceFabric/operations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The cancellation token to use. + public async Task> ListAsync(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The cancellation token to use. + public Response List(CancellationToken cancellationToken = default) + { + using var message = CreateListRequest(); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink) + { + 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; + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public async Task> ListNextPageAsync(string nextLink, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + + using var message = CreateListNextPageRequest(nextLink); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions, cancellationToken).ConfigureAwait(false); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Get the list of available Service Fabric resource provider API operations. + /// The URL to the next page of results. + /// The cancellation token to use. + /// is null. + public Response ListNextPage(string nextLink, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + + using var message = CreateListNextPageRequest(nextLink); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + OperationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream, ModelSerializationExtensions.JsonDocumentOptions); + value = OperationListResult.DeserializeOperationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs index 24d70faa8dc8..8e07e995b535 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/RestOperations/ServicesRestOperations.cs @@ -25,14 +25,14 @@ internal partial class ServicesRestOperations /// Initializes a new instance of ServicesRestOperations. /// The HTTP pipeline for sending and receiving REST requests and responses. /// The application id to use for user agent. - /// server parameter. - /// Api Version. + /// Service host. + /// The API version to use for this operation. /// or is null. public ServicesRestOperations(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 ?? "2024-09-01-preview"; + _apiVersion = apiVersion ?? "2025-03-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -44,7 +44,7 @@ internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string res uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -65,7 +65,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -79,8 +79,8 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou } /// Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -114,8 +114,8 @@ public async Task> GetAsync(string sub } /// Get a Service Fabric service resource created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -156,7 +156,7 @@ internal RequestUriBuilder CreateCreateOrUpdateRequestUri(string subscriptionId, uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -177,7 +177,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -195,8 +195,8 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r } /// Create or update a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -226,8 +226,8 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re } /// Create or update a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -264,7 +264,7 @@ internal RequestUriBuilder CreateUpdateRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -285,7 +285,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -303,8 +303,8 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG } /// Updates the tags of a service resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -338,8 +338,8 @@ public async Task> UpdateAsync(string } /// Updates the tags of a service resource of a given managed cluster. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -380,7 +380,7 @@ internal RequestUriBuilder CreateDeleteRequestUri(string subscriptionId, string uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -401,7 +401,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -415,8 +415,8 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG } /// Delete a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -435,7 +435,6 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -445,8 +444,8 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr } /// Delete a Service Fabric managed service resource with the specified name. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The name of the service resource in the format of {applicationName}~{serviceName}. @@ -465,7 +464,6 @@ public Response Delete(string subscriptionId, string resourceGroupName, string c _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { - case 200: case 202: case 204: return message.Response; @@ -482,7 +480,7 @@ internal RequestUriBuilder CreateListByApplicationsRequestUri(string subscriptio uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -502,7 +500,7 @@ internal HttpMessage CreateListByApplicationsRequest(string subscriptionId, stri uri.AppendPath(subscriptionId, true); uri.AppendPath("/resourceGroups/", false); uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.ServiceFabric/managedclusters/", false); + uri.AppendPath("/providers/Microsoft.ServiceFabric/managedClusters/", false); uri.AppendPath(clusterName, true); uri.AppendPath("/applications/", false); uri.AppendPath(applicationName, true); @@ -515,8 +513,8 @@ internal HttpMessage CreateListByApplicationsRequest(string subscriptionId, stri } /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -546,8 +544,8 @@ public async Task> ListByApplicationsAsync(string } /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -600,8 +598,8 @@ internal HttpMessage CreateListByApplicationsNextPageRequest(string nextLink, st /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. @@ -633,8 +631,8 @@ public async Task> ListByApplicationsNextPageAsync /// Gets all service resources created or in the process of being created in the Service Fabric managed application resource. /// The URL to the next page of results. - /// The customer subscription identifier. - /// The name of the resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. /// The name of the cluster resource. /// The name of the application resource. /// The cancellation token to use. diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs index 059dab1723da..37f00cc1b983 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_CreateOrUpdate + /// ApplicationResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_CreateOrUpdate + /// ApplicationResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation CreateOrUpd /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task> Get /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(string appl /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications /// /// /// Operation Id - /// Applications_List + /// ApplicationResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications /// /// /// Operation Id - /// Applications_List + /// ApplicationResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetAll(Cancella /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string applicationName, Ca /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string applicationName, CancellationToken c /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs index fecb0c1cc29f..837f0fd41091 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.Serialization.cs @@ -243,12 +243,12 @@ internal static ServiceFabricManagedApplicationData DeserializeServiceFabricMana systemData, tags ?? new ChangeTrackingDictionary(), location, - identity, provisioningState, version, parameters ?? new ChangeTrackingDictionary(), upgradePolicy, managedIdentities ?? new ChangeTrackingList(), + identity, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs index 2a875e2e4af5..202514061bec 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationData.cs @@ -66,25 +66,24 @@ public ServiceFabricManagedApplicationData(AzureLocation location) : base(locati /// The systemData. /// The tags. /// The location. - /// Describes the managed identities for an Azure resource. /// The current deployment or provisioning state, which only appears in the response. /// /// The version of the application type as defined in the application manifest. /// This name must be the full Arm Resource ID for the referenced application type version. - /// /// /// List of application parameters with overridden values from their default values specified in the application manifest. /// Describes the policy for a monitored application upgrade. /// List of user assigned identities for the application, each mapped to a friendly name. + /// Describes the managed identities for an Azure resource. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ManagedServiceIdentity identity, string provisioningState, string version, IDictionary parameters, ApplicationUpgradePolicy upgradePolicy, IList managedIdentities, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ServiceFabricManagedApplicationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string provisioningState, string version, IDictionary parameters, ApplicationUpgradePolicy upgradePolicy, IList managedIdentities, ManagedServiceIdentity identity, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Identity = identity; ProvisioningState = provisioningState; Version = version; Parameters = parameters; UpgradePolicy = upgradePolicy; ManagedIdentities = managedIdentities; + Identity = identity; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -93,14 +92,11 @@ internal ServiceFabricManagedApplicationData() { } - /// Describes the managed identities for an Azure resource. - public ManagedServiceIdentity Identity { get; set; } /// The current deployment or provisioning state, which only appears in the response. public string ProvisioningState { get; } /// /// The version of the application type as defined in the application manifest. /// This name must be the full Arm Resource ID for the referenced application type version. - /// /// public string Version { get; set; } /// List of application parameters with overridden values from their default values specified in the application manifest. @@ -109,5 +105,7 @@ internal ServiceFabricManagedApplicationData() public ApplicationUpgradePolicy UpgradePolicy { get; set; } /// List of user assigned identities for the application, each mapped to a friendly name. public IList ManagedIdentities { get; } + /// Describes the managed identities for an Azure resource. + public ManagedServiceIdentity Identity { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs index c0e1f5dbfcb6..660dd857eb45 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationResource.cs @@ -31,7 +31,7 @@ public partial class ServiceFabricManagedApplicationResource : ArmResource /// The applicationName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}"; return new ResourceIdentifier(resourceId); } @@ -40,7 +40,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applications"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applications"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationResource() @@ -102,15 +102,15 @@ public virtual ServiceFabricManagedServiceCollection GetServiceFabricManagedServ /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -133,15 +133,15 @@ public virtual async Task> GetServ /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -164,15 +164,15 @@ public virtual Response GetServiceFabricMan /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,15 +204,15 @@ public virtual async Task> Get /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(Cancellatio /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Delete + /// ApplicationResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -286,15 +286,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Delete + /// ApplicationResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -328,15 +328,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Update + /// ApplicationResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -370,15 +370,15 @@ public virtual async Task> Upd /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Update + /// ApplicationResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -420,7 +420,7 @@ public virtual Response Update(ServiceF /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -462,7 +462,7 @@ public virtual async Task ReadUpgradeAsync(WaitUntil waitUntil, Ca /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -492,19 +492,19 @@ public virtual ArmOperation ReadUpgrade(WaitUntil waitUntil, CancellationToken c } /// - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade /// /// /// Operation Id - /// Applications_StartRollback + /// Applications_ResumeUpgrade /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -513,15 +513,19 @@ public virtual ArmOperation ReadUpgrade(WaitUntil waitUntil, CancellationToken c /// /// /// 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 parameters for resuming an application upgrade. /// The cancellation token to use. - public virtual async Task StartRollbackAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); scope.Start(); try { - var response = await _serviceFabricManagedApplicationApplicationsRestClient.StartRollbackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -534,19 +538,19 @@ public virtual async Task StartRollbackAsync(WaitUntil waitUntil, } /// - /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. + /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade /// /// /// Operation Id - /// Applications_StartRollback + /// Applications_ResumeUpgrade /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -555,15 +559,19 @@ public virtual async Task StartRollbackAsync(WaitUntil waitUntil, /// /// /// 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 parameters for resuming an application upgrade. /// The cancellation token to use. - public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken cancellationToken = default) + /// is null. + public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) { - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); scope.Start(); try { - var response = _serviceFabricManagedApplicationApplicationsRestClient.StartRollback(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -576,19 +584,19 @@ public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken } /// - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback /// /// /// Operation Id - /// Applications_ResumeUpgrade + /// Applications_StartRollback /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -597,19 +605,15 @@ public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken /// /// /// 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 parameters for resuming an application upgrade. /// The cancellation token to use. - /// is null. - public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public virtual async Task StartRollbackAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); scope.Start(); try { - var response = await _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgradeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedApplicationApplicationsRestClient.StartRollbackAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(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; @@ -622,19 +626,19 @@ public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, } /// - /// Send a request to resume the current application upgrade. This will resume the application upgrade from where it was paused. + /// Send a request to start a rollback of the current application upgrade. This will start rolling back the application to the previous version. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/resumeUpgrade + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/startRollback /// /// /// Operation Id - /// Applications_ResumeUpgrade + /// Applications_StartRollback /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -643,19 +647,15 @@ public virtual async Task ResumeUpgradeAsync(WaitUntil waitUntil, /// /// /// 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 parameters for resuming an application upgrade. /// The cancellation token to use. - /// is null. - public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeApplicationUpgradeContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation StartRollback(WaitUntil waitUntil, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.ResumeUpgrade"); + using var scope = _serviceFabricManagedApplicationApplicationsClientDiagnostics.CreateScope("ServiceFabricManagedApplicationResource.StartRollback"); scope.Start(); try { - var response = _serviceFabricManagedApplicationApplicationsRestClient.ResumeUpgrade(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateResumeUpgradeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedApplicationApplicationsRestClient.StartRollback(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedApplicationApplicationsClientDiagnostics, Pipeline, _serviceFabricManagedApplicationApplicationsRestClient.CreateStartRollbackRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -672,15 +672,15 @@ public virtual ArmOperation ResumeUpgrade(WaitUntil waitUntil, RuntimeResumeAppl /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -734,15 +734,15 @@ public virtual async Task> Add /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -796,15 +796,15 @@ public virtual Response AddTag(string k /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -853,15 +853,15 @@ public virtual async Task> Set /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -910,15 +910,15 @@ public virtual Response SetTags(IDictio /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -970,15 +970,15 @@ public virtual async Task> Rem /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs index 0e58fb49da28..73d37518ceb5 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_CreateOrUpdate + /// ApplicationTypeResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -107,15 +107,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_CreateOrUpdate + /// ApplicationTypeResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -158,15 +158,15 @@ public virtual ArmOperation CreateO /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -203,15 +203,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -248,15 +248,15 @@ public virtual Response Get(string /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes /// /// /// Operation Id - /// ApplicationTypes_List + /// ApplicationTypeResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -278,15 +278,15 @@ public virtual AsyncPageable GetAll /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes /// /// /// Operation Id - /// ApplicationTypes_List + /// ApplicationTypeResource_List /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -308,15 +308,15 @@ public virtual Pageable GetAll(Canc /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -351,15 +351,15 @@ public virtual async Task> ExistsAsync(string applicationTypeName /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -394,15 +394,15 @@ public virtual Response Exists(string applicationTypeName, CancellationTok /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -439,15 +439,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs index 5ce658a99c6b..40d605a876eb 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeResource.cs @@ -31,7 +31,7 @@ public partial class ServiceFabricManagedApplicationTypeResource : ArmResource /// The applicationTypeName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationTypeName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}"; return new ResourceIdentifier(resourceId); } @@ -40,7 +40,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationTypeData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applicationTypes"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applicationTypes"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationTypeResource() @@ -102,15 +102,15 @@ public virtual ServiceFabricManagedApplicationTypeVersionCollection GetServiceFa /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -133,15 +133,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -164,15 +164,15 @@ public virtual Response GetS /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,15 +204,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Delete + /// ApplicationTypeResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -286,15 +286,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Delete + /// ApplicationTypeResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -328,15 +328,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Update + /// ApplicationTypeResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -370,15 +370,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Update + /// ApplicationTypeResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -412,15 +412,15 @@ public virtual Response Update(Serv /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -474,15 +474,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -536,15 +536,15 @@ public virtual Response AddTag(stri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -593,15 +593,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -650,15 +650,15 @@ public virtual Response SetTags(IDi /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -710,15 +710,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs index 62d8d8ef5c70..a3a494f8d3a3 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_CreateOrUpdate + /// ApplicationTypeVersionResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_CreateOrUpdate + /// ApplicationTypeVersionResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions /// /// /// Operation Id - /// ApplicationTypeVersions_ListByApplicationTypes + /// ApplicationTypeVersionResource_ListByApplicationTypes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions /// /// /// Operation Id - /// ApplicationTypeVersions_ListByApplicationTypes + /// ApplicationTypeVersionResource_ListByApplicationTypes /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string version, Cancellati /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string version, CancellationToken cancellat /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs index 1aa2bfc2e67b..6e62d07ed77a 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedApplicationTypeVersionResource.cs @@ -32,7 +32,7 @@ public partial class ServiceFabricManagedApplicationTypeVersionResource : ArmRes /// The version. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationTypeName, string version) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}"; return new ResourceIdentifier(resourceId); } @@ -41,7 +41,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedApplicationTypeVersionData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applicationTypes/versions"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applicationTypes/versions"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedApplicationTypeVersionResource() @@ -96,15 +96,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -136,15 +136,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -176,15 +176,15 @@ public virtual Response Get( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Delete + /// ApplicationTypeVersionResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -218,15 +218,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Delete + /// ApplicationTypeVersionResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -260,15 +260,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Update + /// ApplicationTypeVersionResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -302,15 +302,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Update + /// ApplicationTypeVersionResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -344,15 +344,15 @@ public virtual Response Upda /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -406,15 +406,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -468,15 +468,15 @@ public virtual Response AddT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -525,15 +525,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -582,15 +582,15 @@ public virtual Response SetT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -642,15 +642,15 @@ public virtual async Task /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version} /// /// /// Operation Id - /// ApplicationTypeVersions_Get + /// ApplicationTypeVersionResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs index 6df765faf4f4..de543cc4096c 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterCollection.cs @@ -61,11 +61,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// ManagedClusters_CreateOrUpdate + /// ManagedCluster_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -110,11 +110,11 @@ public virtual async Task> Cre /// /// /// Operation Id - /// ManagedClusters_CreateOrUpdate + /// ManagedCluster_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -159,11 +159,11 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -204,11 +204,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -249,11 +249,11 @@ public virtual Response Get(string clusterN /// /// /// Operation Id - /// ManagedClusters_ListByResourceGroup + /// ManagedCluster_ListByResourceGroup /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -279,11 +279,11 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Operation Id - /// ManagedClusters_ListByResourceGroup + /// ManagedCluster_ListByResourceGroup /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -309,11 +309,11 @@ public virtual Pageable GetAll(Cancellation /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -352,11 +352,11 @@ public virtual async Task> ExistsAsync(string clusterName, Cancel /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -395,11 +395,11 @@ public virtual Response Exists(string clusterName, CancellationToken cance /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -440,11 +440,11 @@ public virtual async Task> /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs index acf7a23ab26b..92fd0232334b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.Serialization.cs @@ -38,13 +38,13 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); if (options.Format != "W" && Optional.IsDefined(ETag)) { writer.WritePropertyName("etag"u8); - writer.WriteStringValue(ETag.Value.ToString()); + writer.WriteStringValue(ETag); } + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(DnsName)) @@ -62,35 +62,23 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("ipv4Address"u8); writer.WriteStringValue(IPv4Address.ToString()); } - if (options.Format != "W" && Optional.IsDefined(ClusterId)) + if (options.Format != "W" && Optional.IsDefined(Uuid)) { writer.WritePropertyName("clusterId"u8); - writer.WriteStringValue(ClusterId.Value); + writer.WriteStringValue(Uuid.Value); } if (options.Format != "W" && Optional.IsDefined(ClusterState)) { writer.WritePropertyName("clusterState"u8); writer.WriteStringValue(ClusterState.Value.ToString()); } - if (options.Format != "W" && Optional.IsCollectionDefined(ClusterCertificateThumbprints)) + if (options.Format != "W" && Optional.IsCollectionDefined(Any)) { writer.WritePropertyName("clusterCertificateThumbprints"u8); writer.WriteStartArray(); - foreach (var item in ClusterCertificateThumbprints) + foreach (var item in Any) { - if (item == null) - { - writer.WriteNullValue(); - continue; - } -#if NET6_0_OR_GREATER - writer.WriteRawValue(item); -#else - using (JsonDocument document = JsonDocument.Parse(item, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif + writer.WriteStringValue(item); } writer.WriteEndArray(); } @@ -309,6 +297,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("allocatedOutboundPorts"u8); writer.WriteNumberValue(AllocatedOutboundPorts.Value); } + if (Optional.IsDefined(VmImage)) + { + writer.WritePropertyName("VMImage"u8); + writer.WriteStringValue(VmImage); + } writer.WriteEndObject(); } @@ -332,8 +325,8 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC { return null; } + string etag = default; ServiceFabricManagedClustersSku sku = default; - ETag? etag = default; IDictionary tags = default; AzureLocation location = default; ResourceIdentifier id = default; @@ -345,7 +338,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC IPAddress ipv4Address = default; Guid? clusterId = default; ServiceFabricManagedClusterState? clusterState = default; - IReadOnlyList clusterCertificateThumbprints = default; + IReadOnlyList clusterCertificateThumbprints = default; int? clientConnectionPort = default; int? httpGatewayConnectionPort = default; string adminUserName = default; @@ -381,22 +374,19 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC bool? enableHttpGatewayExclusiveAuthMode = default; AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope = default; int? allocatedOutboundPorts = default; + string vmImage = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sku"u8)) + if (property.NameEquals("etag"u8)) { - sku = ServiceFabricManagedClustersSku.DeserializeServiceFabricManagedClustersSku(property.Value, options); + etag = property.Value.GetString(); continue; } - if (property.NameEquals("etag"u8)) + if (property.NameEquals("sku"u8)) { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - etag = new ETag(property.Value.GetString()); + sku = ServiceFabricManagedClustersSku.DeserializeServiceFabricManagedClustersSku(property.Value, options); continue; } if (property.NameEquals("tags"u8)) @@ -472,7 +462,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("clusterId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -494,17 +484,10 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(BinaryData.FromString(item.GetRawText())); - } + array.Add(item.GetString()); } clusterCertificateThumbprints = array; continue; @@ -778,7 +761,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("publicIPPrefixId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -787,7 +770,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("publicIPv6PrefixId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -796,7 +779,7 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC } if (property0.NameEquals("ddosProtectionPlanId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -848,6 +831,11 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC allocatedOutboundPorts = property0.Value.GetInt32(); continue; } + if (property0.NameEquals("VMImage"u8)) + { + vmImage = property0.Value.GetString(); + continue; + } } continue; } @@ -864,13 +852,12 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC systemData, tags ?? new ChangeTrackingDictionary(), location, - sku, dnsName, fqdn, ipv4Address, clusterId, clusterState, - clusterCertificateThumbprints ?? new ChangeTrackingList(), + clusterCertificateThumbprints ?? new ChangeTrackingList(), clientConnectionPort, httpGatewayConnectionPort, adminUserName, @@ -906,7 +893,9 @@ internal static ServiceFabricManagedClusterData DeserializeServiceFabricManagedC enableHttpGatewayExclusiveAuthMode, autoGeneratedDomainNameLabelScope, allocatedOutboundPorts, + vmImage, etag, + sku, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs index 090cde8c1615..30a5c6195856 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterData.cs @@ -17,7 +17,6 @@ namespace Azure.ResourceManager.ServiceFabricManagedClusters /// /// A class representing the ServiceFabricManagedCluster data model. /// The managed cluster resource - /// /// public partial class ServiceFabricManagedClusterData : TrackedResourceData { @@ -61,8 +60,7 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana { Argument.AssertNotNull(sku, nameof(sku)); - Sku = sku; - ClusterCertificateThumbprints = new ChangeTrackingList(); + Any = new ChangeTrackingList(); LoadBalancingRules = new ChangeTrackingList(); NetworkSecurityRules = new ChangeTrackingList(); Clients = new ChangeTrackingList(); @@ -71,6 +69,7 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana IPTags = new ChangeTrackingList(); AuxiliarySubnets = new ChangeTrackingList(); ServiceEndpoints = new ChangeTrackingList(); + Sku = sku; } /// Initializes a new instance of . @@ -80,13 +79,12 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// The systemData. /// The tags. /// The location. - /// The sku of the managed cluster. /// The cluster dns name. /// The fully qualified domain name associated with the public load balancer of the cluster. /// The IPv4 address associated with the public load balancer of the cluster. - /// A service generated unique identifier for the cluster resource. + /// A service generated unique identifier for the cluster resource. /// The current state of the cluster. - /// List of thumbprints of the cluster certificates. + /// List of thumbprints of the cluster certificates. /// The port used for client connections to the cluster. /// The port used for HTTP connections to the cluster. /// VM admin user name. @@ -99,10 +97,7 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// The list of custom fabric settings to configure the cluster. /// The provisioning state of the managed cluster resource. /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. /// List of add-on features to enable on the cluster. /// Enables automatic OS upgrade for node types created using OS images with version 'latest'. The default value for this setting is false. @@ -125,17 +120,18 @@ public ServiceFabricManagedClusterData(AzureLocation location, ServiceFabricMana /// If true, token-based authentication is not allowed on the HttpGatewayEndpoint. This is required to support TLS versions 1.3 and above. If token-based authentication is used, HttpGatewayTokenAuthConnectionPort must be defined. /// This property is the entry point to using a public CA cert for your cluster cert. It specifies the level of reuse allowed for the custom FQDN created, matching the subject of the public CA cert. /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. - /// Azure resource etag. + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",. + /// The sku of the managed cluster. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, ServiceFabricManagedClustersSku sku, string dnsName, string fqdn, IPAddress ipv4Address, Guid? clusterId, ServiceFabricManagedClusterState? clusterState, IReadOnlyList clusterCertificateThumbprints, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IList loadBalancingRules, bool? isRdpAccessAllowed, IList networkSecurityRules, IList clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IList fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IList addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy, bool? isIPv6Enabled, string subnetId, IList ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IList auxiliarySubnets, IList serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, int? allocatedOutboundPorts, ETag? etag, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) + internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, IDictionary tags, AzureLocation location, string dnsName, string fqdn, IPAddress ipv4Address, Guid? uuid, ServiceFabricManagedClusterState? clusterState, IReadOnlyList any, int? clientConnectionPort, int? httpGatewayConnectionPort, string adminUserName, string adminPassword, IList loadBalancingRules, bool? isRdpAccessAllowed, IList networkSecurityRules, IList clients, ManagedClusterAzureActiveDirectory azureActiveDirectory, IList fabricSettings, ServiceFabricManagedResourceProvisioningState? provisioningState, string clusterCodeVersion, ManagedClusterUpgradeMode? clusterUpgradeMode, ManagedClusterUpgradeCadence? clusterUpgradeCadence, IList addOnFeatures, bool? isAutoOSUpgradeEnabled, bool? hasZoneResiliency, ApplicationTypeVersionsCleanupPolicy applicationTypeVersionsCleanupPolicy, bool? isIPv6Enabled, string subnetId, IList ipTags, IPAddress ipv6Address, bool? isServicePublicIPEnabled, IList auxiliarySubnets, IList serviceEndpoints, ZonalUpdateMode? zonalUpdateMode, bool? useCustomVnet, ResourceIdentifier publicIPPrefixId, ResourceIdentifier publicIPv6PrefixId, ResourceIdentifier ddosProtectionPlanId, ManagedClusterUpgradePolicy upgradeDescription, int? httpGatewayTokenAuthConnectionPort, bool? isHttpGatewayExclusiveAuthModeEnabled, AutoGeneratedDomainNameLabelScope? autoGeneratedDomainNameLabelScope, int? allocatedOutboundPorts, string vmImage, string etag, ServiceFabricManagedClustersSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData, tags, location) { - Sku = sku; DnsName = dnsName; Fqdn = fqdn; IPv4Address = ipv4Address; - ClusterId = clusterId; + Uuid = uuid; ClusterState = clusterState; - ClusterCertificateThumbprints = clusterCertificateThumbprints; + Any = any; ClientConnectionPort = clientConnectionPort; HttpGatewayConnectionPort = httpGatewayConnectionPort; AdminUserName = adminUserName; @@ -171,7 +167,9 @@ internal ServiceFabricManagedClusterData(ResourceIdentifier id, string name, Res IsHttpGatewayExclusiveAuthModeEnabled = isHttpGatewayExclusiveAuthModeEnabled; AutoGeneratedDomainNameLabelScope = autoGeneratedDomainNameLabelScope; AllocatedOutboundPorts = allocatedOutboundPorts; + VmImage = vmImage; ETag = etag; + Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -180,18 +178,6 @@ internal ServiceFabricManagedClusterData() { } - /// The sku of the managed cluster. - internal ServiceFabricManagedClustersSku Sku { get; set; } - /// Sku Name. - public ServiceFabricManagedClustersSkuName? SkuName - { - get => Sku is null ? default(ServiceFabricManagedClustersSkuName?) : Sku.Name; - set - { - Sku = value.HasValue ? new ServiceFabricManagedClustersSku(value.Value) : null; - } - } - /// The cluster dns name. public string DnsName { get; set; } /// The fully qualified domain name associated with the public load balancer of the cluster. @@ -199,40 +185,11 @@ public ServiceFabricManagedClustersSkuName? SkuName /// The IPv4 address associated with the public load balancer of the cluster. public IPAddress IPv4Address { get; } /// A service generated unique identifier for the cluster resource. - public Guid? ClusterId { get; } + public Guid? Uuid { get; } /// The current state of the cluster. public ServiceFabricManagedClusterState? ClusterState { get; } - /// - /// List of thumbprints of the cluster certificates. - /// - /// 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 IReadOnlyList ClusterCertificateThumbprints { get; } + /// List of thumbprints of the cluster certificates. + public IReadOnlyList Any { get; } /// The port used for client connections to the cluster. public int? ClientConnectionPort { get; set; } /// The port used for HTTP connections to the cluster. @@ -257,10 +214,7 @@ public ServiceFabricManagedClustersSkuName? SkuName public ServiceFabricManagedResourceProvisioningState? ProvisioningState { get; } /// The Service Fabric runtime version of the cluster. This property is required when **clusterUpgradeMode** is set to 'Manual'. To get list of available Service Fabric versions for new clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of available version for existing clusters use **availableClusterVersions**. public string ClusterCodeVersion { get; set; } - /// - /// The upgrade mode of the cluster when new Service Fabric runtime version is available. - /// - /// + /// The upgrade mode of the cluster when new Service Fabric runtime version is available. public ManagedClusterUpgradeMode? ClusterUpgradeMode { get; set; } /// Indicates when new cluster runtime version upgrades will be applied after they are released. By default is Wave0. Only applies when **clusterUpgradeMode** is set to 'Automatic'. public ManagedClusterUpgradeCadence? ClusterUpgradeCadence { get; set; } @@ -316,7 +270,20 @@ public int? MaxUnusedVersionsToKeep public AutoGeneratedDomainNameLabelScope? AutoGeneratedDomainNameLabelScope { get; set; } /// The number of outbound ports allocated for SNAT for each node in the backend pool of the default load balancer. The default value is 0 which provides dynamic port allocation based on pool size. public int? AllocatedOutboundPorts { get; set; } - /// Azure resource etag. - public ETag? ETag { get; } + /// The VM image the node types are configured with. This property controls the Service Fabric component packages to be used for the cluster. Allowed values are: 'Windows'. The default value is 'Windows'. + public string VmImage { get; set; } + /// If eTag is provided in the response body, it may also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.",. + public string ETag { get; } + /// The sku of the managed cluster. + internal ServiceFabricManagedClustersSku Sku { get; set; } + /// Sku Name. + public ServiceFabricManagedClustersSkuName? SkuName + { + get => Sku is null ? default(ServiceFabricManagedClustersSkuName?) : Sku.Name; + set + { + Sku = value.HasValue ? new ServiceFabricManagedClustersSku(value.Value) : null; + } + } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs index 6feca7d956ef..4b51515864da 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedClusterResource.cs @@ -10,6 +10,7 @@ using System.Globalization; using System.Threading; using System.Threading.Tasks; +using Autorest.CSharp.Core; using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.Resources; @@ -39,10 +40,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ManagedClustersRestOperations _serviceFabricManagedClusterManagedClustersRestClient; private readonly ClientDiagnostics _managedAzResiliencyStatusClientDiagnostics; private readonly ManagedAzResiliencyStatusRestOperations _managedAzResiliencyStatusRestClient; - private readonly ClientDiagnostics _managedMaintenanceWindowStatusClientDiagnostics; - private readonly ManagedMaintenanceWindowStatusRestOperations _managedMaintenanceWindowStatusRestClient; private readonly ClientDiagnostics _managedApplyMaintenanceWindowClientDiagnostics; private readonly ManagedApplyMaintenanceWindowRestOperations _managedApplyMaintenanceWindowRestClient; + private readonly ClientDiagnostics _managedMaintenanceWindowStatusClientDiagnostics; + private readonly ManagedMaintenanceWindowStatusRestOperations _managedMaintenanceWindowStatusRestClient; private readonly ServiceFabricManagedClusterData _data; /// Gets the resource type for the operations. @@ -72,10 +73,10 @@ internal ServiceFabricManagedClusterResource(ArmClient client, ResourceIdentifie _serviceFabricManagedClusterManagedClustersRestClient = new ManagedClustersRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, serviceFabricManagedClusterManagedClustersApiVersion); _managedAzResiliencyStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); _managedAzResiliencyStatusRestClient = new ManagedAzResiliencyStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _managedMaintenanceWindowStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _managedApplyMaintenanceWindowClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); _managedApplyMaintenanceWindowRestClient = new ManagedApplyMaintenanceWindowRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _managedMaintenanceWindowStatusClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ServiceFabricManagedClusters", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _managedMaintenanceWindowStatusRestClient = new ManagedMaintenanceWindowStatusRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -102,142 +103,142 @@ internal static void ValidateResourceId(ResourceIdentifier id) throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); } - /// Gets a collection of ServiceFabricManagedApplicationTypeResources in the ServiceFabricManagedCluster. - /// An object representing collection of ServiceFabricManagedApplicationTypeResources and their operations over a ServiceFabricManagedApplicationTypeResource. - public virtual ServiceFabricManagedApplicationTypeCollection GetServiceFabricManagedApplicationTypes() + /// Gets a collection of ServiceFabricManagedApplicationResources in the ServiceFabricManagedCluster. + /// An object representing collection of ServiceFabricManagedApplicationResources and their operations over a ServiceFabricManagedApplicationResource. + public virtual ServiceFabricManagedApplicationCollection GetServiceFabricManagedApplications() { - return GetCachedClient(client => new ServiceFabricManagedApplicationTypeCollection(client, Id)); + return GetCachedClient(client => new ServiceFabricManagedApplicationCollection(client, Id)); } /// - /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application type name resource. + /// The name of the application resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetServiceFabricManagedApplicationTypeAsync(string applicationTypeName, CancellationToken cancellationToken = default) + public virtual async Task> GetServiceFabricManagedApplicationAsync(string applicationName, CancellationToken cancellationToken = default) { - return await GetServiceFabricManagedApplicationTypes().GetAsync(applicationTypeName, cancellationToken).ConfigureAwait(false); + return await GetServiceFabricManagedApplications().GetAsync(applicationName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. + /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applicationTypes/{applicationTypeName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName} /// /// /// Operation Id - /// ApplicationTypes_Get + /// ApplicationResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application type name resource. + /// The name of the application resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetServiceFabricManagedApplicationType(string applicationTypeName, CancellationToken cancellationToken = default) + public virtual Response GetServiceFabricManagedApplication(string applicationName, CancellationToken cancellationToken = default) { - return GetServiceFabricManagedApplicationTypes().Get(applicationTypeName, cancellationToken); + return GetServiceFabricManagedApplications().Get(applicationName, cancellationToken); } - /// Gets a collection of ServiceFabricManagedApplicationResources in the ServiceFabricManagedCluster. - /// An object representing collection of ServiceFabricManagedApplicationResources and their operations over a ServiceFabricManagedApplicationResource. - public virtual ServiceFabricManagedApplicationCollection GetServiceFabricManagedApplications() + /// Gets a collection of ServiceFabricManagedApplicationTypeResources in the ServiceFabricManagedCluster. + /// An object representing collection of ServiceFabricManagedApplicationTypeResources and their operations over a ServiceFabricManagedApplicationTypeResource. + public virtual ServiceFabricManagedApplicationTypeCollection GetServiceFabricManagedApplicationTypes() { - return GetCachedClient(client => new ServiceFabricManagedApplicationCollection(client, Id)); + return GetCachedClient(client => new ServiceFabricManagedApplicationTypeCollection(client, Id)); } /// - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application resource. + /// The name of the application type name resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual async Task> GetServiceFabricManagedApplicationAsync(string applicationName, CancellationToken cancellationToken = default) + public virtual async Task> GetServiceFabricManagedApplicationTypeAsync(string applicationTypeName, CancellationToken cancellationToken = default) { - return await GetServiceFabricManagedApplications().GetAsync(applicationName, cancellationToken).ConfigureAwait(false); + return await GetServiceFabricManagedApplicationTypes().GetAsync(applicationTypeName, cancellationToken).ConfigureAwait(false); } /// - /// Get a Service Fabric managed application resource created or in the process of being created in the Service Fabric cluster resource. + /// Get a Service Fabric application type name resource created or in the process of being created in the Service Fabric managed cluster resource. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applicationTypes/{applicationTypeName} /// /// /// Operation Id - /// Applications_Get + /// ApplicationTypeResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource - /// + /// /// /// /// - /// The name of the application resource. + /// The name of the application type name resource. /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. + /// is null. + /// is an empty string, and was expected to be non-empty. [ForwardsClientCalls] - public virtual Response GetServiceFabricManagedApplication(string applicationName, CancellationToken cancellationToken = default) + public virtual Response GetServiceFabricManagedApplicationType(string applicationTypeName, CancellationToken cancellationToken = default) { - return GetServiceFabricManagedApplications().Get(applicationName, cancellationToken); + return GetServiceFabricManagedApplicationTypes().Get(applicationTypeName, cancellationToken); } /// Gets a collection of ServiceFabricManagedNodeTypeResources in the ServiceFabricManagedCluster. @@ -256,11 +257,11 @@ public virtual ServiceFabricManagedNodeTypeCollection GetServiceFabricManagedNod /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -287,11 +288,11 @@ public virtual async Task> GetSer /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -318,11 +319,11 @@ public virtual Response GetServiceFabricMa /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -358,11 +359,11 @@ public virtual async Task> GetAsyn /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -398,11 +399,11 @@ public virtual Response Get(CancellationTok /// /// /// Operation Id - /// ManagedClusters_Delete + /// ManagedCluster_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -440,11 +441,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// ManagedClusters_Delete + /// ManagedCluster_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -482,11 +483,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// ManagedClusters_Update + /// ManagedCluster_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -524,11 +525,11 @@ public virtual async Task> UpdateA /// /// /// Operation Id - /// ManagedClusters_Update + /// ManagedCluster_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -558,30 +559,38 @@ public virtual Response Update(ServiceFabri } /// - /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// Gets a fault simulation by the simulationId. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation /// /// /// Operation Id - /// managedAzResiliencyStatus_Get + /// ManagedClusters_GetFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// + /// parameter with fault simulation id. /// The cancellation token to use. - public virtual async Task> GetManagedAzResiliencyStatusAsync(CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) { - using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); scope.Start(); try { - var response = await _managedAzResiliencyStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _serviceFabricManagedClusterManagedClustersRestClient.GetFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -592,30 +601,38 @@ public virtual async Task> GetManagedAzResil } /// - /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// Gets a fault simulation by the simulationId. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getFaultSimulation /// /// /// Operation Id - /// managedAzResiliencyStatus_Get + /// ManagedClusters_GetFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// + /// parameter with fault simulation id. /// The cancellation token to use. - public virtual Response GetManagedAzResiliencyStatus(CancellationToken cancellationToken = default) + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) { - using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetFaultSimulation"); scope.Start(); try { - var response = _managedAzResiliencyStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _serviceFabricManagedClusterManagedClustersRestClient.GetFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); return response; } catch (Exception e) @@ -626,30 +643,274 @@ public virtual Response GetManagedAzResiliencyStatus( } /// - /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// Gets the list of recent fault simulations for the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation /// /// /// Operation Id - /// managedMaintenanceWindowStatus_Get + /// ManagedClusters_ListFaultSimulation /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview + /// + /// + /// Resource + /// /// /// /// /// The cancellation token to use. - public virtual async Task> GetManagedMaintenanceWindowStatuAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) { - using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "ServiceFabricManagedClusterResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recent fault simulations for the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/listFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedClusterManagedClustersRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, "ServiceFabricManagedClusterResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); scope.Start(); try { - var response = await _managedMaintenanceWindowStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _serviceFabricManagedClusterManagedClustersRestClient.StartFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/startFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedClusterManagedClustersRestClient.StartFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedClusterManagedClustersRestClient.StopFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/stopFaultSimulation + /// + /// + /// Operation Id + /// ManagedClusters_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedClusterManagedClustersClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedClusterManagedClustersRestClient.StopFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedClusterManagedClustersClientDiagnostics, Pipeline, _serviceFabricManagedClusterManagedClustersRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus + /// + /// + /// Operation Id + /// ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetManagedAzResiliencyStatusAsync(CancellationToken cancellationToken = default) + { + using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); + scope.Start(); + try + { + var response = await _managedAzResiliencyStatusRestClient.GetManagedAzResiliencyStatusAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -660,30 +921,30 @@ public virtual async Task> GetManagedMa } /// - /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// Action to get Az Resiliency Status of all the Base resources constituting Service Fabric Managed Clusters. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getazresiliencystatus /// /// /// Operation Id - /// managedMaintenanceWindowStatus_Get + /// ManagedAzResiliencyStatus_GetManagedAzResiliencyStatus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// /// The cancellation token to use. - public virtual Response GetManagedMaintenanceWindowStatu(CancellationToken cancellationToken = default) + public virtual Response GetManagedAzResiliencyStatus(CancellationToken cancellationToken = default) { - using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + using var scope = _managedAzResiliencyStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedAzResiliencyStatus"); scope.Start(); try { - var response = _managedMaintenanceWindowStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _managedAzResiliencyStatusRestClient.GetManagedAzResiliencyStatus(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); return response; } catch (Exception e) @@ -702,11 +963,11 @@ public virtual Response GetManagedMaintenanceWin /// /// /// Operation Id - /// managedApplyMaintenanceWindow_Post + /// ManagedApplyMaintenanceWindow_Post /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -736,11 +997,11 @@ public virtual async Task PostManagedApplyMaintenanceWindowAsync(Cance /// /// /// Operation Id - /// managedApplyMaintenanceWindow_Post + /// ManagedApplyMaintenanceWindow_Post /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -761,6 +1022,74 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc } } + /// + /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// + /// + /// Operation Id + /// ManagedMaintenanceWindowStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetManagedMaintenanceWindowStatuAsync(CancellationToken cancellationToken = default) + { + using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + scope.Start(); + try + { + var response = await _managedMaintenanceWindowStatusRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Action to get Maintenance Window Status of the Service Fabric Managed Clusters. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/getMaintenanceWindowStatus + /// + /// + /// Operation Id + /// ManagedMaintenanceWindowStatus_Get + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// + /// The cancellation token to use. + public virtual Response GetManagedMaintenanceWindowStatu(CancellationToken cancellationToken = default) + { + using var scope = _managedMaintenanceWindowStatusClientDiagnostics.CreateScope("ServiceFabricManagedClusterResource.GetManagedMaintenanceWindowStatu"); + scope.Start(); + try + { + var response = _managedMaintenanceWindowStatusRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Add a tag to the current resource. /// @@ -770,11 +1099,11 @@ public virtual Response PostManagedApplyMaintenanceWindow(CancellationToken canc /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -832,11 +1161,11 @@ public virtual async Task> AddTagA /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -894,11 +1223,11 @@ public virtual Response AddTag(string key, /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -951,11 +1280,11 @@ public virtual async Task> SetTags /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -1008,11 +1337,11 @@ public virtual Response SetTags(IDictionary /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -1068,11 +1397,11 @@ public virtual async Task> RemoveT /// /// /// Operation Id - /// ManagedClusters_Get + /// ManagedCluster_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs index 0b72e38e5e2e..9c1d9a9d939b 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeCollection.cs @@ -60,11 +60,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// NodeTypes_CreateOrUpdate + /// NodeType_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -109,11 +109,11 @@ public virtual async Task> Cr /// /// /// Operation Id - /// NodeTypes_CreateOrUpdate + /// NodeType_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -158,11 +158,11 @@ public virtual ArmOperation CreateOrUpdate /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -203,11 +203,11 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -248,11 +248,11 @@ public virtual Response Get(string nodeTyp /// /// /// Operation Id - /// NodeTypes_ListByManagedClusters + /// NodeType_ListByManagedClusters /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -278,11 +278,11 @@ public virtual AsyncPageable GetAllAsync(C /// /// /// Operation Id - /// NodeTypes_ListByManagedClusters + /// NodeType_ListByManagedClusters /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -308,11 +308,11 @@ public virtual Pageable GetAll(Cancellatio /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -351,11 +351,11 @@ public virtual async Task> ExistsAsync(string nodeTypeName, Cance /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -394,11 +394,11 @@ public virtual Response Exists(string nodeTypeName, CancellationToken canc /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -439,11 +439,11 @@ public virtual async Task /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs index b12c57517740..83f136723729 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.Serialization.cs @@ -37,11 +37,6 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } base.JsonModelWriteCore(writer, options); - if (Optional.IsDefined(Sku)) - { - writer.WritePropertyName("sku"u8); - writer.WriteObjectValue(Sku, options); - } if (Optional.IsCollectionDefined(Tags)) { writer.WritePropertyName("tags"u8); @@ -53,6 +48,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndObject(); } + if (Optional.IsDefined(Sku)) + { + writer.WritePropertyName("sku"u8); + writer.WriteObjectValue(Sku, options); + } writer.WritePropertyName("properties"u8); writer.WriteStartObject(); if (Optional.IsDefined(IsPrimary)) @@ -292,6 +292,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("securityType"u8); writer.WriteStringValue(SecurityType.Value.ToString()); } + if (Optional.IsDefined(SecurityEncryptionType)) + { + writer.WritePropertyName("securityEncryptionType"u8); + writer.WriteStringValue(SecurityEncryptionType.Value.ToString()); + } if (Optional.IsDefined(IsSecureBootEnabled)) { writer.WritePropertyName("secureBootEnabled"u8); @@ -367,6 +372,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsDefined(ZoneBalance)) + { + writer.WritePropertyName("zoneBalance"u8); + writer.WriteBooleanValue(ZoneBalance.Value); + } writer.WriteEndObject(); } @@ -390,8 +400,8 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged { return null; } - NodeTypeSku sku = default; IDictionary tags = default; + NodeTypeSku sku = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; @@ -434,6 +444,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged ResourceIdentifier subnetId = default; IList vmSetupActions = default; ServiceFabricManagedClusterSecurityType? securityType = default; + SecurityEncryptionType? securityEncryptionType = default; bool? secureBootEnabled = default; bool? enableNodePublicIP = default; bool? enableNodePublicIPv6 = default; @@ -446,19 +457,11 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged IList additionalNetworkInterfaceConfigurations = default; string computerNamePrefix = default; IList vmApplications = default; + bool? zoneBalance = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { - if (property.NameEquals("sku"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - sku = NodeTypeSku.DeserializeNodeTypeSku(property.Value, options); - continue; - } if (property.NameEquals("tags"u8)) { if (property.Value.ValueKind == JsonValueKind.Null) @@ -473,6 +476,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged tags = dictionary; continue; } + if (property.NameEquals("sku"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + sku = NodeTypeSku.DeserializeNodeTypeSku(property.Value, options); + continue; + } if (property.NameEquals("id"u8)) { id = new ResourceIdentifier(property.Value.GetString()); @@ -822,7 +834,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("vmImageResourceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -831,7 +843,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("subnetId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -861,6 +873,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged securityType = new ServiceFabricManagedClusterSecurityType(property0.Value.GetString()); continue; } + if (property0.NameEquals("securityEncryptionType"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + securityEncryptionType = new SecurityEncryptionType(property0.Value.GetString()); + continue; + } if (property0.NameEquals("secureBootEnabled"u8)) { if (property0.Value.ValueKind == JsonValueKind.Null) @@ -890,7 +911,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("vmSharedGalleryImageId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -899,7 +920,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("natGatewayId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -931,7 +952,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("serviceArtifactReferenceId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -940,7 +961,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged } if (property0.NameEquals("dscpConfigurationId"u8)) { - if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } @@ -980,6 +1001,15 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged vmApplications = array; continue; } + if (property0.NameEquals("zoneBalance"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + zoneBalance = property0.Value.GetBoolean(); + continue; + } } continue; } @@ -994,7 +1024,6 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged name, type, systemData, - sku, isPrimary, vmInstanceCount, dataDiskSizeGB, @@ -1033,6 +1062,7 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged subnetId, vmSetupActions ?? new ChangeTrackingList(), securityType, + securityEncryptionType, secureBootEnabled, enableNodePublicIP, enableNodePublicIPv6, @@ -1045,7 +1075,9 @@ internal static ServiceFabricManagedNodeTypeData DeserializeServiceFabricManaged additionalNetworkInterfaceConfigurations ?? new ChangeTrackingList(), computerNamePrefix, vmApplications ?? new ChangeTrackingList(), + zoneBalance, tags ?? new ChangeTrackingDictionary(), + sku, serializedAdditionalRawData); } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs index dc5a7d9c304d..90b3c64382aa 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeData.cs @@ -74,9 +74,8 @@ public ServiceFabricManagedNodeTypeData() /// The name. /// The resourceType. /// The systemData. - /// The node type sku. /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. /// Disk size for the managed disk attached to the vms on the node type in GBs. /// Managed data disk type. Specifies the storage account type for the managed disk. /// Managed data disk letter. It can not use the reserved letter C or D and it can not change after created. @@ -112,8 +111,9 @@ public ServiceFabricManagedNodeTypeData() /// Indicates the resource id of the vm image. This parameter is used for custom vm image. /// Indicates the resource id of the subnet for the node type. /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. /// Specifies whether each node is allocated its own public IPv6 address. This is only supported on secondary node types with custom Load Balancers. /// Indicates the resource id of the vm shared galleries image. This parameter is used for custom vm image. @@ -125,11 +125,12 @@ public ServiceFabricManagedNodeTypeData() /// Specifies the settings for any additional secondary network interfaces to attach to the node type. /// Specifies the computer name prefix. Limited to 9 characters. If specified, allows for a longer name to be specified for the node type name. /// Specifies the gallery applications that should be made available to the underlying VMSS. - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + /// Resource tags. + /// The node type sku. /// Keeps track of any properties unknown to the library. - internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NodeTypeSku sku, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, IDictionary tags, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, bool? isPrimary, int? vmInstanceCount, int? dataDiskSizeInGB, ServiceFabricManagedDataDiskType? dataDiskType, string dataDiskLetter, IDictionary placementProperties, IDictionary capacities, EndpointRangeDescription applicationPorts, EndpointRangeDescription ephemeralPorts, string vmSize, string vmImagePublisher, string vmImageOffer, string vmImageSku, string vmImageVersion, IList vmSecrets, IList vmExtensions, VmManagedIdentity vmManagedIdentity, bool? isStateless, bool? hasMultiplePlacementGroups, IList frontendConfigurations, IList networkSecurityRules, IList additionalDataDisks, bool? isEncryptionAtHostEnabled, ServiceFabricManagedResourceProvisioningState? provisioningState, bool? isAcceleratedNetworkingEnabled, bool? useDefaultPublicLoadBalancer, bool? useTempDataDisk, bool? isOverProvisioningEnabled, IList zones, bool? isSpotVm, string hostGroupId, bool? useEphemeralOSDisk, string spotRestoreTimeout, SpotNodeVmEvictionPolicyType? evictionPolicy, ResourceIdentifier vmImageResourceId, ResourceIdentifier subnetId, IList vmSetupActions, ServiceFabricManagedClusterSecurityType? securityType, SecurityEncryptionType? securityEncryptionType, bool? isSecureBootEnabled, bool? isNodePublicIPEnabled, bool? isNodePublicIPv6Enabled, ResourceIdentifier vmSharedGalleryImageId, ResourceIdentifier natGatewayId, IList natConfigurations, VmImagePlan vmImagePlan, ResourceIdentifier serviceArtifactReferenceId, ResourceIdentifier dscpConfigurationId, IList additionalNetworkInterfaceConfigurations, string computerNamePrefix, IList vmApplications, bool? zoneBalance, IDictionary tags, NodeTypeSku sku, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { - Sku = sku; IsPrimary = isPrimary; VmInstanceCount = vmInstanceCount; DataDiskSizeInGB = dataDiskSizeInGB; @@ -168,6 +169,7 @@ internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, Re SubnetId = subnetId; VmSetupActions = vmSetupActions; SecurityType = securityType; + SecurityEncryptionType = securityEncryptionType; IsSecureBootEnabled = isSecureBootEnabled; IsNodePublicIPEnabled = isNodePublicIPEnabled; IsNodePublicIPv6Enabled = isNodePublicIPv6Enabled; @@ -180,15 +182,15 @@ internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, Re AdditionalNetworkInterfaceConfigurations = additionalNetworkInterfaceConfigurations; ComputerNamePrefix = computerNamePrefix; VmApplications = vmApplications; + ZoneBalance = zoneBalance; Tags = tags; + Sku = sku; _serializedAdditionalRawData = serializedAdditionalRawData; } - /// The node type sku. - public NodeTypeSku Sku { get; set; } /// Indicates the Service Fabric system services for the cluster will run on this node type. This setting cannot be changed once the node type is created. public bool? IsPrimary { get; set; } - /// The number of nodes in the node type. <br /><br />**Values:** <br />-1 - Use when auto scale rules are configured or sku.capacity is defined <br /> 0 - Not supported <br /> >0 - Use for manual scale. + /// The number of nodes in the node type. **Values:** -1 - Use when auto scale rules are configured or sku.capacity is defined 0 - Not supported >0 - Use for manual scale. public int? VmInstanceCount { get; set; } /// Disk size for the managed disk attached to the vms on the node type in GBs. public int? DataDiskSizeInGB { get; set; } @@ -221,13 +223,13 @@ internal ServiceFabricManagedNodeTypeData(ResourceIdentifier id, string name, Re /// Identities to assign to the virtual machine scale set under the node type. internal VmManagedIdentity VmManagedIdentity { get; set; } /// The list of user identities associated with the virtual machine scale set under the node type. Each entry will be an ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - public IList UserAssignedIdentities + public IList VmManagedIdentityArmId { get { if (VmManagedIdentity is null) VmManagedIdentity = new VmManagedIdentity(); - return VmManagedIdentity.UserAssignedIdentities; + return VmManagedIdentity.ArmId; } } @@ -271,9 +273,11 @@ public IList UserAssignedIdentities public ResourceIdentifier SubnetId { get; set; } /// Specifies the actions to be performed on the vms before bootstrapping the service fabric runtime. public IList VmSetupActions { get; } - /// Specifies the security type of the nodeType. Only Standard and TrustedLaunch are currently supported. + /// Specifies the security type of the nodeType. Supported values include Standard, TrustedLaunch and ConfidentialVM. public ServiceFabricManagedClusterSecurityType? SecurityType { get; set; } - /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch SecurityType. + /// Specifies the EncryptionType of the managed disk. It is set to DiskWithVMGuestState for encryption of the managed disk along with VMGuestState blob and VMGuestStateOnly for encryption of just the VMGuestState blob. Note: It can be set for only Confidential VMs. + public SecurityEncryptionType? SecurityEncryptionType { get; set; } + /// Specifies whether secure boot should be enabled on the nodeType. Can only be used with TrustedLaunch and ConfidentialVM SecurityType. public bool? IsSecureBootEnabled { get; set; } /// Specifies whether each node is allocated its own public IPv4 address. This is only supported on secondary node types with custom Load Balancers. public bool? IsNodePublicIPEnabled { get; set; } @@ -297,7 +301,11 @@ public IList UserAssignedIdentities public string ComputerNamePrefix { get; set; } /// Specifies the gallery applications that should be made available to the underlying VMSS. public IList VmApplications { get; } - /// Azure resource tags. + /// Setting this to true allows stateless node types to scale out without equal distribution across zones. + public bool? ZoneBalance { get; set; } + /// Resource tags. public IDictionary Tags { get; } + /// The node type sku. + public NodeTypeSku Sku { get; set; } } } diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs index 0a16fe386ec3..1a4bf5aa18f0 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedNodeTypeResource.cs @@ -104,11 +104,11 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -144,11 +144,11 @@ public virtual async Task> GetAsy /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -184,11 +184,11 @@ public virtual Response Get(CancellationTo /// /// /// Operation Id - /// NodeTypes_Delete + /// NodeType_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -226,11 +226,11 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Operation Id - /// NodeTypes_Delete + /// NodeType_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -268,11 +268,11 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Operation Id - /// NodeTypes_Update + /// NodeType_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -314,11 +314,11 @@ public virtual async Task> Up /// /// /// Operation Id - /// NodeTypes_Update + /// NodeType_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -352,19 +352,19 @@ public virtual ArmOperation Update(WaitUnt } /// - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate /// /// /// Operation Id - /// NodeTypes_Restart + /// NodeTypes_Deallocate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -373,19 +373,19 @@ public virtual ArmOperation Update(WaitUnt /// /// /// 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. - /// parameters for restart action. + /// parameters for deallocate action. /// The cancellation token to use. /// is null. - public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual async Task DeallocateAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Deallocate"); scope.Start(); try { - var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeallocateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -398,19 +398,19 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTy } /// - /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. + /// Deallocates one or more nodes on the node type. It will disable the fabric nodes, trigger a shutdown on the VMs and release them from the cluster. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deallocate /// /// /// Operation Id - /// NodeTypes_Restart + /// NodeTypes_Deallocate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -419,19 +419,203 @@ public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTy /// /// /// 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. - /// parameters for restart action. + /// parameters for deallocate action. /// The cancellation token to use. /// is null. - public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Deallocate(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Deallocate"); scope.Start(); try { - var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Deallocate(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeallocateRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// + /// + /// Operation Id + /// NodeTypes_DeleteNode + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters for delete action. + /// The cancellation token to use. + /// is null. + public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// + /// + /// Operation Id + /// NodeTypes_DeleteNode + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters for delete action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy + /// + /// + /// Operation Id + /// NodeTypes_Redeploy + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters for redeploy action. + /// The cancellation token to use. + /// is null. + public virtual async Task RedeployAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Redeploy"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RedeployAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Redeploys one or more nodes on the node type. It will disable the fabric nodes, trigger a shut down on the VMs, move them to a new node, and power them back on. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/redeploy + /// + /// + /// Operation Id + /// NodeTypes_Redeploy + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters for redeploy action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Redeploy(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Redeploy"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Redeploy(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRedeployRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -456,7 +640,7 @@ public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent c /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -502,7 +686,7 @@ public virtual async Task ReimageAsync(WaitUntil waitUntil, NodeTy /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -536,19 +720,19 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, NodeTypeActionContent c } /// - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart /// /// /// Operation Id - /// NodeTypes_DeleteNode + /// NodeTypes_Restart /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -557,19 +741,19 @@ public virtual ArmOperation Reimage(WaitUntil waitUntil, NodeTypeActionContent c /// /// /// 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. - /// parameters for delete action. + /// parameters for restart action. /// The cancellation token to use. /// is null. - public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual async Task RestartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); scope.Start(); try { - var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNodeAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.RestartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -582,19 +766,19 @@ public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, Nod } /// - /// Deletes one or more nodes on the node type. It will disable the fabric nodes, trigger a delete on the VMs and removes the state from the cluster. + /// Restarts one or more nodes on the node type. It will disable the fabric nodes, trigger a restart on the VMs and activate the nodes back again. /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart /// /// /// Operation Id - /// NodeTypes_DeleteNode + /// NodeTypes_Restart /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -603,19 +787,19 @@ public virtual async Task DeleteNodeAsync(WaitUntil waitUntil, Nod /// /// /// 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. - /// parameters for delete action. + /// parameters for restart action. /// The cancellation token to use. /// is null. - public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + public virtual ArmOperation Restart(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) { Argument.AssertNotNull(content, nameof(content)); - using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.DeleteNode"); + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Restart"); scope.Start(); try { - var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.DeleteNode(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); - var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateDeleteNodeRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Restart(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateRestartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -627,6 +811,426 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten } } + /// + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start + /// + /// + /// Operation Id + /// NodeTypes_Start + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters for start action. + /// The cancellation token to use. + /// is null. + public virtual async Task StartAsync(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Start"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StartAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts one or more nodes on the node type. It will trigger an allocation of the fabric node if needed and activate them. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/start + /// + /// + /// Operation Id + /// NodeTypes_Start + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters for start action. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation Start(WaitUntil waitUntil, NodeTypeActionContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.Start"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.Start(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(_serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual async Task> StartFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StartFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Starts a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/startFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StartFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameters describing the fault simulation. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StartFaultSimulation(WaitUntil waitUntil, FaultSimulationContentWrapper faultSimulationContentWrapper, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(faultSimulationContentWrapper, nameof(faultSimulationContentWrapper)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StartFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.StartFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStartFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, faultSimulationContentWrapper).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> StopFaultSimulationAsync(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.StopFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Stops a fault simulation on the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/stopFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_StopFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-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. + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual ArmOperation StopFaultSimulation(WaitUntil waitUntil, FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.StopFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.StopFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + var operation = new ServiceFabricManagedClustersArmOperation(new FaultSimulationOperationSource(), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateStopFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_GetFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual async Task> GetFaultSimulationAsync(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + var response = await _serviceFabricManagedNodeTypeNodeTypesRestClient.GetFaultSimulationAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets a fault simulation by the simulationId. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/getFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_GetFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// parameter with fault simulation id. + /// The cancellation token to use. + /// is null. + public virtual Response GetFaultSimulation(FaultSimulationIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics.CreateScope("ServiceFabricManagedNodeTypeResource.GetFaultSimulation"); + scope.Start(); + try + { + var response = _serviceFabricManagedNodeTypeNodeTypesRestClient.GetFaultSimulation(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetFaultSimulationAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + + /// + /// Gets the list of recent fault simulations for the node type. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/listFaultSimulation + /// + /// + /// Operation Id + /// NodeTypes_ListFaultSimulation + /// + /// + /// Default Api Version + /// 2025-03-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetFaultSimulation(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _serviceFabricManagedNodeTypeNodeTypesRestClient.CreateListFaultSimulationNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => FaultSimulation.DeserializeFaultSimulation(e), _serviceFabricManagedNodeTypeNodeTypesClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetFaultSimulation", "value", "nextLink", cancellationToken); + } + /// /// Get a Service Fabric node type supported SKUs. /// @@ -636,11 +1240,11 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten /// /// /// Operation Id - /// NodeTypeSkus_List + /// NodeTypeSkus_GetAvailableSkus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -648,8 +1252,8 @@ public virtual ArmOperation DeleteNode(WaitUntil waitUntil, NodeTypeActionConten /// An async collection of that may take multiple service requests to iterate over. public virtual AsyncPageable GetAvailableSkusAsync(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateGetAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateGetAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => NodeTypeAvailableSku.DeserializeNodeTypeAvailableSku(e), _nodeTypeSkusClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetAvailableSkus", "value", "nextLink", cancellationToken); } @@ -662,11 +1266,11 @@ public virtual AsyncPageable GetAvailableSkusAsync(Cancell /// /// /// Operation Id - /// NodeTypeSkus_List + /// NodeTypeSkus_GetAvailableSkus /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// @@ -674,8 +1278,8 @@ public virtual AsyncPageable GetAvailableSkusAsync(Cancell /// A collection of that may take multiple service requests to iterate over. public virtual Pageable GetAvailableSkus(CancellationToken cancellationToken = default) { - HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage FirstPageRequest(int? pageSizeHint) => _nodeTypeSkusRestClient.CreateGetAvailableSkusRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _nodeTypeSkusRestClient.CreateGetAvailableSkusNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name); return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => NodeTypeAvailableSku.DeserializeNodeTypeAvailableSku(e), _nodeTypeSkusClientDiagnostics, Pipeline, "ServiceFabricManagedNodeTypeResource.GetAvailableSkus", "value", "nextLink", cancellationToken); } @@ -688,11 +1292,11 @@ public virtual Pageable GetAvailableSkus(CancellationToken /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -750,11 +1354,11 @@ public virtual async Task> AddTag /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -812,11 +1416,11 @@ public virtual Response AddTag(string key, /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -869,11 +1473,11 @@ public virtual async Task> SetTag /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -926,11 +1530,11 @@ public virtual Response SetTags(IDictionar /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -986,11 +1590,11 @@ public virtual async Task> Remove /// /// /// Operation Id - /// NodeTypes_Get + /// NodeType_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs index 63ca0b196ff8..a79bd7357d9d 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceCollection.cs @@ -56,15 +56,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_CreateOrUpdate + /// ServiceResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -105,15 +105,15 @@ public virtual async Task> Cre /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_CreateOrUpdate + /// ServiceResource_CreateOrUpdate /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -154,15 +154,15 @@ public virtual ArmOperation CreateOrUpdate( /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -199,15 +199,15 @@ public virtual async Task> GetAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -244,15 +244,15 @@ public virtual Response Get(string serviceN /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services /// /// /// Operation Id - /// Services_ListByApplications + /// ServiceResource_ListByApplications /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -274,15 +274,15 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services /// /// /// Operation Id - /// Services_ListByApplications + /// ServiceResource_ListByApplications /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -304,15 +304,15 @@ public virtual Pageable GetAll(Cancellation /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -347,15 +347,15 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -390,15 +390,15 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -435,15 +435,15 @@ public virtual async Task> /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs index 710becbf7667..09c689cb7921 100644 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/Generated/ServiceFabricManagedServiceResource.cs @@ -32,7 +32,7 @@ public partial class ServiceFabricManagedServiceResource : ArmResource /// The serviceName. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string clusterName, string applicationName, string serviceName) { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName}"; + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName}"; return new ResourceIdentifier(resourceId); } @@ -41,7 +41,7 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ServiceFabricManagedServiceData _data; /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedclusters/applications/services"; + public static readonly ResourceType ResourceType = "Microsoft.ServiceFabric/managedClusters/applications/services"; /// Initializes a new instance of the class for mocking. protected ServiceFabricManagedServiceResource() @@ -96,15 +96,15 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -136,15 +136,15 @@ public virtual async Task> GetAsyn /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -176,15 +176,15 @@ public virtual Response Get(CancellationTok /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Delete + /// ServiceResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -218,15 +218,15 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Delete + /// ServiceResource_Delete /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -260,15 +260,15 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Update + /// ServiceResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -302,15 +302,15 @@ public virtual async Task> UpdateA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Update + /// ServiceResource_Update /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -344,15 +344,15 @@ public virtual Response Update(ServiceFabri /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -406,15 +406,15 @@ public virtual async Task> AddTagA /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -468,15 +468,15 @@ public virtual Response AddTag(string key, /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -525,15 +525,15 @@ public virtual async Task> SetTags /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -582,15 +582,15 @@ public virtual Response SetTags(IDictionary /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource @@ -642,15 +642,15 @@ public virtual async Task> RemoveT /// /// /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedclusters/{clusterName}/applications/{applicationName}/services/{serviceName} + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/applications/{applicationName}/services/{serviceName} /// /// /// Operation Id - /// Services_Get + /// ServiceResource_Get /// /// /// Default Api Version - /// 2024-09-01-preview + /// 2025-03-01-preview /// /// /// Resource diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md deleted file mode 100644 index 9cb67e35a1d0..000000000000 --- a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/src/autorest.md +++ /dev/null @@ -1,232 +0,0 @@ -# Generated code configuration - -Run `dotnet build /t:GenerateCode` to generate code. - -``` yaml - -azure-arm: true -csharp: true -library-name: ServiceFabricManagedClusters -namespace: Azure.ResourceManager.ServiceFabricManagedClusters -require: https://github.com/Azure/azure-rest-api-specs/blob/f17b769690a46d858134ee68ef0d89635083b560/specification/servicefabricmanagedclusters/resource-manager/readme.md -#tag: package-2024-09-preview -output-folder: $(this-folder)/Generated -clear-output-folder: true -sample-gen: - output-folder: $(this-folder)/../tests/Generated - clear-output-folder: true -skip-csproj: true -modelerfour: - flatten-payloads: false -use-model-reader-writer: true - -#mgmt-debug: -# show-serialized-names: true - -request-path-is-non-resource: -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/environments/{environment}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedClusterVersions/{clusterVersion} -- /subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/locations/{location}/managedUnsupportedVMSizes/{vmSize} - -format-by-name-rules: - 'tenantId': 'uuid' - 'ETag': 'etag' - 'location': 'azure-location' - '*Uri': 'Uri' - '*Uris': 'Uri' - -models-to-treat-empty-string-as-null: - - ManagedClusterSubnet - - NodeTypeFrontendConfiguration - - ServiceFabricManagedClusterData - - ServiceFabricManagedClusterVersion - - ServiceFabricManagedNodeTypeData - - VmManagedIdentity - -acronym-mapping: - CPU: Cpu - CPUs: Cpus - Os: OS - Ip: IP - Ips: IPs|ips - ID: Id - IDs: Ids - VM: Vm - VMs: Vms - Vmos: VmOS - VMScaleSet: VmScaleSet - DNS: Dns - VPN: Vpn - NAT: Nat - WAN: Wan - Ipv4: IPv4|ipv4 - Ipv6: IPv6|ipv6 - Ipsec: IPsec|ipsec - SSO: Sso - URI: Uri - Etag: ETag|etag - LRS: Lrs - SSD: Ssd - -override-operation-name: - managedAzResiliencyStatus_get: GetManagedAzResiliencyStatus - NodeTypeSkus_List: GetAvailableSkus - managedUnsupportedVMSizes_Get: GetManagedUnsupportedVmSize - managedUnsupportedVMSizes_List: GetManagedUnsupportedVmSizes - ManagedClusterVersion_GetByEnvironment: GetManagedClusterVersionByEnvironment - managedAzResiliencyStatus_Get: GetManagedAzResiliencyStatus - -rename-mapping: - ApplicationResource: ServiceFabricManagedApplication - ApplicationTypeResource: ServiceFabricManagedApplicationType - ApplicationTypeVersionResource: ServiceFabricManagedApplicationTypeVersion - ApplicationUserAssignedIdentity: ApplicationUserAssignedIdentityInfo - ManagedClusterCodeVersionResult: ServiceFabricManagedClusterVersion - ManagedClusterCodeVersionResult.properties.supportExpiryUtc: VersionSupportExpireOn - OsType: ServiceFabricManagedClusterOSType - ManagedCluster: ServiceFabricManagedCluster - ManagedCluster.properties.addonFeatures: AddOnFeatures - ManagedCluster.properties.allowRdpAccess: IsRdpAccessAllowed - ManagedCluster.properties.clusterCertificateThumbprints: -|any - ManagedCluster.properties.clusterId: -|uuid - ManagedCluster.properties.enableAutoOSUpgrade: IsAutoOSUpgradeEnabled - ManagedCluster.properties.enableIpv6: IsIPv6Enabled - ManagedCluster.properties.enableServicePublicIP: IsServicePublicIPEnabled - ManagedCluster.properties.ipv4Address: -|ip-address - ManagedCluster.properties.ipv6Address: -|ip-address - ManagedCluster.properties.zonalResiliency: HasZoneResiliency - ManagedCluster.properties.enableHttpGatewayExclusiveAuthMode: IsHttpGatewayExclusiveAuthModeEnabled - - Subnet: ManagedClusterSubnet - Subnet.enableIpv6: IsIPv6Enabled - Subnet.networkSecurityGroupId: -|arm-id - AzureActiveDirectory: ManagedClusterAzureActiveDirectory - ClientCertificate: ManagedClusterClientCertificate - ClientCertificate.thumbprint: -|any - ClientCertificate.issuerThumbprint: -|any - ClusterState: ServiceFabricManagedClusterState - ClusterUpgradeCadence: ManagedClusterUpgradeCadence - ClusterUpgradeMode: ManagedClusterUpgradeMode - SettingsSectionDescription: ClusterFabricSettingsSection - SettingsParameterDescription: ClusterFabricSettingsParameterDescription - IpTag: ManagedClusterIPTag - LoadBalancingRule: ManagedClusterLoadBalancingRule - NetworkSecurityRule: ServiceFabricManagedNetworkSecurityRule - Direction: ServiceFabricManagedNetworkSecurityRuleDirection - Access: ServiceFabricManagedNetworkTrafficAccess - ManagedResourceProvisioningState: ServiceFabricManagedResourceProvisioningState - ServiceEndpoint: ManagedClusterServiceEndpoint - ServiceEndpoint.locations: -|azure-location - NodeType: ServiceFabricManagedNodeType - NodeType.properties.dataDiskSizeGB: DataDiskSizeInGB - NodeType.properties.enableAcceleratedNetworking: IsAcceleratedNetworkingEnabled - NodeType.properties.enableEncryptionAtHost: IsEncryptionAtHostEnabled - NodeType.properties.enableOverProvisioning: IsOverProvisioningEnabled - NodeType.properties.multiplePlacementGroups: HasMultiplePlacementGroups - NodeType.properties.enableNodePublicIPv6: IsNodePublicIPv6Enabled - VmApplication : ServiceFabricManagedVmApplication - VmssDataDisk: NodeTypeVmssDataDisk - VmssDataDisk.diskSizeGB: DiskSizeInGB - VmssExtension: NodeTypeVmssExtension - VmssExtension.properties.enableAutomaticUpgrade: IsAutomaticUpgradeEnabled - VaultSecretGroup: NodeTypeVaultSecretGroup - VaultCertificate: NodeTypeVaultCertificate - DiskType: ServiceFabricManagedDataDiskType - FrontendConfiguration: NodeTypeFrontendConfiguration - FrontendConfiguration.loadBalancerBackendAddressPoolId: -|arm-id - FrontendConfiguration.loadBalancerInboundNatPoolId: -|arm-id - VmManagedIdentity.userAssignedIdentities: -|arm-id - NodeTypeActionParameters: NodeTypeActionContent - NodeTypeActionParameters.force: IsForced - ServiceResource: ServiceFabricManagedService - ServiceResourceProperties: ManagedServiceProperties - ServiceResourcePropertiesBase: ManagedServiceBaseProperties - ServiceCorrelation: ManagedServiceCorrelation - ServiceCorrelationScheme: ManagedServiceCorrelationScheme - ScalingPolicy: ManagedServiceScalingPolicy - ScalingMechanism: ManagedServiceScalingMechanism - ScalingTrigger: ManagedServiceScalingTrigger - MoveCost: ServiceFabricManagedServiceMoveCost - ApplicationUpgradePolicy.instanceCloseDelayDuration: InstanceCloseDelayDurationInSeconds - FailureAction: PolicyViolationCompensationAction - IPAddressType: NodeTypeFrontendConfigurationIPAddressType - ProbeProtocol: ManagedClusterLoadBalanceProbeProtocol - Protocol: ManagedClusterLoadBalancingRuleTransportProtocol - Partition: ManagedServicePartitionScheme - NsgProtocol: ServiceFabricManagedNsgProtocol - NsgProtocol.ah: AH - NodeTypeAvailableSku.resourceType: -|resource-type - PartitionInstanceCountScaleMechanism: PartitionInstanceCountScalingMechanism - PrivateEndpointNetworkPolicies: ManagedClusterSubnetPrivateEndpointNetworkPoliciesState - PrivateLinkServiceNetworkPolicies: ManagedClusterSubnetPrivateLinkServiceNetworkPoliciesState - ServiceLoadMetric: ManagedServiceLoadMetric - ServiceLoadMetricWeight: ManagedServiceLoadMetricWeight - ServicePackageActivationMode: ManagedServicePackageActivationMode - ServicePlacementPolicy: ManagedServicePlacementPolicy - ManagedVMSize: ServiceFabricManagedUnsupportedVmSize - AddRemoveIncrementalNamedPartitionScalingMechanism: NamedPartitionAddOrRemoveScalingMechanism - NodeType.properties.enableNodePublicIP: IsNodePublicIPEnabled - NodeType.properties.secureBootEnabled: IsSecureBootEnabled - EvictionPolicyType: SpotNodeVmEvictionPolicyType - ResourceAzStatus.resourceType: -|resource-type - SecurityType: ServiceFabricManagedClusterSecurityType - UpdateType: ServiceFabricManagedClusterUpdateType - ClusterHealthPolicy: ManagedClusterHealthPolicy - ClusterUpgradePolicy: ManagedClusterUpgradePolicy - ClusterUpgradeDeltaHealthPolicy: ManagedClusterUpgradeDeltaHealthPolicy - ClusterMonitoringPolicy: ManagedClusterMonitoringPolicy - PrivateIPAddressVersion: ServiceFabricManagedClusterPrivateIPAddressVersion - PublicIPAddressVersion: ServiceFabricManagedClusterPublicIPAddressVersion - IpConfiguration: ServiceFabricManagedClusterIPConfiguration - IpConfigurationPublicIPAddressConfiguration: ServiceFabricManagedClusterPublicIPAddressConfiguration - ManagedMaintenanceWindowStatus.lastWindowStatusUpdateAtUTC: LastWindowStatusUpdatedOn - ManagedMaintenanceWindowStatus.lastWindowStartTimeUTC: LastWindowStartOn - ManagedMaintenanceWindowStatus.lastWindowEndTimeUTC: LastWindowEndOn - -suppress-abstract-base-class: -- ManagedServiceProperties - -directive: - - remove-operation: OperationStatus_Get - - remove-operation: OperationResults_Get - - from: managedapplication.json - where: $.definitions - transform: > - $.HealthCheckWaitDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckStableDuration['x-ms-format'] = 'duration-constant'; - $.HealthCheckRetryTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeDomainTimeout['x-ms-format'] = 'duration-constant'; - $.UpgradeTimeout['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.replicaRestartWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.quorumLossWaitDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.standByReplicaKeepDuration['x-ms-format'] = 'duration-constant'; - $.StatefulServiceProperties.properties.servicePlacementTimeLimit['x-ms-format'] = 'duration-constant'; - - from: managedcluster.json - where: $.definitions - transform: > - $.ManagedClusterVersionDetails.properties.supportExpiryUtc['format'] = 'date-time'; - - from: nodetype.json - where: $.paths['/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'].patch - transform: > - $['responses'] = { - "200": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "202": { - "description": "The operation completed successfully.", - "schema": { - "$ref": "#/definitions/NodeType" - } - }, - "default": { - "description": "The detailed error response.", - "schema": { - "$ref": "#/definitions/ErrorModel" - } - } - } - reason: response status 202 missing -``` diff --git a/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml new file mode 100644 index 000000000000..062afa71325d --- /dev/null +++ b/sdk/servicefabricmanagedclusters/Azure.ResourceManager.ServiceFabricManagedClusters/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/servicefabricmanagedclusters/ServiceFabricManagedClusters.Management +commit: b9a8c9e8eb8998a222f126a005d1ab633f1daad9 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/storage/ci.yml b/sdk/storage/ci.yml index 2ca0501b60bd..6d83bf7eebb6 100644 --- a/sdk/storage/ci.yml +++ b/sdk/storage/ci.yml @@ -9,9 +9,17 @@ trigger: paths: include: - sdk/storage/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - sdk/storage/Azure.Storage.DataMovement.Blobs/ + exclude: + - sdk/storage/Azure.ResourceManager.Storage/ - 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/