internal CancelAllMediaOperationsResponse(string id, OperationStatus?status, string operationContext, ResultInfo resultInfo) { Id = id; Status = status; OperationContext = operationContext; ResultInfo = resultInfo; }
/// <summary> /// Initializes a new instance of the ZoneDeleteResult class. /// </summary> public ZoneDeleteResult(string azureAsyncOperation = default(string), OperationStatus?status = default(OperationStatus?), HtpStatusCode?statusCode = default(HtpStatusCode?), string requestId = default(string)) { AzureAsyncOperation = azureAsyncOperation; Status = status; StatusCode = statusCode; RequestId = requestId; }
/// <summary> /// Gets the status of an import/export operation /// </summary> /// <param name="operationStatusLink">The operation status link</param> /// <returns>Operation status response</returns> public AzureSqlDatabaseImportExportStatusModel GetStatus(string operationStatusLink) { HttpResponseMessage rawHttpResponse; ImportExportOperationResult response = Communicator.GetOperationStatus(operationStatusLink, out rawHttpResponse); OperationStatus?operationStatus = GetOperationStatusFromHttpStatus(rawHttpResponse.StatusCode); AzureSqlDatabaseImportExportStatusModel status = new AzureSqlDatabaseImportExportStatusModel() { ErrorMessage = response.ErrorMessage, LastModifiedTime = response.LastModifiedTime, QueuedTime = response.QueuedTime, StatusMessage = response.Status, // in spite of the name, the field called "Status" is the correct one to put into the "StatusMessage" field Status = operationStatus.HasValue ? operationStatus.Value.ToString() : "", RequestType = response.RequestType, PrivateEndpointRequestStatus = response.PrivateEndpointConnections?.Select(pec => new PrivateEndpointRequestStatus() { PrivateEndpointConnectionName = pec.PrivateEndpointConnectionName, PrivateLinkServiceId = pec.PrivateLinkServiceId, Status = pec.Status }).ToArray(), OperationStatusLink = operationStatusLink }; return(status); }
internal ComputeInstanceLastOperation(OperationName?operationName, DateTimeOffset?operationOn, OperationStatus?operationStatus, OperationTrigger?operationTrigger) { OperationName = operationName; OperationOn = operationOn; OperationStatus = operationStatus; OperationTrigger = operationTrigger; }
internal PlayAudioResponse(string id, OperationStatus?status, string operationContext, ResultInfo resultInfo) { Id = id; Status = status; OperationContext = operationContext; ResultInfo = resultInfo; }
/// <summary> /// Initializes a new instance of the MigrateMySqlStatusInner class. /// </summary> /// <param name="id">Resource Id.</param> /// <param name="name">Resource Name.</param> /// <param name="kind">Kind of resource.</param> /// <param name="type">Resource type.</param> /// <param name="migrationOperationStatus">Status of the migration /// task. Possible values include: 'InProgress', 'Failed', 'Succeeded', /// 'TimedOut', 'Created'</param> /// <param name="operationId">Operation ID for the migration /// task.</param> /// <param name="localMySqlEnabled">True if the web app has in app /// MySql enabled</param> public MigrateMySqlStatusInner(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), OperationStatus?migrationOperationStatus = default(OperationStatus?), string operationId = default(string), bool?localMySqlEnabled = default(bool?)) : base(id, name, kind, type) { MigrationOperationStatus = migrationOperationStatus; OperationId = operationId; LocalMySqlEnabled = localMySqlEnabled; CustomInit(); }
internal ReservationToReturnForExchange(string reservationId, int?quantity, PurchasePrice billingRefundAmount, BillingInformation billingInformation, OperationStatus?status) { ReservationId = reservationId; Quantity = quantity; BillingRefundAmount = billingRefundAmount; BillingInformation = billingInformation; Status = status; }
internal ReservationToPurchaseExchange(string reservationOrderId, string reservationId, PurchaseRequestContent properties, PurchasePrice billingCurrencyTotal, OperationStatus?status) { ReservationOrderId = reservationOrderId; ReservationId = reservationId; Properties = properties; BillingCurrencyTotal = billingCurrencyTotal; Status = status; }
/// <summary> /// The deserialization information for the current model /// </summary> public new IDictionary <string, Action <IParseNode> > GetFieldDeserializers() { return(new Dictionary <string, Action <IParseNode> >(base.GetFieldDeserializers()) { { "clientContext", n => { ClientContext = n.GetStringValue(); } }, { "resultInfo", n => { ResultInfo = n.GetObjectValue <ApiSdk.Models.ResultInfo>(ApiSdk.Models.ResultInfo.CreateFromDiscriminatorValue); } }, { "status", n => { Status = n.GetEnumValue <OperationStatus>(); } }, }); }
/// <summary> /// The deserialization information for the current model /// </summary> public new IDictionary <string, Action <IParseNode> > GetFieldDeserializers() { return(new Dictionary <string, Action <IParseNode> >(base.GetFieldDeserializers()) { { "createdDateTime", n => { CreatedDateTime = n.GetDateTimeOffsetValue(); } }, { "lastActionDateTime", n => { LastActionDateTime = n.GetDateTimeOffsetValue(); } }, { "status", n => { Status = n.GetEnumValue <OperationStatus>(); } }, }); }
internal OperationInformation(string id, string name, OperationStatus?status, IReadOnlyList <ResponseError> errors, DateTimeOffset?createdOn, DateTimeOffset?modifiedOn, DateTimeOffset?expirationOn, Guid?geoMasterOperationId) { Id = id; Name = name; Status = status; Errors = errors; CreatedOn = createdOn; ModifiedOn = modifiedOn; ExpirationOn = expirationOn; GeoMasterOperationId = geoMasterOperationId; }
internal OperationInformation(string id, string name, OperationStatus?status, IReadOnlyList <ErrorEntity> errors, DateTimeOffset?createdTime, DateTimeOffset?modifiedTime, DateTimeOffset?expirationTime, Guid?geoMasterOperationId) { Id = id; Name = name; Status = status; Errors = errors; CreatedTime = createdTime; ModifiedTime = modifiedTime; ExpirationTime = expirationTime; GeoMasterOperationId = geoMasterOperationId; }
/// <summary> /// Initializes a new instance of the Operation class. /// </summary> /// <param name="id">Operation ID.</param> /// <param name="name">Operation name.</param> /// <param name="status">The current status of the operation. Possible /// values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', /// 'Created'</param> /// <param name="errors">Any errors associate with the /// operation.</param> /// <param name="createdTime">Time when operation has started.</param> /// <param name="modifiedTime">Time when operation has been /// updated.</param> /// <param name="expirationTime">Time when operation will /// expire.</param> /// <param name="geoMasterOperationId">Applicable only for stamp /// operation ids.</param> public Operation(string id = default(string), string name = default(string), OperationStatus?status = default(OperationStatus?), IList <ErrorEntity> errors = default(IList <ErrorEntity>), System.DateTime?createdTime = default(System.DateTime?), System.DateTime?modifiedTime = default(System.DateTime?), System.DateTime?expirationTime = default(System.DateTime?), System.Guid?geoMasterOperationId = default(System.Guid?)) { Id = id; Name = name; Status = status; Errors = errors; CreatedTime = createdTime; ModifiedTime = modifiedTime; ExpirationTime = expirationTime; GeoMasterOperationId = geoMasterOperationId; CustomInit(); }
/// <summary> /// Initializes a new instance of the Volume class. /// </summary> /// <param name="sizeInBytes">The size of the volume in bytes.</param> /// <param name="volumeType">The type of the volume. Possible values /// include: 'Tiered', 'Archival', 'LocallyPinned'</param> /// <param name="accessControlRecordIds">The IDs of the access control /// records, associated with the volume.</param> /// <param name="volumeStatus">The volume status. Possible values /// include: 'Online', 'Offline'</param> /// <param name="monitoringStatus">The monitoring status of the volume. /// Possible values include: 'Enabled', 'Disabled'</param> /// <param name="id">The path ID that uniquely identifies the /// object.</param> /// <param name="name">The name of the object.</param> /// <param name="type">The hierarchical type of the object.</param> /// <param name="kind">The Kind of the object. Currently only /// Series8000 is supported. Possible values include: /// 'Series8000'</param> /// <param name="volumeContainerId">The ID of the volume container, in /// which this volume is created.</param> /// <param name="operationStatus">The operation status on the volume. /// Possible values include: 'None', 'Updating', 'Deleting', /// 'Restoring'</param> /// <param name="backupStatus">The backup status of the volume. /// Possible values include: 'Enabled', 'Disabled'</param> /// <param name="backupPolicyIds">The IDs of the backup policies, in /// which this volume is part of.</param> public Volume(long sizeInBytes, VolumeType volumeType, IList <string> accessControlRecordIds, VolumeStatus volumeStatus, MonitoringStatus monitoringStatus, string id = default(string), string name = default(string), string type = default(string), Kind?kind = default(Kind?), string volumeContainerId = default(string), OperationStatus?operationStatus = default(OperationStatus?), BackupStatus?backupStatus = default(BackupStatus?), IList <string> backupPolicyIds = default(IList <string>)) : base(id, name, type, kind) { SizeInBytes = sizeInBytes; VolumeType = volumeType; VolumeContainerId = volumeContainerId; AccessControlRecordIds = accessControlRecordIds; VolumeStatus = volumeStatus; OperationStatus = operationStatus; BackupStatus = backupStatus; MonitoringStatus = monitoringStatus; BackupPolicyIds = backupPolicyIds; }
/// <summary> /// Initializes a new instance of the Backup class. /// </summary> /// <param name="id">URI of the resource.</param> /// <param name="name">Name of the resource.</param> /// <param name="type">Type of resource.</param> /// <param name="location">Location of the resource.</param> /// <param name="tags">List of key value pairs.</param> /// <param name="backupDataVersion">Version of the backup data.</param> /// <param name="roleStatus">Backup status for each role.</param> /// <param name="status">Current status of the backup. Possible values /// include: 'Creating', 'Queued', 'Running', 'Deleted', 'Failed', /// 'PartialSucceeded', 'Succeeded'</param> /// <param name="createdDateTime">Creation time of the backup.</param> /// <param name="timeTakenToCreate">Duration to create the /// backup.</param> /// <param name="deploymentID">Deployment Id of the stamp.</param> /// <param name="stampVersion">Azure Stack stamp version of the /// backup.</param> /// <param name="oemVersion">OEM version.</param> /// <param name="encryptionCertThumbprint">The thumbprint of the /// certificate used to encrypt the backup encryption key.</param> public Backup(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary <string, string> tags = default(IDictionary <string, string>), string backupDataVersion = default(string), IList <RoleOperationStatus> roleStatus = default(IList <RoleOperationStatus>), OperationStatus?status = default(OperationStatus?), System.DateTime?createdDateTime = default(System.DateTime?), string timeTakenToCreate = default(string), string deploymentID = default(string), string stampVersion = default(string), string oemVersion = default(string), string encryptionCertThumbprint = default(string)) : base(id, name, type, location, tags) { BackupDataVersion = backupDataVersion; RoleStatus = roleStatus; Status = status; CreatedDateTime = createdDateTime; TimeTakenToCreate = timeTakenToCreate; DeploymentID = deploymentID; StampVersion = stampVersion; OemVersion = oemVersion; EncryptionCertThumbprint = encryptionCertThumbprint; CustomInit(); }
public async Task <IReadOnlyCollection <MessageData> > GetAsync( int from = 0, int size = 50, OperationType?type = null, OperationStatus?status = null, Type message = null) { var search = new SearchDescriptor <MessageData>() .Index(_settings.Elasticsearch.Index) .From(from) .Size(size); if (type.HasValue) { search = search.Query(q => q .Match(m => m .Field(f => f.Type) .Query(((int)type).ToString()) ) ); } if (status.HasValue) { search = search.Query(q => q .Match(m => m .Field(f => f.Status) .Query(((int)status).ToString()) ) ); } if (message is not null) { search = search.Query(q => q .Match(m => m .Field(f => f.ClrType) .Query(message.AssemblyQualifiedName) ) ); } var data = await _client.SearchAsync <MessageData>(search); return(data.Documents); }
/// <summary> /// Creates new instance of operation with changed properties. /// </summary> /// <typeparam name="TOperationState">Operation state.</typeparam> /// <param name="operation">Source operation.</param> /// <param name="id">New id.</param> /// <param name="status">New status.</param> /// <param name="startedAt">New startedAt.</param> /// <param name="finishedAt">New finishedAt.</param> /// <param name="exception">New exception.</param> /// <param name="metadata">New metadata.</param> /// <returns>New instance of operation with changed properties.</returns> public static Operation <TOperationState> With <TOperationState>( this IOperation <TOperationState> operation, OperationId?id = default, OperationStatus?status = default, LocalDateTime?startedAt = default, LocalDateTime?finishedAt = default, Exception?exception = null, IPropertyContainer?metadata = null) { return(new Operation <TOperationState>( id: id ?? operation.Id, state: operation.State, status: status ?? operation.Status, startedAt: startedAt ?? operation.StartedAt, finishedAt: finishedAt ?? operation.FinishedAt, exception: exception ?? operation.Exception, metadata: metadata ?? operation.Metadata)); }
/// <summary> /// Get the "Status" value for the Import/Export request /// /// This logic is copied verbatim from the (generated) legacy SDK: /// <see cref="Azure.Management.Sql.LegacySdk.ImportExportOperations.GetImportExportOperationStatusAsync"/> /// </summary> /// <param name="statusCode"></param> /// <returns></returns> protected OperationStatus?GetOperationStatusFromHttpStatus(HttpStatusCode statusCode) { OperationStatus?status = null; switch (statusCode) { // We expect this switch statement to cover all possible cases of return values from the service case HttpStatusCode.OK: case HttpStatusCode.Created: status = OperationStatus.Succeeded; break; case HttpStatusCode.Accepted: status = OperationStatus.InProgress; break; } return(status); }
/// <summary> /// Creates new instance of <see cref="ISession{TSessionState}"/> with changes. /// </summary> /// <typeparam name="TSessionState">Session state.</typeparam> /// <param name="source">Source session.</param> /// <param name="id">New session id.</param> /// <param name="status">New session status.</param> /// <param name="startedAt">New startedAt.</param> /// <param name="finishedAt">New finishedAt.</param> /// <param name="exception">Exception.</param> /// <param name="metadata">Metadata for session.</param> /// <param name="executionOptions">Session execution options.</param> /// <returns>New instance of session.</returns> public static ISession <TSessionState> With <TSessionState>( this ISession <TSessionState> source, OperationId?id = null, OperationStatus?status = null, LocalDateTime?startedAt = null, LocalDateTime?finishedAt = null, Exception?exception = null, IPropertyContainer?metadata = null, IExecutionOptions?executionOptions = null) { var sessionOperation = source.Operation.With <TSessionState>( id: id, status: status, startedAt: startedAt, finishedAt: finishedAt, exception: exception, metadata: metadata); return(new LazySession <TSessionState>( sessionOperation: sessionOperation, messages: source.Messages, getOperations: source.GetOperations, executionOptions: executionOptions ?? source.ExecutionOptions)); }
public static PlayAudioResponse PlayAudioResponse(string id = default, OperationStatus?status = default, string operationContext = default, ResultInfo resultInfo = default) { return(new PlayAudioResponse(id, status, operationContext, resultInfo)); }
/// <summary> /// Initializes a new instance of the AzureAsyncOperationResult class. /// </summary> /// <param name="status">the status of the AzureAsuncOperation. /// Possible values include: 'InProgress', 'Succeeded', /// 'Failed'</param> public AzureAsyncOperationResult(OperationStatus?status = default(OperationStatus?), Error error = default(Error)) { Status = status; Error = error; }
internal MigrateMySqlStatusData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string kind, OperationStatus?migrationOperationStatus, string operationId, bool?localMySqlEnabled) : base(id, name, resourceType, systemData, kind) { MigrationOperationStatus = migrationOperationStatus; OperationId = operationId; LocalMySqlEnabled = localMySqlEnabled; }
/// <summary> /// Initializes a new instance of the RoleOperationStatus class. /// </summary> /// <param name="roleName">Name of the role.</param> /// <param name="status">Status of the role. Possible values include: /// 'Creating', 'Queued', 'Running', 'Deleted', 'Failed', /// 'PartialSucceeded', 'Succeeded'</param> public RoleOperationStatus(string roleName = default(string), OperationStatus?status = default(OperationStatus?)) { RoleName = roleName; Status = status; CustomInit(); }
internal static string ToSerializedValue(this OperationStatus?value) { return(value == null ? null : ((OperationStatus)value).ToSerializedValue()); }
internal InviteParticipantsResultEvent(ResultInfo resultInfo, string operationContext, OperationStatus?status) { ResultInfo = resultInfo; OperationContext = operationContext; Status = status; }
internal ComputeInstanceLastOperation(OperationName?operationName, DateTimeOffset?operationTime, OperationStatus?operationStatus) { OperationName = operationName; OperationTime = operationTime; OperationStatus = operationStatus; }
internal PlayAudioResultEvent(ResultInfo resultInfo, string operationContext, OperationStatus?status) { ResultInfo = resultInfo; OperationContext = operationContext; Status = status; }
public static CancelAllMediaOperationsResponse CancelAllMediaOperationsResponse(string id = default, OperationStatus?status = default, string operationContext = default, ResultInfo resultInfo = default) { return(new CancelAllMediaOperationsResponse(id, status, operationContext, resultInfo)); }