예제 #1
0
 internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo, DateTimeOffset?recordingStartTime, long?recordingDurationMs, string sessionEndReason)
 {
     RecordingStorageInfo = recordingStorageInfo;
     RecordingStartTime   = recordingStartTime;
     RecordingDurationMs  = recordingDurationMs;
     SessionEndReason     = sessionEndReason;
 }
예제 #2
0
 internal AcsRecordingFileStatusUpdatedEventData(AcsRecordingStorageInfoProperties recordingStorageInfo, DateTimeOffset?recordingStartTime, long?recordingDurationMs, AcsRecordingContentType?contentType, AcsRecordingChannelType?channelType, AcsRecordingFormatType?formatType, string sessionEndReason)
 {
     RecordingStorageInfo = recordingStorageInfo;
     RecordingStartTime   = recordingStartTime;
     RecordingDurationMs  = recordingDurationMs;
     ContentType          = contentType;
     ChannelType          = channelType;
     FormatType           = formatType;
     SessionEndReason     = sessionEndReason;
 }
예제 #3
0
        internal static AcsRecordingFileStatusUpdatedEventData DeserializeAcsRecordingFileStatusUpdatedEventData(JsonElement element)
        {
            Optional <AcsRecordingStorageInfoProperties> recordingStorageInfo = default;
            Optional <DateTimeOffset> recordingStartTime  = default;
            Optional <long>           recordingDurationMs = default;
            Optional <string>         sessionEndReason    = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("recordingStorageInfo"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    recordingStorageInfo = AcsRecordingStorageInfoProperties.DeserializeAcsRecordingStorageInfoProperties(property.Value);
                    continue;
                }
                if (property.NameEquals("recordingStartTime"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    recordingStartTime = property.Value.GetDateTimeOffset("O");
                    continue;
                }
                if (property.NameEquals("recordingDurationMs"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    recordingDurationMs = property.Value.GetInt64();
                    continue;
                }
                if (property.NameEquals("sessionEndReason"))
                {
                    sessionEndReason = property.Value.GetString();
                    continue;
                }
            }
            return(new AcsRecordingFileStatusUpdatedEventData(recordingStorageInfo.Value, Optional.ToNullable(recordingStartTime), Optional.ToNullable(recordingDurationMs), sessionEndReason.Value));
        }