Пример #1
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            GetPlaybackConfigurationResponse response = new GetPlaybackConfigurationResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("AdDecisionServerUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.AdDecisionServerUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CdnConfiguration", targetDepth))
                {
                    var unmarshaller = CdnConfigurationUnmarshaller.Instance;
                    response.CdnConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DashConfiguration", targetDepth))
                {
                    var unmarshaller = DashConfigurationUnmarshaller.Instance;
                    response.DashConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("HlsConfiguration", targetDepth))
                {
                    var unmarshaller = HlsConfigurationUnmarshaller.Instance;
                    response.HlsConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PlaybackConfigurationArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.PlaybackConfigurationArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PlaybackEndpointPrefix", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.PlaybackEndpointPrefix = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SessionInitializationEndpointPrefix", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.SessionInitializationEndpointPrefix = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SlateAdUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.SlateAdUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("tags", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    response.Tags = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TranscodeProfileName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.TranscodeProfileName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("VideoContentSourceUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.VideoContentSourceUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Пример #2
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            GetPlaybackConfigurationResponse response = new GetPlaybackConfigurationResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("AdDecisionServerUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.AdDecisionServerUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("AvailSuppression", targetDepth))
                {
                    var unmarshaller = AvailSuppressionUnmarshaller.Instance;
                    response.AvailSuppression = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Bumper", targetDepth))
                {
                    var unmarshaller = BumperUnmarshaller.Instance;
                    response.Bumper = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("CdnConfiguration", targetDepth))
                {
                    var unmarshaller = CdnConfigurationUnmarshaller.Instance;
                    response.CdnConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ConfigurationAliases", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, Dictionary <string, string>, StringUnmarshaller, DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> >(StringUnmarshaller.Instance, new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance));
                    response.ConfigurationAliases = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DashConfiguration", targetDepth))
                {
                    var unmarshaller = DashConfigurationUnmarshaller.Instance;
                    response.DashConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("HlsConfiguration", targetDepth))
                {
                    var unmarshaller = HlsConfigurationUnmarshaller.Instance;
                    response.HlsConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LivePreRollConfiguration", targetDepth))
                {
                    var unmarshaller = LivePreRollConfigurationUnmarshaller.Instance;
                    response.LivePreRollConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LogConfiguration", targetDepth))
                {
                    var unmarshaller = LogConfigurationUnmarshaller.Instance;
                    response.LogConfiguration = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ManifestProcessingRules", targetDepth))
                {
                    var unmarshaller = ManifestProcessingRulesUnmarshaller.Instance;
                    response.ManifestProcessingRules = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Name", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Name = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PersonalizationThresholdSeconds", targetDepth))
                {
                    var unmarshaller = IntUnmarshaller.Instance;
                    response.PersonalizationThresholdSeconds = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PlaybackConfigurationArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.PlaybackConfigurationArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("PlaybackEndpointPrefix", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.PlaybackEndpointPrefix = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SessionInitializationEndpointPrefix", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.SessionInitializationEndpointPrefix = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("SlateAdUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.SlateAdUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("tags", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    response.Tags = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("TranscodeProfileName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.TranscodeProfileName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("VideoContentSourceUrl", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.VideoContentSourceUrl = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }