repo_name
stringlengths
1
52
repo_creator
stringclasses
6 values
programming_language
stringclasses
4 values
code
stringlengths
0
9.68M
num_lines
int64
1
234k
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Container for the parameters to the UpdateAppBlockBuilder operation. /// Updates an app block builder. /// /// /// <para> /// If the app block builder is in the <code>STARTING</code> or <code>STOPPING</code> /// state, you can't update it. If the app block builder is in the <code>RUNNING</code> /// state, you can only update the DisplayName and Description. If the app block builder /// is in the <code>STOPPED</code> state, you can update any attribute except the Name. /// </para> /// </summary> public partial class UpdateAppBlockBuilderRequest : AmazonAppStreamRequest { private List<AccessEndpoint> _accessEndpoints = new List<AccessEndpoint>(); private List<string> _attributesToDelete = new List<string>(); private string _description; private string _displayName; private bool? _enableDefaultInternetAccess; private string _iamRoleArn; private string _instanceType; private string _name; private PlatformType _platform; private VpcConfig _vpcConfig; /// <summary> /// Gets and sets the property AccessEndpoints. /// <para> /// The list of interface VPC endpoint (interface endpoint) objects. Administrators can /// connect to the app block builder only through the specified endpoints. /// </para> /// </summary> [AWSProperty(Min=1, Max=4)] public List<AccessEndpoint> AccessEndpoints { get { return this._accessEndpoints; } set { this._accessEndpoints = value; } } // Check to see if AccessEndpoints property is set internal bool IsSetAccessEndpoints() { return this._accessEndpoints != null && this._accessEndpoints.Count > 0; } /// <summary> /// Gets and sets the property AttributesToDelete. /// <para> /// The attributes to delete from the app block builder. /// </para> /// </summary> public List<string> AttributesToDelete { get { return this._attributesToDelete; } set { this._attributesToDelete = value; } } // Check to see if AttributesToDelete property is set internal bool IsSetAttributesToDelete() { return this._attributesToDelete != null && this._attributesToDelete.Count > 0; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the app block builder. /// </para> /// </summary> [AWSProperty(Max=256)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property DisplayName. /// <para> /// The display name of the app block builder. /// </para> /// </summary> [AWSProperty(Max=100)] public string DisplayName { get { return this._displayName; } set { this._displayName = value; } } // Check to see if DisplayName property is set internal bool IsSetDisplayName() { return this._displayName != null; } /// <summary> /// Gets and sets the property EnableDefaultInternetAccess. /// <para> /// Enables or disables default internet access for the app block builder. /// </para> /// </summary> public bool EnableDefaultInternetAccess { get { return this._enableDefaultInternetAccess.GetValueOrDefault(); } set { this._enableDefaultInternetAccess = value; } } // Check to see if EnableDefaultInternetAccess property is set internal bool IsSetEnableDefaultInternetAccess() { return this._enableDefaultInternetAccess.HasValue; } /// <summary> /// Gets and sets the property IamRoleArn. /// <para> /// The Amazon Resource Name (ARN) of the IAM role to apply to the app block builder. /// To assume a role, the app block builder calls the AWS Security Token Service (STS) /// <code>AssumeRole</code> API operation and passes the ARN of the role to use. The operation /// creates a new session with temporary credentials. AppStream 2.0 retrieves the temporary /// credentials and creates the <b>appstream_machine_role</b> credential profile on the /// instance. /// </para> /// /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html">Using /// an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream /// 2.0 Streaming Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. /// </para> /// </summary> public string IamRoleArn { get { return this._iamRoleArn; } set { this._iamRoleArn = value; } } // Check to see if IamRoleArn property is set internal bool IsSetIamRoleArn() { return this._iamRoleArn != null; } /// <summary> /// Gets and sets the property InstanceType. /// <para> /// The instance type to use when launching the app block builder. The following instance /// types are available: /// </para> /// <ul> <li> /// <para> /// stream.standard.small /// </para> /// </li> <li> /// <para> /// stream.standard.medium /// </para> /// </li> <li> /// <para> /// stream.standard.large /// </para> /// </li> <li> /// <para> /// stream.standard.xlarge /// </para> /// </li> <li> /// <para> /// stream.standard.2xlarge /// </para> /// </li> </ul> /// </summary> [AWSProperty(Min=1)] public string InstanceType { get { return this._instanceType; } set { this._instanceType = value; } } // Check to see if InstanceType property is set internal bool IsSetInstanceType() { return this._instanceType != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The unique name for the app block builder. /// </para> /// </summary> [AWSProperty(Required=true)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property Platform. /// <para> /// The platform of the app block builder. /// </para> /// /// <para> /// <code>WINDOWS_SERVER_2019</code> is the only valid value. /// </para> /// </summary> public PlatformType Platform { get { return this._platform; } set { this._platform = value; } } // Check to see if Platform property is set internal bool IsSetPlatform() { return this._platform != null; } /// <summary> /// Gets and sets the property VpcConfig. /// <para> /// The VPC configuration for the app block builder. /// </para> /// /// <para> /// App block builders require that you specify at least two subnets in different availability /// zones. /// </para> /// </summary> public VpcConfig VpcConfig { get { return this._vpcConfig; } set { this._vpcConfig = value; } } // Check to see if VpcConfig property is set internal bool IsSetVpcConfig() { return this._vpcConfig != null; } } }
285
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// This is the response object from the UpdateAppBlockBuilder operation. /// </summary> public partial class UpdateAppBlockBuilderResponse : AmazonWebServiceResponse { private AppBlockBuilder _appBlockBuilder; /// <summary> /// Gets and sets the property AppBlockBuilder. /// </summary> public AppBlockBuilder AppBlockBuilder { get { return this._appBlockBuilder; } set { this._appBlockBuilder = value; } } // Check to see if AppBlockBuilder property is set internal bool IsSetAppBlockBuilder() { return this._appBlockBuilder != null; } } }
54
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Container for the parameters to the UpdateApplication operation. /// Updates the specified application. /// </summary> public partial class UpdateApplicationRequest : AmazonAppStreamRequest { private string _appBlockArn; private List<string> _attributesToDelete = new List<string>(); private string _description; private string _displayName; private S3Location _iconS3Location; private string _launchParameters; private string _launchPath; private string _name; private string _workingDirectory; /// <summary> /// Gets and sets the property AppBlockArn. /// <para> /// The ARN of the app block. /// </para> /// </summary> public string AppBlockArn { get { return this._appBlockArn; } set { this._appBlockArn = value; } } // Check to see if AppBlockArn property is set internal bool IsSetAppBlockArn() { return this._appBlockArn != null; } /// <summary> /// Gets and sets the property AttributesToDelete. /// <para> /// The attributes to delete for an application. /// </para> /// </summary> [AWSProperty(Max=2)] public List<string> AttributesToDelete { get { return this._attributesToDelete; } set { this._attributesToDelete = value; } } // Check to see if AttributesToDelete property is set internal bool IsSetAttributesToDelete() { return this._attributesToDelete != null && this._attributesToDelete.Count > 0; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the application. /// </para> /// </summary> [AWSProperty(Max=256)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property DisplayName. /// <para> /// The display name of the application. This name is visible to users in the application /// catalog. /// </para> /// </summary> [AWSProperty(Max=100)] public string DisplayName { get { return this._displayName; } set { this._displayName = value; } } // Check to see if DisplayName property is set internal bool IsSetDisplayName() { return this._displayName != null; } /// <summary> /// Gets and sets the property IconS3Location. /// <para> /// The icon S3 location of the application. /// </para> /// </summary> public S3Location IconS3Location { get { return this._iconS3Location; } set { this._iconS3Location = value; } } // Check to see if IconS3Location property is set internal bool IsSetIconS3Location() { return this._iconS3Location != null; } /// <summary> /// Gets and sets the property LaunchParameters. /// <para> /// The launch parameters of the application. /// </para> /// </summary> [AWSProperty(Min=1)] public string LaunchParameters { get { return this._launchParameters; } set { this._launchParameters = value; } } // Check to see if LaunchParameters property is set internal bool IsSetLaunchParameters() { return this._launchParameters != null; } /// <summary> /// Gets and sets the property LaunchPath. /// <para> /// The launch path of the application. /// </para> /// </summary> [AWSProperty(Min=1)] public string LaunchPath { get { return this._launchPath; } set { this._launchPath = value; } } // Check to see if LaunchPath property is set internal bool IsSetLaunchPath() { return this._launchPath != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the application. This name is visible to users when display name is not /// specified. /// </para> /// </summary> [AWSProperty(Required=true)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property WorkingDirectory. /// <para> /// The working directory of the application. /// </para> /// </summary> [AWSProperty(Min=1)] public string WorkingDirectory { get { return this._workingDirectory; } set { this._workingDirectory = value; } } // Check to see if WorkingDirectory property is set internal bool IsSetWorkingDirectory() { return this._workingDirectory != null; } } }
219
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// This is the response object from the UpdateApplication operation. /// </summary> public partial class UpdateApplicationResponse : AmazonWebServiceResponse { private Application _application; /// <summary> /// Gets and sets the property Application. /// </summary> public Application Application { get { return this._application; } set { this._application = value; } } // Check to see if Application property is set internal bool IsSetApplication() { return this._application != null; } } }
54
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Container for the parameters to the UpdateDirectoryConfig operation. /// Updates the specified Directory Config object in AppStream 2.0. This object includes /// the configuration information required to join fleets and image builders to Microsoft /// Active Directory domains. /// </summary> public partial class UpdateDirectoryConfigRequest : AmazonAppStreamRequest { private CertificateBasedAuthProperties _certificateBasedAuthProperties; private string _directoryName; private List<string> _organizationalUnitDistinguishedNames = new List<string>(); private ServiceAccountCredentials _serviceAccountCredentials; /// <summary> /// Gets and sets the property CertificateBasedAuthProperties. /// <para> /// The certificate-based authentication properties used to authenticate SAML 2.0 Identity /// Provider (IdP) user identities to Active Directory domain-joined streaming instances. /// Fallback is turned on by default when certificate-based authentication is <b>Enabled</b> /// . Fallback allows users to log in using their AD domain password if certificate-based /// authentication is unsuccessful, or to unlock a desktop lock screen. <b>Enabled_no_directory_login_fallback</b> /// enables certificate-based authentication, but does not allow users to log in using /// their AD domain password. Users will be disconnected to re-authenticate using certificates. /// </para> /// </summary> public CertificateBasedAuthProperties CertificateBasedAuthProperties { get { return this._certificateBasedAuthProperties; } set { this._certificateBasedAuthProperties = value; } } // Check to see if CertificateBasedAuthProperties property is set internal bool IsSetCertificateBasedAuthProperties() { return this._certificateBasedAuthProperties != null; } /// <summary> /// Gets and sets the property DirectoryName. /// <para> /// The name of the Directory Config object. /// </para> /// </summary> [AWSProperty(Required=true)] public string DirectoryName { get { return this._directoryName; } set { this._directoryName = value; } } // Check to see if DirectoryName property is set internal bool IsSetDirectoryName() { return this._directoryName != null; } /// <summary> /// Gets and sets the property OrganizationalUnitDistinguishedNames. /// <para> /// The distinguished names of the organizational units for computer accounts. /// </para> /// </summary> public List<string> OrganizationalUnitDistinguishedNames { get { return this._organizationalUnitDistinguishedNames; } set { this._organizationalUnitDistinguishedNames = value; } } // Check to see if OrganizationalUnitDistinguishedNames property is set internal bool IsSetOrganizationalUnitDistinguishedNames() { return this._organizationalUnitDistinguishedNames != null && this._organizationalUnitDistinguishedNames.Count > 0; } /// <summary> /// Gets and sets the property ServiceAccountCredentials. /// <para> /// The credentials for the service account used by the fleet or image builder to connect /// to the directory. /// </para> /// </summary> public ServiceAccountCredentials ServiceAccountCredentials { get { return this._serviceAccountCredentials; } set { this._serviceAccountCredentials = value; } } // Check to see if ServiceAccountCredentials property is set internal bool IsSetServiceAccountCredentials() { return this._serviceAccountCredentials != null; } } }
125
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// This is the response object from the UpdateDirectoryConfig operation. /// </summary> public partial class UpdateDirectoryConfigResponse : AmazonWebServiceResponse { private DirectoryConfig _directoryConfig; /// <summary> /// Gets and sets the property DirectoryConfig. /// <para> /// Information about the Directory Config object. /// </para> /// </summary> public DirectoryConfig DirectoryConfig { get { return this._directoryConfig; } set { this._directoryConfig = value; } } // Check to see if DirectoryConfig property is set internal bool IsSetDirectoryConfig() { return this._directoryConfig != null; } } }
57
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Container for the parameters to the UpdateEntitlement operation. /// Updates the specified entitlement. /// </summary> public partial class UpdateEntitlementRequest : AmazonAppStreamRequest { private AppVisibility _appVisibility; private List<EntitlementAttribute> _attributes = new List<EntitlementAttribute>(); private string _description; private string _name; private string _stackName; /// <summary> /// Gets and sets the property AppVisibility. /// <para> /// Specifies whether all or only selected apps are entitled. /// </para> /// </summary> public AppVisibility AppVisibility { get { return this._appVisibility; } set { this._appVisibility = value; } } // Check to see if AppVisibility property is set internal bool IsSetAppVisibility() { return this._appVisibility != null; } /// <summary> /// Gets and sets the property Attributes. /// <para> /// The attributes of the entitlement. /// </para> /// </summary> [AWSProperty(Min=1)] public List<EntitlementAttribute> Attributes { get { return this._attributes; } set { this._attributes = value; } } // Check to see if Attributes property is set internal bool IsSetAttributes() { return this._attributes != null && this._attributes.Count > 0; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description of the entitlement. /// </para> /// </summary> [AWSProperty(Max=256)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the entitlement. /// </para> /// </summary> [AWSProperty(Required=true)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property StackName. /// <para> /// The name of the stack with which the entitlement is associated. /// </para> /// </summary> [AWSProperty(Required=true)] public string StackName { get { return this._stackName; } set { this._stackName = value; } } // Check to see if StackName property is set internal bool IsSetStackName() { return this._stackName != null; } } }
138
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// This is the response object from the UpdateEntitlement operation. /// </summary> public partial class UpdateEntitlementResponse : AmazonWebServiceResponse { private Entitlement _entitlement; /// <summary> /// Gets and sets the property Entitlement. /// <para> /// The entitlement. /// </para> /// </summary> public Entitlement Entitlement { get { return this._entitlement; } set { this._entitlement = value; } } // Check to see if Entitlement property is set internal bool IsSetEntitlement() { return this._entitlement != null; } } }
57
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Container for the parameters to the UpdateFleet operation. /// Updates the specified fleet. /// /// /// <para> /// If the fleet is in the <code>STOPPED</code> state, you can update any attribute except /// the fleet name. /// </para> /// /// <para> /// If the fleet is in the <code>RUNNING</code> state, you can update the following based /// on the fleet type: /// </para> /// <ul> <li> /// <para> /// Always-On and On-Demand fleet types /// </para> /// /// <para> /// You can update the <code>DisplayName</code>, <code>ComputeCapacity</code>, <code>ImageARN</code>, /// <code>ImageName</code>, <code>IdleDisconnectTimeoutInSeconds</code>, and <code>DisconnectTimeoutInSeconds</code> /// attributes. /// </para> /// </li> <li> /// <para> /// Elastic fleet type /// </para> /// /// <para> /// You can update the <code>DisplayName</code>, <code>IdleDisconnectTimeoutInSeconds</code>, /// <code>DisconnectTimeoutInSeconds</code>, <code>MaxConcurrentSessions</code>, <code>SessionScriptS3Location</code> /// and <code>UsbDeviceFilterStrings</code> attributes. /// </para> /// </li> </ul> /// <para> /// If the fleet is in the <code>STARTING</code> or <code>STOPPED</code> state, you can't /// update it. /// </para> /// </summary> public partial class UpdateFleetRequest : AmazonAppStreamRequest { private List<string> _attributesToDelete = new List<string>(); private ComputeCapacity _computeCapacity; private bool? _deleteVpcConfig; private string _description; private int? _disconnectTimeoutInSeconds; private string _displayName; private DomainJoinInfo _domainJoinInfo; private bool? _enableDefaultInternetAccess; private string _iamRoleArn; private int? _idleDisconnectTimeoutInSeconds; private string _imageArn; private string _imageName; private string _instanceType; private int? _maxConcurrentSessions; private int? _maxUserDurationInSeconds; private string _name; private PlatformType _platform; private S3Location _sessionScriptS3Location; private StreamView _streamView; private List<string> _usbDeviceFilterStrings = new List<string>(); private VpcConfig _vpcConfig; /// <summary> /// Gets and sets the property AttributesToDelete. /// <para> /// The fleet attributes to delete. /// </para> /// </summary> public List<string> AttributesToDelete { get { return this._attributesToDelete; } set { this._attributesToDelete = value; } } // Check to see if AttributesToDelete property is set internal bool IsSetAttributesToDelete() { return this._attributesToDelete != null && this._attributesToDelete.Count > 0; } /// <summary> /// Gets and sets the property ComputeCapacity. /// <para> /// The desired capacity for the fleet. This is not allowed for Elastic fleets. /// </para> /// </summary> public ComputeCapacity ComputeCapacity { get { return this._computeCapacity; } set { this._computeCapacity = value; } } // Check to see if ComputeCapacity property is set internal bool IsSetComputeCapacity() { return this._computeCapacity != null; } /// <summary> /// Gets and sets the property DeleteVpcConfig. /// <para> /// Deletes the VPC association for the specified fleet. /// </para> /// </summary> [Obsolete("This property is deprecated")] public bool DeleteVpcConfig { get { return this._deleteVpcConfig.GetValueOrDefault(); } set { this._deleteVpcConfig = value; } } // Check to see if DeleteVpcConfig property is set internal bool IsSetDeleteVpcConfig() { return this._deleteVpcConfig.HasValue; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description to display. /// </para> /// </summary> [AWSProperty(Max=256)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property DisconnectTimeoutInSeconds. /// <para> /// The amount of time that a streaming session remains active after users disconnect. /// If users try to reconnect to the streaming session after a disconnection or network /// interruption within this time interval, they are connected to their previous session. /// Otherwise, they are connected to a new session with a new streaming instance. /// </para> /// /// <para> /// Specify a value between 60 and 360000. /// </para> /// </summary> public int DisconnectTimeoutInSeconds { get { return this._disconnectTimeoutInSeconds.GetValueOrDefault(); } set { this._disconnectTimeoutInSeconds = value; } } // Check to see if DisconnectTimeoutInSeconds property is set internal bool IsSetDisconnectTimeoutInSeconds() { return this._disconnectTimeoutInSeconds.HasValue; } /// <summary> /// Gets and sets the property DisplayName. /// <para> /// The fleet name to display. /// </para> /// </summary> [AWSProperty(Max=100)] public string DisplayName { get { return this._displayName; } set { this._displayName = value; } } // Check to see if DisplayName property is set internal bool IsSetDisplayName() { return this._displayName != null; } /// <summary> /// Gets and sets the property DomainJoinInfo. /// <para> /// The name of the directory and organizational unit (OU) to use to join the fleet to /// a Microsoft Active Directory domain. /// </para> /// </summary> public DomainJoinInfo DomainJoinInfo { get { return this._domainJoinInfo; } set { this._domainJoinInfo = value; } } // Check to see if DomainJoinInfo property is set internal bool IsSetDomainJoinInfo() { return this._domainJoinInfo != null; } /// <summary> /// Gets and sets the property EnableDefaultInternetAccess. /// <para> /// Enables or disables default internet access for the fleet. /// </para> /// </summary> public bool EnableDefaultInternetAccess { get { return this._enableDefaultInternetAccess.GetValueOrDefault(); } set { this._enableDefaultInternetAccess = value; } } // Check to see if EnableDefaultInternetAccess property is set internal bool IsSetEnableDefaultInternetAccess() { return this._enableDefaultInternetAccess.HasValue; } /// <summary> /// Gets and sets the property IamRoleArn. /// <para> /// The Amazon Resource Name (ARN) of the IAM role to apply to the fleet. To assume a /// role, a fleet instance calls the AWS Security Token Service (STS) <code>AssumeRole</code> /// API operation and passes the ARN of the role to use. The operation creates a new session /// with temporary credentials. AppStream 2.0 retrieves the temporary credentials and /// creates the <b>appstream_machine_role</b> credential profile on the instance. /// </para> /// /// <para> /// For more information, see <a href="https://docs.aws.amazon.com/appstream2/latest/developerguide/using-iam-roles-to-grant-permissions-to-applications-scripts-streaming-instances.html">Using /// an IAM Role to Grant Permissions to Applications and Scripts Running on AppStream /// 2.0 Streaming Instances</a> in the <i>Amazon AppStream 2.0 Administration Guide</i>. /// </para> /// </summary> public string IamRoleArn { get { return this._iamRoleArn; } set { this._iamRoleArn = value; } } // Check to see if IamRoleArn property is set internal bool IsSetIamRoleArn() { return this._iamRoleArn != null; } /// <summary> /// Gets and sets the property IdleDisconnectTimeoutInSeconds. /// <para> /// The amount of time that users can be idle (inactive) before they are disconnected /// from their streaming session and the <code>DisconnectTimeoutInSeconds</code> time /// interval begins. Users are notified before they are disconnected due to inactivity. /// If users try to reconnect to the streaming session before the time interval specified /// in <code>DisconnectTimeoutInSeconds</code> elapses, they are connected to their previous /// session. Users are considered idle when they stop providing keyboard or mouse input /// during their streaming session. File uploads and downloads, audio in, audio out, and /// pixels changing do not qualify as user activity. If users continue to be idle after /// the time interval in <code>IdleDisconnectTimeoutInSeconds</code> elapses, they are /// disconnected. /// </para> /// /// <para> /// To prevent users from being disconnected due to inactivity, specify a value of 0. /// Otherwise, specify a value between 60 and 3600. The default value is 0. /// </para> /// <note> /// <para> /// If you enable this feature, we recommend that you specify a value that corresponds /// exactly to a whole number of minutes (for example, 60, 120, and 180). If you don't /// do this, the value is rounded to the nearest minute. For example, if you specify a /// value of 70, users are disconnected after 1 minute of inactivity. If you specify a /// value that is at the midpoint between two different minutes, the value is rounded /// up. For example, if you specify a value of 90, users are disconnected after 2 minutes /// of inactivity. /// </para> /// </note> /// </summary> public int IdleDisconnectTimeoutInSeconds { get { return this._idleDisconnectTimeoutInSeconds.GetValueOrDefault(); } set { this._idleDisconnectTimeoutInSeconds = value; } } // Check to see if IdleDisconnectTimeoutInSeconds property is set internal bool IsSetIdleDisconnectTimeoutInSeconds() { return this._idleDisconnectTimeoutInSeconds.HasValue; } /// <summary> /// Gets and sets the property ImageArn. /// <para> /// The ARN of the public, private, or shared image to use. /// </para> /// </summary> public string ImageArn { get { return this._imageArn; } set { this._imageArn = value; } } // Check to see if ImageArn property is set internal bool IsSetImageArn() { return this._imageArn != null; } /// <summary> /// Gets and sets the property ImageName. /// <para> /// The name of the image used to create the fleet. /// </para> /// </summary> [AWSProperty(Min=1)] public string ImageName { get { return this._imageName; } set { this._imageName = value; } } // Check to see if ImageName property is set internal bool IsSetImageName() { return this._imageName != null; } /// <summary> /// Gets and sets the property InstanceType. /// <para> /// The instance type to use when launching fleet instances. The following instance types /// are available: /// </para> /// <ul> <li> /// <para> /// stream.standard.small /// </para> /// </li> <li> /// <para> /// stream.standard.medium /// </para> /// </li> <li> /// <para> /// stream.standard.large /// </para> /// </li> <li> /// <para> /// stream.standard.xlarge /// </para> /// </li> <li> /// <para> /// stream.standard.2xlarge /// </para> /// </li> <li> /// <para> /// stream.compute.large /// </para> /// </li> <li> /// <para> /// stream.compute.xlarge /// </para> /// </li> <li> /// <para> /// stream.compute.2xlarge /// </para> /// </li> <li> /// <para> /// stream.compute.4xlarge /// </para> /// </li> <li> /// <para> /// stream.compute.8xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.large /// </para> /// </li> <li> /// <para> /// stream.memory.xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.2xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.4xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.8xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.z1d.large /// </para> /// </li> <li> /// <para> /// stream.memory.z1d.xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.z1d.2xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.z1d.3xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.z1d.6xlarge /// </para> /// </li> <li> /// <para> /// stream.memory.z1d.12xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics-design.large /// </para> /// </li> <li> /// <para> /// stream.graphics-design.xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics-design.2xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics-design.4xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics-desktop.2xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics.g4dn.xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics.g4dn.2xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics.g4dn.4xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics.g4dn.8xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics.g4dn.12xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics.g4dn.16xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics-pro.4xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics-pro.8xlarge /// </para> /// </li> <li> /// <para> /// stream.graphics-pro.16xlarge /// </para> /// </li> </ul> /// <para> /// The following instance types are available for Elastic fleets: /// </para> /// <ul> <li> /// <para> /// stream.standard.small /// </para> /// </li> <li> /// <para> /// stream.standard.medium /// </para> /// </li> <li> /// <para> /// stream.standard.large /// </para> /// </li> <li> /// <para> /// stream.standard.xlarge /// </para> /// </li> <li> /// <para> /// stream.standard.2xlarge /// </para> /// </li> </ul> /// </summary> [AWSProperty(Min=1)] public string InstanceType { get { return this._instanceType; } set { this._instanceType = value; } } // Check to see if InstanceType property is set internal bool IsSetInstanceType() { return this._instanceType != null; } /// <summary> /// Gets and sets the property MaxConcurrentSessions. /// <para> /// The maximum number of concurrent sessions for a fleet. /// </para> /// </summary> public int MaxConcurrentSessions { get { return this._maxConcurrentSessions.GetValueOrDefault(); } set { this._maxConcurrentSessions = value; } } // Check to see if MaxConcurrentSessions property is set internal bool IsSetMaxConcurrentSessions() { return this._maxConcurrentSessions.HasValue; } /// <summary> /// Gets and sets the property MaxUserDurationInSeconds. /// <para> /// The maximum amount of time that a streaming session can remain active, in seconds. /// If users are still connected to a streaming instance five minutes before this limit /// is reached, they are prompted to save any open documents before being disconnected. /// After this time elapses, the instance is terminated and replaced by a new instance. /// </para> /// /// <para> /// Specify a value between 600 and 432000. /// </para> /// </summary> public int MaxUserDurationInSeconds { get { return this._maxUserDurationInSeconds.GetValueOrDefault(); } set { this._maxUserDurationInSeconds = value; } } // Check to see if MaxUserDurationInSeconds property is set internal bool IsSetMaxUserDurationInSeconds() { return this._maxUserDurationInSeconds.HasValue; } /// <summary> /// Gets and sets the property Name. /// <para> /// A unique name for the fleet. /// </para> /// </summary> [AWSProperty(Min=1)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property Platform. /// <para> /// The platform of the fleet. WINDOWS_SERVER_2019 and AMAZON_LINUX2 are supported for /// Elastic fleets. /// </para> /// </summary> public PlatformType Platform { get { return this._platform; } set { this._platform = value; } } // Check to see if Platform property is set internal bool IsSetPlatform() { return this._platform != null; } /// <summary> /// Gets and sets the property SessionScriptS3Location. /// <para> /// The S3 location of the session scripts configuration zip file. This only applies to /// Elastic fleets. /// </para> /// </summary> public S3Location SessionScriptS3Location { get { return this._sessionScriptS3Location; } set { this._sessionScriptS3Location = value; } } // Check to see if SessionScriptS3Location property is set internal bool IsSetSessionScriptS3Location() { return this._sessionScriptS3Location != null; } /// <summary> /// Gets and sets the property StreamView. /// <para> /// The AppStream 2.0 view that is displayed to your users when they stream from the fleet. /// When <code>APP</code> is specified, only the windows of applications opened by users /// display. When <code>DESKTOP</code> is specified, the standard desktop that is provided /// by the operating system displays. /// </para> /// /// <para> /// The default value is <code>APP</code>. /// </para> /// </summary> public StreamView StreamView { get { return this._streamView; } set { this._streamView = value; } } // Check to see if StreamView property is set internal bool IsSetStreamView() { return this._streamView != null; } /// <summary> /// Gets and sets the property UsbDeviceFilterStrings. /// <para> /// The USB device filter strings that specify which USB devices a user can redirect to /// the fleet streaming session, when using the Windows native client. This is allowed /// but not required for Elastic fleets. /// </para> /// </summary> public List<string> UsbDeviceFilterStrings { get { return this._usbDeviceFilterStrings; } set { this._usbDeviceFilterStrings = value; } } // Check to see if UsbDeviceFilterStrings property is set internal bool IsSetUsbDeviceFilterStrings() { return this._usbDeviceFilterStrings != null && this._usbDeviceFilterStrings.Count > 0; } /// <summary> /// Gets and sets the property VpcConfig. /// <para> /// The VPC configuration for the fleet. This is required for Elastic fleets, but not /// required for other fleet types. Elastic fleets require that you specify at least two /// subnets in different availability zones. /// </para> /// </summary> public VpcConfig VpcConfig { get { return this._vpcConfig; } set { this._vpcConfig = value; } } // Check to see if VpcConfig property is set internal bool IsSetVpcConfig() { return this._vpcConfig != null; } } }
709
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// This is the response object from the UpdateFleet operation. /// </summary> public partial class UpdateFleetResponse : AmazonWebServiceResponse { private Fleet _fleet; /// <summary> /// Gets and sets the property Fleet. /// <para> /// Information about the fleet. /// </para> /// </summary> public Fleet Fleet { get { return this._fleet; } set { this._fleet = value; } } // Check to see if Fleet property is set internal bool IsSetFleet() { return this._fleet != null; } } }
57
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Container for the parameters to the UpdateImagePermissions operation. /// Adds or updates permissions for the specified private image. /// </summary> public partial class UpdateImagePermissionsRequest : AmazonAppStreamRequest { private ImagePermissions _imagePermissions; private string _name; private string _sharedAccountId; /// <summary> /// Gets and sets the property ImagePermissions. /// <para> /// The permissions for the image. /// </para> /// </summary> [AWSProperty(Required=true)] public ImagePermissions ImagePermissions { get { return this._imagePermissions; } set { this._imagePermissions = value; } } // Check to see if ImagePermissions property is set internal bool IsSetImagePermissions() { return this._imagePermissions != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the private image. /// </para> /// </summary> [AWSProperty(Required=true)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property SharedAccountId. /// <para> /// The 12-digit identifier of the AWS account for which you want add or update image /// permissions. /// </para> /// </summary> [AWSProperty(Required=true)] public string SharedAccountId { get { return this._sharedAccountId; } set { this._sharedAccountId = value; } } // Check to see if SharedAccountId property is set internal bool IsSetSharedAccountId() { return this._sharedAccountId != null; } } }
100
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// This is the response object from the UpdateImagePermissions operation. /// </summary> public partial class UpdateImagePermissionsResponse : AmazonWebServiceResponse { } }
38
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Container for the parameters to the UpdateStack operation. /// Updates the specified fields for the specified stack. /// </summary> public partial class UpdateStackRequest : AmazonAppStreamRequest { private List<AccessEndpoint> _accessEndpoints = new List<AccessEndpoint>(); private ApplicationSettings _applicationSettings; private List<string> _attributesToDelete = new List<string>(); private bool? _deleteStorageConnectors; private string _description; private string _displayName; private List<string> _embedHostDomains = new List<string>(); private string _feedbackURL; private string _name; private string _redirectURL; private List<StorageConnector> _storageConnectors = new List<StorageConnector>(); private StreamingExperienceSettings _streamingExperienceSettings; private List<UserSetting> _userSettings = new List<UserSetting>(); /// <summary> /// Gets and sets the property AccessEndpoints. /// <para> /// The list of interface VPC endpoint (interface endpoint) objects. Users of the stack /// can connect to AppStream 2.0 only through the specified endpoints. /// </para> /// </summary> [AWSProperty(Min=1, Max=4)] public List<AccessEndpoint> AccessEndpoints { get { return this._accessEndpoints; } set { this._accessEndpoints = value; } } // Check to see if AccessEndpoints property is set internal bool IsSetAccessEndpoints() { return this._accessEndpoints != null && this._accessEndpoints.Count > 0; } /// <summary> /// Gets and sets the property ApplicationSettings. /// <para> /// The persistent application settings for users of a stack. When these settings are /// enabled, changes that users make to applications and Windows settings are automatically /// saved after each session and applied to the next session. /// </para> /// </summary> public ApplicationSettings ApplicationSettings { get { return this._applicationSettings; } set { this._applicationSettings = value; } } // Check to see if ApplicationSettings property is set internal bool IsSetApplicationSettings() { return this._applicationSettings != null; } /// <summary> /// Gets and sets the property AttributesToDelete. /// <para> /// The stack attributes to delete. /// </para> /// </summary> public List<string> AttributesToDelete { get { return this._attributesToDelete; } set { this._attributesToDelete = value; } } // Check to see if AttributesToDelete property is set internal bool IsSetAttributesToDelete() { return this._attributesToDelete != null && this._attributesToDelete.Count > 0; } /// <summary> /// Gets and sets the property DeleteStorageConnectors. /// <para> /// Deletes the storage connectors currently enabled for the stack. /// </para> /// </summary> [Obsolete("This property is deprecated")] public bool DeleteStorageConnectors { get { return this._deleteStorageConnectors.GetValueOrDefault(); } set { this._deleteStorageConnectors = value; } } // Check to see if DeleteStorageConnectors property is set internal bool IsSetDeleteStorageConnectors() { return this._deleteStorageConnectors.HasValue; } /// <summary> /// Gets and sets the property Description. /// <para> /// The description to display. /// </para> /// </summary> [AWSProperty(Max=256)] public string Description { get { return this._description; } set { this._description = value; } } // Check to see if Description property is set internal bool IsSetDescription() { return this._description != null; } /// <summary> /// Gets and sets the property DisplayName. /// <para> /// The stack name to display. /// </para> /// </summary> [AWSProperty(Max=100)] public string DisplayName { get { return this._displayName; } set { this._displayName = value; } } // Check to see if DisplayName property is set internal bool IsSetDisplayName() { return this._displayName != null; } /// <summary> /// Gets and sets the property EmbedHostDomains. /// <para> /// The domains where AppStream 2.0 streaming sessions can be embedded in an iframe. You /// must approve the domains that you want to host embedded AppStream 2.0 streaming sessions. /// /// </para> /// </summary> [AWSProperty(Min=1, Max=20)] public List<string> EmbedHostDomains { get { return this._embedHostDomains; } set { this._embedHostDomains = value; } } // Check to see if EmbedHostDomains property is set internal bool IsSetEmbedHostDomains() { return this._embedHostDomains != null && this._embedHostDomains.Count > 0; } /// <summary> /// Gets and sets the property FeedbackURL. /// <para> /// The URL that users are redirected to after they choose the Send Feedback link. If /// no URL is specified, no Send Feedback link is displayed. /// </para> /// </summary> [AWSProperty(Max=1000)] public string FeedbackURL { get { return this._feedbackURL; } set { this._feedbackURL = value; } } // Check to see if FeedbackURL property is set internal bool IsSetFeedbackURL() { return this._feedbackURL != null; } /// <summary> /// Gets and sets the property Name. /// <para> /// The name of the stack. /// </para> /// </summary> [AWSProperty(Required=true, Min=1)] public string Name { get { return this._name; } set { this._name = value; } } // Check to see if Name property is set internal bool IsSetName() { return this._name != null; } /// <summary> /// Gets and sets the property RedirectURL. /// <para> /// The URL that users are redirected to after their streaming session ends. /// </para> /// </summary> [AWSProperty(Max=1000)] public string RedirectURL { get { return this._redirectURL; } set { this._redirectURL = value; } } // Check to see if RedirectURL property is set internal bool IsSetRedirectURL() { return this._redirectURL != null; } /// <summary> /// Gets and sets the property StorageConnectors. /// <para> /// The storage connectors to enable. /// </para> /// </summary> public List<StorageConnector> StorageConnectors { get { return this._storageConnectors; } set { this._storageConnectors = value; } } // Check to see if StorageConnectors property is set internal bool IsSetStorageConnectors() { return this._storageConnectors != null && this._storageConnectors.Count > 0; } /// <summary> /// Gets and sets the property StreamingExperienceSettings. /// <para> /// The streaming protocol you want your stack to prefer. This can be UDP or TCP. Currently, /// UDP is only supported in the Windows native client. /// </para> /// </summary> public StreamingExperienceSettings StreamingExperienceSettings { get { return this._streamingExperienceSettings; } set { this._streamingExperienceSettings = value; } } // Check to see if StreamingExperienceSettings property is set internal bool IsSetStreamingExperienceSettings() { return this._streamingExperienceSettings != null; } /// <summary> /// Gets and sets the property UserSettings. /// <para> /// The actions that are enabled or disabled for users during their streaming sessions. /// By default, these actions are enabled. /// </para> /// </summary> [AWSProperty(Min=1)] public List<UserSetting> UserSettings { get { return this._userSettings; } set { this._userSettings = value; } } // Check to see if UserSettings property is set internal bool IsSetUserSettings() { return this._userSettings != null && this._userSettings.Count > 0; } } }
303
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// This is the response object from the UpdateStack operation. /// </summary> public partial class UpdateStackResponse : AmazonWebServiceResponse { private Stack _stack; /// <summary> /// Gets and sets the property Stack. /// <para> /// Information about the stack. /// </para> /// </summary> public Stack Stack { get { return this._stack; } set { this._stack = value; } } // Check to see if Stack property is set internal bool IsSetStack() { return this._stack != null; } } }
57
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Describes information about the usage report subscription. /// </summary> public partial class UsageReportSubscription { private DateTime? _lastGeneratedReportDate; private string _s3BucketName; private UsageReportSchedule _schedule; private List<LastReportGenerationExecutionError> _subscriptionErrors = new List<LastReportGenerationExecutionError>(); /// <summary> /// Gets and sets the property LastGeneratedReportDate. /// <para> /// The time when the last usage report was generated. /// </para> /// </summary> public DateTime LastGeneratedReportDate { get { return this._lastGeneratedReportDate.GetValueOrDefault(); } set { this._lastGeneratedReportDate = value; } } // Check to see if LastGeneratedReportDate property is set internal bool IsSetLastGeneratedReportDate() { return this._lastGeneratedReportDate.HasValue; } /// <summary> /// Gets and sets the property S3BucketName. /// <para> /// The Amazon S3 bucket where generated reports are stored. /// </para> /// /// <para> /// If you enabled on-instance session scripts and Amazon S3 logging for your session /// script configuration, AppStream 2.0 created an S3 bucket to store the script output. /// The bucket is unique to your account and Region. When you enable usage reporting in /// this case, AppStream 2.0 uses the same bucket to store your usage reports. If you /// haven't already enabled on-instance session scripts, when you enable usage reports, /// AppStream 2.0 creates a new S3 bucket. /// </para> /// </summary> [AWSProperty(Min=1)] public string S3BucketName { get { return this._s3BucketName; } set { this._s3BucketName = value; } } // Check to see if S3BucketName property is set internal bool IsSetS3BucketName() { return this._s3BucketName != null; } /// <summary> /// Gets and sets the property Schedule. /// <para> /// The schedule for generating usage reports. /// </para> /// </summary> public UsageReportSchedule Schedule { get { return this._schedule; } set { this._schedule = value; } } // Check to see if Schedule property is set internal bool IsSetSchedule() { return this._schedule != null; } /// <summary> /// Gets and sets the property SubscriptionErrors. /// <para> /// The errors that were returned if usage reports couldn't be generated. /// </para> /// </summary> public List<LastReportGenerationExecutionError> SubscriptionErrors { get { return this._subscriptionErrors; } set { this._subscriptionErrors = value; } } // Check to see if SubscriptionErrors property is set internal bool IsSetSubscriptionErrors() { return this._subscriptionErrors != null && this._subscriptionErrors.Count > 0; } } }
124
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Describes a user in the user pool. /// </summary> public partial class User { private string _arn; private AuthenticationType _authenticationType; private DateTime? _createdTime; private bool? _enabled; private string _firstName; private string _lastName; private string _status; private string _userName; /// <summary> /// Gets and sets the property Arn. /// <para> /// The ARN of the user. /// </para> /// </summary> public string Arn { get { return this._arn; } set { this._arn = value; } } // Check to see if Arn property is set internal bool IsSetArn() { return this._arn != null; } /// <summary> /// Gets and sets the property AuthenticationType. /// <para> /// The authentication type for the user. /// </para> /// </summary> [AWSProperty(Required=true)] public AuthenticationType AuthenticationType { get { return this._authenticationType; } set { this._authenticationType = value; } } // Check to see if AuthenticationType property is set internal bool IsSetAuthenticationType() { return this._authenticationType != null; } /// <summary> /// Gets and sets the property CreatedTime. /// <para> /// The date and time the user was created in the user pool. /// </para> /// </summary> public DateTime CreatedTime { get { return this._createdTime.GetValueOrDefault(); } set { this._createdTime = value; } } // Check to see if CreatedTime property is set internal bool IsSetCreatedTime() { return this._createdTime.HasValue; } /// <summary> /// Gets and sets the property Enabled. /// <para> /// Specifies whether the user in the user pool is enabled. /// </para> /// </summary> public bool Enabled { get { return this._enabled.GetValueOrDefault(); } set { this._enabled = value; } } // Check to see if Enabled property is set internal bool IsSetEnabled() { return this._enabled.HasValue; } /// <summary> /// Gets and sets the property FirstName. /// <para> /// The first name, or given name, of the user. /// </para> /// </summary> [AWSProperty(Sensitive=true, Max=2048)] public string FirstName { get { return this._firstName; } set { this._firstName = value; } } // Check to see if FirstName property is set internal bool IsSetFirstName() { return this._firstName != null; } /// <summary> /// Gets and sets the property LastName. /// <para> /// The last name, or surname, of the user. /// </para> /// </summary> [AWSProperty(Sensitive=true, Max=2048)] public string LastName { get { return this._lastName; } set { this._lastName = value; } } // Check to see if LastName property is set internal bool IsSetLastName() { return this._lastName != null; } /// <summary> /// Gets and sets the property Status. /// <para> /// The status of the user in the user pool. The status can be one of the following: /// </para> /// <ul> <li> /// <para> /// UNCONFIRMED – The user is created but not confirmed. /// </para> /// </li> <li> /// <para> /// CONFIRMED – The user is confirmed. /// </para> /// </li> <li> /// <para> /// ARCHIVED – The user is no longer active. /// </para> /// </li> <li> /// <para> /// COMPROMISED – The user is disabled because of a potential security threat. /// </para> /// </li> <li> /// <para> /// UNKNOWN – The user status is not known. /// </para> /// </li> </ul> /// </summary> [AWSProperty(Min=1)] public string Status { get { return this._status; } set { this._status = value; } } // Check to see if Status property is set internal bool IsSetStatus() { return this._status != null; } /// <summary> /// Gets and sets the property UserName. /// <para> /// The email address of the user. /// </para> /// <note> /// <para> /// Users' email addresses are case-sensitive. /// </para> /// </note> /// </summary> [AWSProperty(Sensitive=true, Min=1, Max=128)] public string UserName { get { return this._userName; } set { this._userName = value; } } // Check to see if UserName property is set internal bool IsSetUserName() { return this._userName != null; } } }
221
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Describes an action and whether the action is enabled or disabled for users during /// their streaming sessions. /// </summary> public partial class UserSetting { private Action _action; private Permission _permission; /// <summary> /// Gets and sets the property Action. /// <para> /// The action that is enabled or disabled. /// </para> /// </summary> [AWSProperty(Required=true)] public Action Action { get { return this._action; } set { this._action = value; } } // Check to see if Action property is set internal bool IsSetAction() { return this._action != null; } /// <summary> /// Gets and sets the property Permission. /// <para> /// Indicates whether the action is enabled or disabled. /// </para> /// </summary> [AWSProperty(Required=true)] public Permission Permission { get { return this._permission; } set { this._permission = value; } } // Check to see if Permission property is set internal bool IsSetPermission() { return this._permission != null; } } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Describes a user in the user pool and the associated stack. /// </summary> public partial class UserStackAssociation { private AuthenticationType _authenticationType; private bool? _sendEmailNotification; private string _stackName; private string _userName; /// <summary> /// Gets and sets the property AuthenticationType. /// <para> /// The authentication type for the user. /// </para> /// </summary> [AWSProperty(Required=true)] public AuthenticationType AuthenticationType { get { return this._authenticationType; } set { this._authenticationType = value; } } // Check to see if AuthenticationType property is set internal bool IsSetAuthenticationType() { return this._authenticationType != null; } /// <summary> /// Gets and sets the property SendEmailNotification. /// <para> /// Specifies whether a welcome email is sent to a user after the user is created in the /// user pool. /// </para> /// </summary> public bool SendEmailNotification { get { return this._sendEmailNotification.GetValueOrDefault(); } set { this._sendEmailNotification = value; } } // Check to see if SendEmailNotification property is set internal bool IsSetSendEmailNotification() { return this._sendEmailNotification.HasValue; } /// <summary> /// Gets and sets the property StackName. /// <para> /// The name of the stack that is associated with the user. /// </para> /// </summary> [AWSProperty(Required=true, Min=1)] public string StackName { get { return this._stackName; } set { this._stackName = value; } } // Check to see if StackName property is set internal bool IsSetStackName() { return this._stackName != null; } /// <summary> /// Gets and sets the property UserName. /// <para> /// The email address of the user who is associated with the stack. /// </para> /// <note> /// <para> /// Users' email addresses are case-sensitive. /// </para> /// </note> /// </summary> [AWSProperty(Required=true, Sensitive=true, Min=1, Max=128)] public string UserName { get { return this._userName; } set { this._userName = value; } } // Check to see if UserName property is set internal bool IsSetUserName() { return this._userName != null; } } }
123
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Describes the error that is returned when a user can’t be associated with or disassociated /// from a stack. /// </summary> public partial class UserStackAssociationError { private UserStackAssociationErrorCode _errorCode; private string _errorMessage; private UserStackAssociation _userStackAssociation; /// <summary> /// Gets and sets the property ErrorCode. /// <para> /// The error code for the error that is returned when a user can’t be associated with /// or disassociated from a stack. /// </para> /// </summary> public UserStackAssociationErrorCode ErrorCode { get { return this._errorCode; } set { this._errorCode = value; } } // Check to see if ErrorCode property is set internal bool IsSetErrorCode() { return this._errorCode != null; } /// <summary> /// Gets and sets the property ErrorMessage. /// <para> /// The error message for the error that is returned when a user can’t be associated with /// or disassociated from a stack. /// </para> /// </summary> [AWSProperty(Min=1)] public string ErrorMessage { get { return this._errorMessage; } set { this._errorMessage = value; } } // Check to see if ErrorMessage property is set internal bool IsSetErrorMessage() { return this._errorMessage != null; } /// <summary> /// Gets and sets the property UserStackAssociation. /// <para> /// Information about the user and associated stack. /// </para> /// </summary> public UserStackAssociation UserStackAssociation { get { return this._userStackAssociation; } set { this._userStackAssociation = value; } } // Check to see if UserStackAssociation property is set internal bool IsSetUserStackAssociation() { return this._userStackAssociation != null; } } }
99
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; using System.Net; using Amazon.Runtime; using Amazon.Runtime.Internal; namespace Amazon.AppStream.Model { /// <summary> /// Describes VPC configuration information for fleets and image builders. /// </summary> public partial class VpcConfig { private List<string> _securityGroupIds = new List<string>(); private List<string> _subnetIds = new List<string>(); /// <summary> /// Gets and sets the property SecurityGroupIds. /// <para> /// The identifiers of the security groups for the fleet or image builder. /// </para> /// </summary> [AWSProperty(Max=5)] public List<string> SecurityGroupIds { get { return this._securityGroupIds; } set { this._securityGroupIds = value; } } // Check to see if SecurityGroupIds property is set internal bool IsSetSecurityGroupIds() { return this._securityGroupIds != null && this._securityGroupIds.Count > 0; } /// <summary> /// Gets and sets the property SubnetIds. /// <para> /// The identifiers of the subnets to which a network interface is attached from the fleet /// instance or image builder instance. Fleet instances use one or more subnets. Image /// builder instances use one subnet. /// </para> /// </summary> public List<string> SubnetIds { get { return this._subnetIds; } set { this._subnetIds = value; } } // Check to see if SubnetIds property is set internal bool IsSetSubnetIds() { return this._subnetIds != null && this._subnetIds.Count > 0; } } }
79
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// AccessEndpoint Marshaller /// </summary> public class AccessEndpointMarshaller : IRequestMarshaller<AccessEndpoint, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(AccessEndpoint requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEndpointType()) { context.Writer.WritePropertyName("EndpointType"); context.Writer.Write(requestObject.EndpointType); } if(requestObject.IsSetVpceId()) { context.Writer.WritePropertyName("VpceId"); context.Writer.Write(requestObject.VpceId); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static AccessEndpointMarshaller Instance = new AccessEndpointMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AccessEndpoint Object /// </summary> public class AccessEndpointUnmarshaller : IUnmarshaller<AccessEndpoint, XmlUnmarshallerContext>, IUnmarshaller<AccessEndpoint, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AccessEndpoint IUnmarshaller<AccessEndpoint, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AccessEndpoint Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AccessEndpoint unmarshalledObject = new AccessEndpoint(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("EndpointType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EndpointType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VpceId = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AccessEndpointUnmarshaller _instance = new AccessEndpointUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AccessEndpointUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AppBlockBuilderAppBlockAssociation Object /// </summary> public class AppBlockBuilderAppBlockAssociationUnmarshaller : IUnmarshaller<AppBlockBuilderAppBlockAssociation, XmlUnmarshallerContext>, IUnmarshaller<AppBlockBuilderAppBlockAssociation, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AppBlockBuilderAppBlockAssociation IUnmarshaller<AppBlockBuilderAppBlockAssociation, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AppBlockBuilderAppBlockAssociation Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AppBlockBuilderAppBlockAssociation unmarshalledObject = new AppBlockBuilderAppBlockAssociation(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AppBlockArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AppBlockArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AppBlockBuilderName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AppBlockBuilderName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AppBlockBuilderAppBlockAssociationUnmarshaller _instance = new AppBlockBuilderAppBlockAssociationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AppBlockBuilderAppBlockAssociationUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AppBlockBuilderStateChangeReason Object /// </summary> public class AppBlockBuilderStateChangeReasonUnmarshaller : IUnmarshaller<AppBlockBuilderStateChangeReason, XmlUnmarshallerContext>, IUnmarshaller<AppBlockBuilderStateChangeReason, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AppBlockBuilderStateChangeReason IUnmarshaller<AppBlockBuilderStateChangeReason, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AppBlockBuilderStateChangeReason Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AppBlockBuilderStateChangeReason unmarshalledObject = new AppBlockBuilderStateChangeReason(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Code", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Code = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Message", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Message = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AppBlockBuilderStateChangeReasonUnmarshaller _instance = new AppBlockBuilderStateChangeReasonUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AppBlockBuilderStateChangeReasonUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AppBlockBuilder Object /// </summary> public class AppBlockBuilderUnmarshaller : IUnmarshaller<AppBlockBuilder, XmlUnmarshallerContext>, IUnmarshaller<AppBlockBuilder, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AppBlockBuilder IUnmarshaller<AppBlockBuilder, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AppBlockBuilder Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AppBlockBuilder unmarshalledObject = new AppBlockBuilder(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AccessEndpoints", targetDepth)) { var unmarshaller = new ListUnmarshaller<AccessEndpoint, AccessEndpointUnmarshaller>(AccessEndpointUnmarshaller.Instance); unmarshalledObject.AccessEndpoints = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AppBlockBuilderErrors", targetDepth)) { var unmarshaller = new ListUnmarshaller<ResourceError, ResourceErrorUnmarshaller>(ResourceErrorUnmarshaller.Instance); unmarshalledObject.AppBlockBuilderErrors = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EnableDefaultInternetAccess", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.EnableDefaultInternetAccess = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IamRoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IamRoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InstanceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.InstanceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Platform", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Platform = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StateChangeReason", targetDepth)) { var unmarshaller = AppBlockBuilderStateChangeReasonUnmarshaller.Instance; unmarshalledObject.StateChangeReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpcConfig", targetDepth)) { var unmarshaller = VpcConfigUnmarshaller.Instance; unmarshalledObject.VpcConfig = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AppBlockBuilderUnmarshaller _instance = new AppBlockBuilderUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AppBlockBuilderUnmarshaller Instance { get { return _instance; } } } }
170
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AppBlock Object /// </summary> public class AppBlockUnmarshaller : IUnmarshaller<AppBlock, XmlUnmarshallerContext>, IUnmarshaller<AppBlock, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> AppBlock IUnmarshaller<AppBlock, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public AppBlock Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; AppBlock unmarshalledObject = new AppBlock(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AppBlockErrors", targetDepth)) { var unmarshaller = new ListUnmarshaller<ErrorDetails, ErrorDetailsUnmarshaller>(ErrorDetailsUnmarshaller.Instance); unmarshalledObject.AppBlockErrors = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PackagingType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.PackagingType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PostSetupScriptDetails", targetDepth)) { var unmarshaller = ScriptDetailsUnmarshaller.Instance; unmarshalledObject.PostSetupScriptDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SetupScriptDetails", targetDepth)) { var unmarshaller = ScriptDetailsUnmarshaller.Instance; unmarshalledObject.SetupScriptDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SourceS3Location", targetDepth)) { var unmarshaller = S3LocationUnmarshaller.Instance; unmarshalledObject.SourceS3Location = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static AppBlockUnmarshaller _instance = new AppBlockUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static AppBlockUnmarshaller Instance { get { return _instance; } } } }
152
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ApplicationFleetAssociation Object /// </summary> public class ApplicationFleetAssociationUnmarshaller : IUnmarshaller<ApplicationFleetAssociation, XmlUnmarshallerContext>, IUnmarshaller<ApplicationFleetAssociation, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ApplicationFleetAssociation IUnmarshaller<ApplicationFleetAssociation, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ApplicationFleetAssociation Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ApplicationFleetAssociation unmarshalledObject = new ApplicationFleetAssociation(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ApplicationArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ApplicationArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FleetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FleetName = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ApplicationFleetAssociationUnmarshaller _instance = new ApplicationFleetAssociationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ApplicationFleetAssociationUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// ApplicationSettings Marshaller /// </summary> public class ApplicationSettingsMarshaller : IRequestMarshaller<ApplicationSettings, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(ApplicationSettings requestObject, JsonMarshallerContext context) { if(requestObject.IsSetEnabled()) { context.Writer.WritePropertyName("Enabled"); context.Writer.Write(requestObject.Enabled); } if(requestObject.IsSetSettingsGroup()) { context.Writer.WritePropertyName("SettingsGroup"); context.Writer.Write(requestObject.SettingsGroup); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ApplicationSettingsMarshaller Instance = new ApplicationSettingsMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ApplicationSettingsResponse Object /// </summary> public class ApplicationSettingsResponseUnmarshaller : IUnmarshaller<ApplicationSettingsResponse, XmlUnmarshallerContext>, IUnmarshaller<ApplicationSettingsResponse, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ApplicationSettingsResponse IUnmarshaller<ApplicationSettingsResponse, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ApplicationSettingsResponse Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ApplicationSettingsResponse unmarshalledObject = new ApplicationSettingsResponse(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("S3BucketName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.S3BucketName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SettingsGroup", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SettingsGroup = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ApplicationSettingsResponseUnmarshaller _instance = new ApplicationSettingsResponseUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ApplicationSettingsResponseUnmarshaller Instance { get { return _instance; } } } }
104
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for Application Object /// </summary> public class ApplicationUnmarshaller : IUnmarshaller<Application, XmlUnmarshallerContext>, IUnmarshaller<Application, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> Application IUnmarshaller<Application, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Application Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; Application unmarshalledObject = new Application(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AppBlockArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AppBlockArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Enabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Enabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IconS3Location", targetDepth)) { var unmarshaller = S3LocationUnmarshaller.Instance; unmarshalledObject.IconS3Location = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IconURL", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IconURL = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InstanceFamilies", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.InstanceFamilies = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LaunchParameters", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LaunchParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LaunchPath", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LaunchPath = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Metadata", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Metadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Platforms", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.Platforms = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("WorkingDirectory", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.WorkingDirectory = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ApplicationUnmarshaller _instance = new ApplicationUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ApplicationUnmarshaller Instance { get { return _instance; } } } }
176
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// AssociateAppBlockBuilderAppBlock Request Marshaller /// </summary> public class AssociateAppBlockBuilderAppBlockRequestMarshaller : IMarshaller<IRequest, AssociateAppBlockBuilderAppBlockRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((AssociateAppBlockBuilderAppBlockRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(AssociateAppBlockBuilderAppBlockRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.AssociateAppBlockBuilderAppBlock"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAppBlockArn()) { context.Writer.WritePropertyName("AppBlockArn"); context.Writer.Write(publicRequest.AppBlockArn); } if(publicRequest.IsSetAppBlockBuilderName()) { context.Writer.WritePropertyName("AppBlockBuilderName"); context.Writer.Write(publicRequest.AppBlockBuilderName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static AssociateAppBlockBuilderAppBlockRequestMarshaller _instance = new AssociateAppBlockBuilderAppBlockRequestMarshaller(); internal static AssociateAppBlockBuilderAppBlockRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateAppBlockBuilderAppBlockRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AssociateAppBlockBuilderAppBlock operation /// </summary> public class AssociateAppBlockBuilderAppBlockResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AssociateAppBlockBuilderAppBlockResponse response = new AssociateAppBlockBuilderAppBlockResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AppBlockBuilderAppBlockAssociation", targetDepth)) { var unmarshaller = AppBlockBuilderAppBlockAssociationUnmarshaller.Instance; response.AppBlockBuilderAppBlockAssociation = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static AssociateAppBlockBuilderAppBlockResponseUnmarshaller _instance = new AssociateAppBlockBuilderAppBlockResponseUnmarshaller(); internal static AssociateAppBlockBuilderAppBlockResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateAppBlockBuilderAppBlockResponseUnmarshaller Instance { get { return _instance; } } } }
126
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// AssociateApplicationFleet Request Marshaller /// </summary> public class AssociateApplicationFleetRequestMarshaller : IMarshaller<IRequest, AssociateApplicationFleetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((AssociateApplicationFleetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(AssociateApplicationFleetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.AssociateApplicationFleet"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetApplicationArn()) { context.Writer.WritePropertyName("ApplicationArn"); context.Writer.Write(publicRequest.ApplicationArn); } if(publicRequest.IsSetFleetName()) { context.Writer.WritePropertyName("FleetName"); context.Writer.Write(publicRequest.FleetName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static AssociateApplicationFleetRequestMarshaller _instance = new AssociateApplicationFleetRequestMarshaller(); internal static AssociateApplicationFleetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateApplicationFleetRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AssociateApplicationFleet operation /// </summary> public class AssociateApplicationFleetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AssociateApplicationFleetResponse response = new AssociateApplicationFleetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ApplicationFleetAssociation", targetDepth)) { var unmarshaller = ApplicationFleetAssociationUnmarshaller.Instance; response.ApplicationFleetAssociation = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static AssociateApplicationFleetResponseUnmarshaller _instance = new AssociateApplicationFleetResponseUnmarshaller(); internal static AssociateApplicationFleetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateApplicationFleetResponseUnmarshaller Instance { get { return _instance; } } } }
126
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// AssociateApplicationToEntitlement Request Marshaller /// </summary> public class AssociateApplicationToEntitlementRequestMarshaller : IMarshaller<IRequest, AssociateApplicationToEntitlementRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((AssociateApplicationToEntitlementRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(AssociateApplicationToEntitlementRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.AssociateApplicationToEntitlement"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetApplicationIdentifier()) { context.Writer.WritePropertyName("ApplicationIdentifier"); context.Writer.Write(publicRequest.ApplicationIdentifier); } if(publicRequest.IsSetEntitlementName()) { context.Writer.WritePropertyName("EntitlementName"); context.Writer.Write(publicRequest.EntitlementName); } if(publicRequest.IsSetStackName()) { context.Writer.WritePropertyName("StackName"); context.Writer.Write(publicRequest.StackName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static AssociateApplicationToEntitlementRequestMarshaller _instance = new AssociateApplicationToEntitlementRequestMarshaller(); internal static AssociateApplicationToEntitlementRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateApplicationToEntitlementRequestMarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AssociateApplicationToEntitlement operation /// </summary> public class AssociateApplicationToEntitlementResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AssociateApplicationToEntitlementResponse response = new AssociateApplicationToEntitlementResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("EntitlementNotFoundException")) { return EntitlementNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static AssociateApplicationToEntitlementResponseUnmarshaller _instance = new AssociateApplicationToEntitlementResponseUnmarshaller(); internal static AssociateApplicationToEntitlementResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateApplicationToEntitlementResponseUnmarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// AssociateFleet Request Marshaller /// </summary> public class AssociateFleetRequestMarshaller : IMarshaller<IRequest, AssociateFleetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((AssociateFleetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(AssociateFleetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.AssociateFleet"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetFleetName()) { context.Writer.WritePropertyName("FleetName"); context.Writer.Write(publicRequest.FleetName); } if(publicRequest.IsSetStackName()) { context.Writer.WritePropertyName("StackName"); context.Writer.Write(publicRequest.StackName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static AssociateFleetRequestMarshaller _instance = new AssociateFleetRequestMarshaller(); internal static AssociateFleetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateFleetRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for AssociateFleet operation /// </summary> public class AssociateFleetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AssociateFleetResponse response = new AssociateFleetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("IncompatibleImageException")) { return IncompatibleImageExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static AssociateFleetResponseUnmarshaller _instance = new AssociateFleetResponseUnmarshaller(); internal static AssociateFleetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static AssociateFleetResponseUnmarshaller Instance { get { return _instance; } } } }
119
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// BatchAssociateUserStack Request Marshaller /// </summary> public class BatchAssociateUserStackRequestMarshaller : IMarshaller<IRequest, BatchAssociateUserStackRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((BatchAssociateUserStackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(BatchAssociateUserStackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.BatchAssociateUserStack"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetUserStackAssociations()) { context.Writer.WritePropertyName("UserStackAssociations"); context.Writer.WriteArrayStart(); foreach(var publicRequestUserStackAssociationsListValue in publicRequest.UserStackAssociations) { context.Writer.WriteObjectStart(); var marshaller = UserStackAssociationMarshaller.Instance; marshaller.Marshall(publicRequestUserStackAssociationsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static BatchAssociateUserStackRequestMarshaller _instance = new BatchAssociateUserStackRequestMarshaller(); internal static BatchAssociateUserStackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchAssociateUserStackRequestMarshaller Instance { get { return _instance; } } } }
113
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchAssociateUserStack operation /// </summary> public class BatchAssociateUserStackResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { BatchAssociateUserStackResponse response = new BatchAssociateUserStackResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("errors", targetDepth)) { var unmarshaller = new ListUnmarshaller<UserStackAssociationError, UserStackAssociationErrorUnmarshaller>(UserStackAssociationErrorUnmarshaller.Instance); response.Errors = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static BatchAssociateUserStackResponseUnmarshaller _instance = new BatchAssociateUserStackResponseUnmarshaller(); internal static BatchAssociateUserStackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchAssociateUserStackResponseUnmarshaller Instance { get { return _instance; } } } }
114
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// BatchDisassociateUserStack Request Marshaller /// </summary> public class BatchDisassociateUserStackRequestMarshaller : IMarshaller<IRequest, BatchDisassociateUserStackRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((BatchDisassociateUserStackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(BatchDisassociateUserStackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.BatchDisassociateUserStack"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetUserStackAssociations()) { context.Writer.WritePropertyName("UserStackAssociations"); context.Writer.WriteArrayStart(); foreach(var publicRequestUserStackAssociationsListValue in publicRequest.UserStackAssociations) { context.Writer.WriteObjectStart(); var marshaller = UserStackAssociationMarshaller.Instance; marshaller.Marshall(publicRequestUserStackAssociationsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static BatchDisassociateUserStackRequestMarshaller _instance = new BatchDisassociateUserStackRequestMarshaller(); internal static BatchDisassociateUserStackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchDisassociateUserStackRequestMarshaller Instance { get { return _instance; } } } }
113
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for BatchDisassociateUserStack operation /// </summary> public class BatchDisassociateUserStackResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { BatchDisassociateUserStackResponse response = new BatchDisassociateUserStackResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("errors", targetDepth)) { var unmarshaller = new ListUnmarshaller<UserStackAssociationError, UserStackAssociationErrorUnmarshaller>(UserStackAssociationErrorUnmarshaller.Instance); response.Errors = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static BatchDisassociateUserStackResponseUnmarshaller _instance = new BatchDisassociateUserStackResponseUnmarshaller(); internal static BatchDisassociateUserStackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static BatchDisassociateUserStackResponseUnmarshaller Instance { get { return _instance; } } } }
114
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CertificateBasedAuthProperties Marshaller /// </summary> public class CertificateBasedAuthPropertiesMarshaller : IRequestMarshaller<CertificateBasedAuthProperties, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(CertificateBasedAuthProperties requestObject, JsonMarshallerContext context) { if(requestObject.IsSetCertificateAuthorityArn()) { context.Writer.WritePropertyName("CertificateAuthorityArn"); context.Writer.Write(requestObject.CertificateAuthorityArn); } if(requestObject.IsSetStatus()) { context.Writer.WritePropertyName("Status"); context.Writer.Write(requestObject.Status); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static CertificateBasedAuthPropertiesMarshaller Instance = new CertificateBasedAuthPropertiesMarshaller(); } }
68
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CertificateBasedAuthProperties Object /// </summary> public class CertificateBasedAuthPropertiesUnmarshaller : IUnmarshaller<CertificateBasedAuthProperties, XmlUnmarshallerContext>, IUnmarshaller<CertificateBasedAuthProperties, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> CertificateBasedAuthProperties IUnmarshaller<CertificateBasedAuthProperties, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public CertificateBasedAuthProperties Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; CertificateBasedAuthProperties unmarshalledObject = new CertificateBasedAuthProperties(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CertificateAuthorityArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CertificateAuthorityArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static CertificateBasedAuthPropertiesUnmarshaller _instance = new CertificateBasedAuthPropertiesUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static CertificateBasedAuthPropertiesUnmarshaller Instance { get { return _instance; } } } }
98
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// ComputeCapacity Marshaller /// </summary> public class ComputeCapacityMarshaller : IRequestMarshaller<ComputeCapacity, JsonMarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="requestObject"></param> /// <param name="context"></param> /// <returns></returns> public void Marshall(ComputeCapacity requestObject, JsonMarshallerContext context) { if(requestObject.IsSetDesiredInstances()) { context.Writer.WritePropertyName("DesiredInstances"); context.Writer.Write(requestObject.DesiredInstances); } } /// <summary> /// Singleton Marshaller. /// </summary> public readonly static ComputeCapacityMarshaller Instance = new ComputeCapacityMarshaller(); } }
62
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ComputeCapacityStatus Object /// </summary> public class ComputeCapacityStatusUnmarshaller : IUnmarshaller<ComputeCapacityStatus, XmlUnmarshallerContext>, IUnmarshaller<ComputeCapacityStatus, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> ComputeCapacityStatus IUnmarshaller<ComputeCapacityStatus, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context) { throw new NotImplementedException(); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ComputeCapacityStatus Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; ComputeCapacityStatus unmarshalledObject = new ComputeCapacityStatus(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Available", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Available = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Desired", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Desired = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InUse", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.InUse = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Running", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.Running = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; } private static ComputeCapacityStatusUnmarshaller _instance = new ComputeCapacityStatusUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ComputeCapacityStatusUnmarshaller Instance { get { return _instance; } } } }
110
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for ConcurrentModificationException Object /// </summary> public class ConcurrentModificationExceptionUnmarshaller : IErrorResponseUnmarshaller<ConcurrentModificationException, JsonUnmarshallerContext> { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ConcurrentModificationException Unmarshall(JsonUnmarshallerContext context) { return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse()); } /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <param name="errorResponse"></param> /// <returns></returns> public ConcurrentModificationException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse) { context.Read(); ConcurrentModificationException unmarshalledObject = new ConcurrentModificationException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { } return unmarshalledObject; } private static ConcurrentModificationExceptionUnmarshaller _instance = new ConcurrentModificationExceptionUnmarshaller(); /// <summary> /// Gets the singleton. /// </summary> public static ConcurrentModificationExceptionUnmarshaller Instance { get { return _instance; } } } }
85
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CopyImage Request Marshaller /// </summary> public class CopyImageRequestMarshaller : IMarshaller<IRequest, CopyImageRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CopyImageRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CopyImageRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CopyImage"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDestinationImageDescription()) { context.Writer.WritePropertyName("DestinationImageDescription"); context.Writer.Write(publicRequest.DestinationImageDescription); } if(publicRequest.IsSetDestinationImageName()) { context.Writer.WritePropertyName("DestinationImageName"); context.Writer.Write(publicRequest.DestinationImageName); } if(publicRequest.IsSetDestinationRegion()) { context.Writer.WritePropertyName("DestinationRegion"); context.Writer.Write(publicRequest.DestinationRegion); } if(publicRequest.IsSetSourceImageName()) { context.Writer.WritePropertyName("SourceImageName"); context.Writer.Write(publicRequest.SourceImageName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CopyImageRequestMarshaller _instance = new CopyImageRequestMarshaller(); internal static CopyImageRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CopyImageRequestMarshaller Instance { get { return _instance; } } } }
121
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CopyImage operation /// </summary> public class CopyImageResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CopyImageResponse response = new CopyImageResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DestinationImageName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DestinationImageName = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("IncompatibleImageException")) { return IncompatibleImageExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotAvailableException")) { return ResourceNotAvailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CopyImageResponseUnmarshaller _instance = new CopyImageResponseUnmarshaller(); internal static CopyImageResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CopyImageResponseUnmarshaller Instance { get { return _instance; } } } }
130
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateAppBlockBuilder Request Marshaller /// </summary> public class CreateAppBlockBuilderRequestMarshaller : IMarshaller<IRequest, CreateAppBlockBuilderRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateAppBlockBuilderRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateAppBlockBuilderRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateAppBlockBuilder"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccessEndpoints()) { context.Writer.WritePropertyName("AccessEndpoints"); context.Writer.WriteArrayStart(); foreach(var publicRequestAccessEndpointsListValue in publicRequest.AccessEndpoints) { context.Writer.WriteObjectStart(); var marshaller = AccessEndpointMarshaller.Instance; marshaller.Marshall(publicRequestAccessEndpointsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDisplayName()) { context.Writer.WritePropertyName("DisplayName"); context.Writer.Write(publicRequest.DisplayName); } if(publicRequest.IsSetEnableDefaultInternetAccess()) { context.Writer.WritePropertyName("EnableDefaultInternetAccess"); context.Writer.Write(publicRequest.EnableDefaultInternetAccess); } if(publicRequest.IsSetIamRoleArn()) { context.Writer.WritePropertyName("IamRoleArn"); context.Writer.Write(publicRequest.IamRoleArn); } if(publicRequest.IsSetInstanceType()) { context.Writer.WritePropertyName("InstanceType"); context.Writer.Write(publicRequest.InstanceType); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetPlatform()) { context.Writer.WritePropertyName("Platform"); context.Writer.Write(publicRequest.Platform); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetVpcConfig()) { context.Writer.WritePropertyName("VpcConfig"); context.Writer.WriteObjectStart(); var marshaller = VpcConfigMarshaller.Instance; marshaller.Marshall(publicRequest.VpcConfig, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateAppBlockBuilderRequestMarshaller _instance = new CreateAppBlockBuilderRequestMarshaller(); internal static CreateAppBlockBuilderRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAppBlockBuilderRequestMarshaller Instance { get { return _instance; } } } }
180
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateAppBlockBuilder operation /// </summary> public class CreateAppBlockBuilderResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAppBlockBuilderResponse response = new CreateAppBlockBuilderResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AppBlockBuilder", targetDepth)) { var unmarshaller = AppBlockBuilderUnmarshaller.Instance; response.AppBlockBuilder = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRoleException")) { return InvalidRoleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RequestLimitExceededException")) { return RequestLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotAvailableException")) { return ResourceNotAvailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAppBlockBuilderResponseUnmarshaller _instance = new CreateAppBlockBuilderResponseUnmarshaller(); internal static CreateAppBlockBuilderResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAppBlockBuilderResponseUnmarshaller Instance { get { return _instance; } } } }
146
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateAppBlockBuilderStreamingURL Request Marshaller /// </summary> public class CreateAppBlockBuilderStreamingURLRequestMarshaller : IMarshaller<IRequest, CreateAppBlockBuilderStreamingURLRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateAppBlockBuilderStreamingURLRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateAppBlockBuilderStreamingURLRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateAppBlockBuilderStreamingURL"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAppBlockBuilderName()) { context.Writer.WritePropertyName("AppBlockBuilderName"); context.Writer.Write(publicRequest.AppBlockBuilderName); } if(publicRequest.IsSetValidity()) { context.Writer.WritePropertyName("Validity"); context.Writer.Write(publicRequest.Validity); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateAppBlockBuilderStreamingURLRequestMarshaller _instance = new CreateAppBlockBuilderStreamingURLRequestMarshaller(); internal static CreateAppBlockBuilderStreamingURLRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAppBlockBuilderStreamingURLRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateAppBlockBuilderStreamingURL operation /// </summary> public class CreateAppBlockBuilderStreamingURLResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAppBlockBuilderStreamingURLResponse response = new CreateAppBlockBuilderStreamingURLResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Expires", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.Expires = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StreamingURL", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StreamingURL = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAppBlockBuilderStreamingURLResponseUnmarshaller _instance = new CreateAppBlockBuilderStreamingURLResponseUnmarshaller(); internal static CreateAppBlockBuilderStreamingURLResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAppBlockBuilderStreamingURLResponseUnmarshaller Instance { get { return _instance; } } } }
120
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateAppBlock Request Marshaller /// </summary> public class CreateAppBlockRequestMarshaller : IMarshaller<IRequest, CreateAppBlockRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateAppBlockRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateAppBlockRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateAppBlock"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDisplayName()) { context.Writer.WritePropertyName("DisplayName"); context.Writer.Write(publicRequest.DisplayName); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetPackagingType()) { context.Writer.WritePropertyName("PackagingType"); context.Writer.Write(publicRequest.PackagingType); } if(publicRequest.IsSetPostSetupScriptDetails()) { context.Writer.WritePropertyName("PostSetupScriptDetails"); context.Writer.WriteObjectStart(); var marshaller = ScriptDetailsMarshaller.Instance; marshaller.Marshall(publicRequest.PostSetupScriptDetails, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetSetupScriptDetails()) { context.Writer.WritePropertyName("SetupScriptDetails"); context.Writer.WriteObjectStart(); var marshaller = ScriptDetailsMarshaller.Instance; marshaller.Marshall(publicRequest.SetupScriptDetails, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetSourceS3Location()) { context.Writer.WritePropertyName("SourceS3Location"); context.Writer.WriteObjectStart(); var marshaller = S3LocationMarshaller.Instance; marshaller.Marshall(publicRequest.SourceS3Location, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateAppBlockRequestMarshaller _instance = new CreateAppBlockRequestMarshaller(); internal static CreateAppBlockRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAppBlockRequestMarshaller Instance { get { return _instance; } } } }
168
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateAppBlock operation /// </summary> public class CreateAppBlockResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateAppBlockResponse response = new CreateAppBlockResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AppBlock", targetDepth)) { var unmarshaller = AppBlockUnmarshaller.Instance; response.AppBlock = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateAppBlockResponseUnmarshaller _instance = new CreateAppBlockResponseUnmarshaller(); internal static CreateAppBlockResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateAppBlockResponseUnmarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateApplication Request Marshaller /// </summary> public class CreateApplicationRequestMarshaller : IMarshaller<IRequest, CreateApplicationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateApplicationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateApplicationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateApplication"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAppBlockArn()) { context.Writer.WritePropertyName("AppBlockArn"); context.Writer.Write(publicRequest.AppBlockArn); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDisplayName()) { context.Writer.WritePropertyName("DisplayName"); context.Writer.Write(publicRequest.DisplayName); } if(publicRequest.IsSetIconS3Location()) { context.Writer.WritePropertyName("IconS3Location"); context.Writer.WriteObjectStart(); var marshaller = S3LocationMarshaller.Instance; marshaller.Marshall(publicRequest.IconS3Location, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetInstanceFamilies()) { context.Writer.WritePropertyName("InstanceFamilies"); context.Writer.WriteArrayStart(); foreach(var publicRequestInstanceFamiliesListValue in publicRequest.InstanceFamilies) { context.Writer.Write(publicRequestInstanceFamiliesListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetLaunchParameters()) { context.Writer.WritePropertyName("LaunchParameters"); context.Writer.Write(publicRequest.LaunchParameters); } if(publicRequest.IsSetLaunchPath()) { context.Writer.WritePropertyName("LaunchPath"); context.Writer.Write(publicRequest.LaunchPath); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetPlatforms()) { context.Writer.WritePropertyName("Platforms"); context.Writer.WriteArrayStart(); foreach(var publicRequestPlatformsListValue in publicRequest.Platforms) { context.Writer.Write(publicRequestPlatformsListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetWorkingDirectory()) { context.Writer.WritePropertyName("WorkingDirectory"); context.Writer.Write(publicRequest.WorkingDirectory); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateApplicationRequestMarshaller _instance = new CreateApplicationRequestMarshaller(); internal static CreateApplicationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateApplicationRequestMarshaller Instance { get { return _instance; } } } }
186
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateApplication operation /// </summary> public class CreateApplicationResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateApplicationResponse response = new CreateApplicationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Application", targetDepth)) { var unmarshaller = ApplicationUnmarshaller.Instance; response.Application = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateApplicationResponseUnmarshaller _instance = new CreateApplicationResponseUnmarshaller(); internal static CreateApplicationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateApplicationResponseUnmarshaller Instance { get { return _instance; } } } }
126
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateDirectoryConfig Request Marshaller /// </summary> public class CreateDirectoryConfigRequestMarshaller : IMarshaller<IRequest, CreateDirectoryConfigRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateDirectoryConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateDirectoryConfigRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateDirectoryConfig"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetCertificateBasedAuthProperties()) { context.Writer.WritePropertyName("CertificateBasedAuthProperties"); context.Writer.WriteObjectStart(); var marshaller = CertificateBasedAuthPropertiesMarshaller.Instance; marshaller.Marshall(publicRequest.CertificateBasedAuthProperties, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetDirectoryName()) { context.Writer.WritePropertyName("DirectoryName"); context.Writer.Write(publicRequest.DirectoryName); } if(publicRequest.IsSetOrganizationalUnitDistinguishedNames()) { context.Writer.WritePropertyName("OrganizationalUnitDistinguishedNames"); context.Writer.WriteArrayStart(); foreach(var publicRequestOrganizationalUnitDistinguishedNamesListValue in publicRequest.OrganizationalUnitDistinguishedNames) { context.Writer.Write(publicRequestOrganizationalUnitDistinguishedNamesListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetServiceAccountCredentials()) { context.Writer.WritePropertyName("ServiceAccountCredentials"); context.Writer.WriteObjectStart(); var marshaller = ServiceAccountCredentialsMarshaller.Instance; marshaller.Marshall(publicRequest.ServiceAccountCredentials, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateDirectoryConfigRequestMarshaller _instance = new CreateDirectoryConfigRequestMarshaller(); internal static CreateDirectoryConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDirectoryConfigRequestMarshaller Instance { get { return _instance; } } } }
136
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateDirectoryConfig operation /// </summary> public class CreateDirectoryConfigResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateDirectoryConfigResponse response = new CreateDirectoryConfigResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DirectoryConfig", targetDepth)) { var unmarshaller = DirectoryConfigUnmarshaller.Instance; response.DirectoryConfig = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRoleException")) { return InvalidRoleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateDirectoryConfigResponseUnmarshaller _instance = new CreateDirectoryConfigResponseUnmarshaller(); internal static CreateDirectoryConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateDirectoryConfigResponseUnmarshaller Instance { get { return _instance; } } } }
130
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateEntitlement Request Marshaller /// </summary> public class CreateEntitlementRequestMarshaller : IMarshaller<IRequest, CreateEntitlementRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateEntitlementRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateEntitlementRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateEntitlement"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAppVisibility()) { context.Writer.WritePropertyName("AppVisibility"); context.Writer.Write(publicRequest.AppVisibility); } if(publicRequest.IsSetAttributes()) { context.Writer.WritePropertyName("Attributes"); context.Writer.WriteArrayStart(); foreach(var publicRequestAttributesListValue in publicRequest.Attributes) { context.Writer.WriteObjectStart(); var marshaller = EntitlementAttributeMarshaller.Instance; marshaller.Marshall(publicRequestAttributesListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetStackName()) { context.Writer.WritePropertyName("StackName"); context.Writer.Write(publicRequest.StackName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateEntitlementRequestMarshaller _instance = new CreateEntitlementRequestMarshaller(); internal static CreateEntitlementRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateEntitlementRequestMarshaller Instance { get { return _instance; } } } }
137
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateEntitlement operation /// </summary> public class CreateEntitlementResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateEntitlementResponse response = new CreateEntitlementResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Entitlement", targetDepth)) { var unmarshaller = EntitlementUnmarshaller.Instance; response.Entitlement = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("EntitlementAlreadyExistsException")) { return EntitlementAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateEntitlementResponseUnmarshaller _instance = new CreateEntitlementResponseUnmarshaller(); internal static CreateEntitlementResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateEntitlementResponseUnmarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateFleet Request Marshaller /// </summary> public class CreateFleetRequestMarshaller : IMarshaller<IRequest, CreateFleetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateFleetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateFleetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateFleet"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetComputeCapacity()) { context.Writer.WritePropertyName("ComputeCapacity"); context.Writer.WriteObjectStart(); var marshaller = ComputeCapacityMarshaller.Instance; marshaller.Marshall(publicRequest.ComputeCapacity, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDisconnectTimeoutInSeconds()) { context.Writer.WritePropertyName("DisconnectTimeoutInSeconds"); context.Writer.Write(publicRequest.DisconnectTimeoutInSeconds); } if(publicRequest.IsSetDisplayName()) { context.Writer.WritePropertyName("DisplayName"); context.Writer.Write(publicRequest.DisplayName); } if(publicRequest.IsSetDomainJoinInfo()) { context.Writer.WritePropertyName("DomainJoinInfo"); context.Writer.WriteObjectStart(); var marshaller = DomainJoinInfoMarshaller.Instance; marshaller.Marshall(publicRequest.DomainJoinInfo, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetEnableDefaultInternetAccess()) { context.Writer.WritePropertyName("EnableDefaultInternetAccess"); context.Writer.Write(publicRequest.EnableDefaultInternetAccess); } if(publicRequest.IsSetFleetType()) { context.Writer.WritePropertyName("FleetType"); context.Writer.Write(publicRequest.FleetType); } if(publicRequest.IsSetIamRoleArn()) { context.Writer.WritePropertyName("IamRoleArn"); context.Writer.Write(publicRequest.IamRoleArn); } if(publicRequest.IsSetIdleDisconnectTimeoutInSeconds()) { context.Writer.WritePropertyName("IdleDisconnectTimeoutInSeconds"); context.Writer.Write(publicRequest.IdleDisconnectTimeoutInSeconds); } if(publicRequest.IsSetImageArn()) { context.Writer.WritePropertyName("ImageArn"); context.Writer.Write(publicRequest.ImageArn); } if(publicRequest.IsSetImageName()) { context.Writer.WritePropertyName("ImageName"); context.Writer.Write(publicRequest.ImageName); } if(publicRequest.IsSetInstanceType()) { context.Writer.WritePropertyName("InstanceType"); context.Writer.Write(publicRequest.InstanceType); } if(publicRequest.IsSetMaxConcurrentSessions()) { context.Writer.WritePropertyName("MaxConcurrentSessions"); context.Writer.Write(publicRequest.MaxConcurrentSessions); } if(publicRequest.IsSetMaxUserDurationInSeconds()) { context.Writer.WritePropertyName("MaxUserDurationInSeconds"); context.Writer.Write(publicRequest.MaxUserDurationInSeconds); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetPlatform()) { context.Writer.WritePropertyName("Platform"); context.Writer.Write(publicRequest.Platform); } if(publicRequest.IsSetSessionScriptS3Location()) { context.Writer.WritePropertyName("SessionScriptS3Location"); context.Writer.WriteObjectStart(); var marshaller = S3LocationMarshaller.Instance; marshaller.Marshall(publicRequest.SessionScriptS3Location, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetStreamView()) { context.Writer.WritePropertyName("StreamView"); context.Writer.Write(publicRequest.StreamView); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetUsbDeviceFilterStrings()) { context.Writer.WritePropertyName("UsbDeviceFilterStrings"); context.Writer.WriteArrayStart(); foreach(var publicRequestUsbDeviceFilterStringsListValue in publicRequest.UsbDeviceFilterStrings) { context.Writer.Write(publicRequestUsbDeviceFilterStringsListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetVpcConfig()) { context.Writer.WritePropertyName("VpcConfig"); context.Writer.WriteObjectStart(); var marshaller = VpcConfigMarshaller.Instance; marshaller.Marshall(publicRequest.VpcConfig, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateFleetRequestMarshaller _instance = new CreateFleetRequestMarshaller(); internal static CreateFleetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateFleetRequestMarshaller Instance { get { return _instance; } } } }
256
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateFleet operation /// </summary> public class CreateFleetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateFleetResponse response = new CreateFleetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Fleet", targetDepth)) { var unmarshaller = FleetUnmarshaller.Instance; response.Fleet = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("IncompatibleImageException")) { return IncompatibleImageExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRoleException")) { return InvalidRoleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RequestLimitExceededException")) { return RequestLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotAvailableException")) { return ResourceNotAvailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateFleetResponseUnmarshaller _instance = new CreateFleetResponseUnmarshaller(); internal static CreateFleetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateFleetResponseUnmarshaller Instance { get { return _instance; } } } }
150
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateImageBuilder Request Marshaller /// </summary> public class CreateImageBuilderRequestMarshaller : IMarshaller<IRequest, CreateImageBuilderRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateImageBuilderRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateImageBuilderRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateImageBuilder"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccessEndpoints()) { context.Writer.WritePropertyName("AccessEndpoints"); context.Writer.WriteArrayStart(); foreach(var publicRequestAccessEndpointsListValue in publicRequest.AccessEndpoints) { context.Writer.WriteObjectStart(); var marshaller = AccessEndpointMarshaller.Instance; marshaller.Marshall(publicRequestAccessEndpointsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetAppstreamAgentVersion()) { context.Writer.WritePropertyName("AppstreamAgentVersion"); context.Writer.Write(publicRequest.AppstreamAgentVersion); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDisplayName()) { context.Writer.WritePropertyName("DisplayName"); context.Writer.Write(publicRequest.DisplayName); } if(publicRequest.IsSetDomainJoinInfo()) { context.Writer.WritePropertyName("DomainJoinInfo"); context.Writer.WriteObjectStart(); var marshaller = DomainJoinInfoMarshaller.Instance; marshaller.Marshall(publicRequest.DomainJoinInfo, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetEnableDefaultInternetAccess()) { context.Writer.WritePropertyName("EnableDefaultInternetAccess"); context.Writer.Write(publicRequest.EnableDefaultInternetAccess); } if(publicRequest.IsSetIamRoleArn()) { context.Writer.WritePropertyName("IamRoleArn"); context.Writer.Write(publicRequest.IamRoleArn); } if(publicRequest.IsSetImageArn()) { context.Writer.WritePropertyName("ImageArn"); context.Writer.Write(publicRequest.ImageArn); } if(publicRequest.IsSetImageName()) { context.Writer.WritePropertyName("ImageName"); context.Writer.Write(publicRequest.ImageName); } if(publicRequest.IsSetInstanceType()) { context.Writer.WritePropertyName("InstanceType"); context.Writer.Write(publicRequest.InstanceType); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetVpcConfig()) { context.Writer.WritePropertyName("VpcConfig"); context.Writer.WriteObjectStart(); var marshaller = VpcConfigMarshaller.Instance; marshaller.Marshall(publicRequest.VpcConfig, context); context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateImageBuilderRequestMarshaller _instance = new CreateImageBuilderRequestMarshaller(); internal static CreateImageBuilderRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateImageBuilderRequestMarshaller Instance { get { return _instance; } } } }
203
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateImageBuilder operation /// </summary> public class CreateImageBuilderResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateImageBuilderResponse response = new CreateImageBuilderResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ImageBuilder", targetDepth)) { var unmarshaller = ImageBuilderUnmarshaller.Instance; response.ImageBuilder = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("IncompatibleImageException")) { return IncompatibleImageExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRoleException")) { return InvalidRoleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("RequestLimitExceededException")) { return RequestLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotAvailableException")) { return ResourceNotAvailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateImageBuilderResponseUnmarshaller _instance = new CreateImageBuilderResponseUnmarshaller(); internal static CreateImageBuilderResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateImageBuilderResponseUnmarshaller Instance { get { return _instance; } } } }
150
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateImageBuilderStreamingURL Request Marshaller /// </summary> public class CreateImageBuilderStreamingURLRequestMarshaller : IMarshaller<IRequest, CreateImageBuilderStreamingURLRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateImageBuilderStreamingURLRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateImageBuilderStreamingURLRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateImageBuilderStreamingURL"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetValidity()) { context.Writer.WritePropertyName("Validity"); context.Writer.Write(publicRequest.Validity); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateImageBuilderStreamingURLRequestMarshaller _instance = new CreateImageBuilderStreamingURLRequestMarshaller(); internal static CreateImageBuilderStreamingURLRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateImageBuilderStreamingURLRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateImageBuilderStreamingURL operation /// </summary> public class CreateImageBuilderStreamingURLResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateImageBuilderStreamingURLResponse response = new CreateImageBuilderStreamingURLResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Expires", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.Expires = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StreamingURL", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StreamingURL = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateImageBuilderStreamingURLResponseUnmarshaller _instance = new CreateImageBuilderStreamingURLResponseUnmarshaller(); internal static CreateImageBuilderStreamingURLResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateImageBuilderStreamingURLResponseUnmarshaller Instance { get { return _instance; } } } }
120
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateStack Request Marshaller /// </summary> public class CreateStackRequestMarshaller : IMarshaller<IRequest, CreateStackRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateStackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateStackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateStack"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAccessEndpoints()) { context.Writer.WritePropertyName("AccessEndpoints"); context.Writer.WriteArrayStart(); foreach(var publicRequestAccessEndpointsListValue in publicRequest.AccessEndpoints) { context.Writer.WriteObjectStart(); var marshaller = AccessEndpointMarshaller.Instance; marshaller.Marshall(publicRequestAccessEndpointsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetApplicationSettings()) { context.Writer.WritePropertyName("ApplicationSettings"); context.Writer.WriteObjectStart(); var marshaller = ApplicationSettingsMarshaller.Instance; marshaller.Marshall(publicRequest.ApplicationSettings, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetDescription()) { context.Writer.WritePropertyName("Description"); context.Writer.Write(publicRequest.Description); } if(publicRequest.IsSetDisplayName()) { context.Writer.WritePropertyName("DisplayName"); context.Writer.Write(publicRequest.DisplayName); } if(publicRequest.IsSetEmbedHostDomains()) { context.Writer.WritePropertyName("EmbedHostDomains"); context.Writer.WriteArrayStart(); foreach(var publicRequestEmbedHostDomainsListValue in publicRequest.EmbedHostDomains) { context.Writer.Write(publicRequestEmbedHostDomainsListValue); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetFeedbackURL()) { context.Writer.WritePropertyName("FeedbackURL"); context.Writer.Write(publicRequest.FeedbackURL); } if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetRedirectURL()) { context.Writer.WritePropertyName("RedirectURL"); context.Writer.Write(publicRequest.RedirectURL); } if(publicRequest.IsSetStorageConnectors()) { context.Writer.WritePropertyName("StorageConnectors"); context.Writer.WriteArrayStart(); foreach(var publicRequestStorageConnectorsListValue in publicRequest.StorageConnectors) { context.Writer.WriteObjectStart(); var marshaller = StorageConnectorMarshaller.Instance; marshaller.Marshall(publicRequestStorageConnectorsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } if(publicRequest.IsSetStreamingExperienceSettings()) { context.Writer.WritePropertyName("StreamingExperienceSettings"); context.Writer.WriteObjectStart(); var marshaller = StreamingExperienceSettingsMarshaller.Instance; marshaller.Marshall(publicRequest.StreamingExperienceSettings, context); context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetTags()) { context.Writer.WritePropertyName("Tags"); context.Writer.WriteObjectStart(); foreach (var publicRequestTagsKvp in publicRequest.Tags) { context.Writer.WritePropertyName(publicRequestTagsKvp.Key); var publicRequestTagsValue = publicRequestTagsKvp.Value; context.Writer.Write(publicRequestTagsValue); } context.Writer.WriteObjectEnd(); } if(publicRequest.IsSetUserSettings()) { context.Writer.WritePropertyName("UserSettings"); context.Writer.WriteArrayStart(); foreach(var publicRequestUserSettingsListValue in publicRequest.UserSettings) { context.Writer.WriteObjectStart(); var marshaller = UserSettingMarshaller.Instance; marshaller.Marshall(publicRequestUserSettingsListValue, context); context.Writer.WriteObjectEnd(); } context.Writer.WriteArrayEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateStackRequestMarshaller _instance = new CreateStackRequestMarshaller(); internal static CreateStackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackRequestMarshaller Instance { get { return _instance; } } } }
222
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateStack operation /// </summary> public class CreateStackResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateStackResponse response = new CreateStackResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Stack", targetDepth)) { var unmarshaller = StackUnmarshaller.Instance; response.Stack = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRoleException")) { return InvalidRoleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateStackResponseUnmarshaller _instance = new CreateStackResponseUnmarshaller(); internal static CreateStackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStackResponseUnmarshaller Instance { get { return _instance; } } } }
134
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateStreamingURL Request Marshaller /// </summary> public class CreateStreamingURLRequestMarshaller : IMarshaller<IRequest, CreateStreamingURLRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateStreamingURLRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateStreamingURLRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateStreamingURL"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetApplicationId()) { context.Writer.WritePropertyName("ApplicationId"); context.Writer.Write(publicRequest.ApplicationId); } if(publicRequest.IsSetFleetName()) { context.Writer.WritePropertyName("FleetName"); context.Writer.Write(publicRequest.FleetName); } if(publicRequest.IsSetSessionContext()) { context.Writer.WritePropertyName("SessionContext"); context.Writer.Write(publicRequest.SessionContext); } if(publicRequest.IsSetStackName()) { context.Writer.WritePropertyName("StackName"); context.Writer.Write(publicRequest.StackName); } if(publicRequest.IsSetUserId()) { context.Writer.WritePropertyName("UserId"); context.Writer.Write(publicRequest.UserId); } if(publicRequest.IsSetValidity()) { context.Writer.WritePropertyName("Validity"); context.Writer.Write(publicRequest.Validity); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateStreamingURLRequestMarshaller _instance = new CreateStreamingURLRequestMarshaller(); internal static CreateStreamingURLRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStreamingURLRequestMarshaller Instance { get { return _instance; } } } }
133
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateStreamingURL operation /// </summary> public class CreateStreamingURLResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateStreamingURLResponse response = new CreateStreamingURLResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Expires", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.Expires = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StreamingURL", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StreamingURL = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotAvailableException")) { return ResourceNotAvailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateStreamingURLResponseUnmarshaller _instance = new CreateStreamingURLResponseUnmarshaller(); internal static CreateStreamingURLResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateStreamingURLResponseUnmarshaller Instance { get { return _instance; } } } }
128
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateUpdatedImage Request Marshaller /// </summary> public class CreateUpdatedImageRequestMarshaller : IMarshaller<IRequest, CreateUpdatedImageRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateUpdatedImageRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateUpdatedImageRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateUpdatedImage"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDryRun()) { context.Writer.WritePropertyName("dryRun"); context.Writer.Write(publicRequest.DryRun); } if(publicRequest.IsSetExistingImageName()) { context.Writer.WritePropertyName("existingImageName"); context.Writer.Write(publicRequest.ExistingImageName); } if(publicRequest.IsSetNewImageDescription()) { context.Writer.WritePropertyName("newImageDescription"); context.Writer.Write(publicRequest.NewImageDescription); } if(publicRequest.IsSetNewImageDisplayName()) { context.Writer.WritePropertyName("newImageDisplayName"); context.Writer.Write(publicRequest.NewImageDisplayName); } if(publicRequest.IsSetNewImageName()) { context.Writer.WritePropertyName("newImageName"); context.Writer.Write(publicRequest.NewImageName); } if(publicRequest.IsSetNewImageTags()) { context.Writer.WritePropertyName("newImageTags"); context.Writer.WriteObjectStart(); foreach (var publicRequestNewImageTagsKvp in publicRequest.NewImageTags) { context.Writer.WritePropertyName(publicRequestNewImageTagsKvp.Key); var publicRequestNewImageTagsValue = publicRequestNewImageTagsKvp.Value; context.Writer.Write(publicRequestNewImageTagsValue); } context.Writer.WriteObjectEnd(); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateUpdatedImageRequestMarshaller _instance = new CreateUpdatedImageRequestMarshaller(); internal static CreateUpdatedImageRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUpdatedImageRequestMarshaller Instance { get { return _instance; } } } }
141
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateUpdatedImage operation /// </summary> public class CreateUpdatedImageResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateUpdatedImageResponse response = new CreateUpdatedImageResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("canUpdateImage", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.CanUpdateImage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("image", targetDepth)) { var unmarshaller = ImageUnmarshaller.Instance; response.Image = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("IncompatibleImageException")) { return IncompatibleImageExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateUpdatedImageResponseUnmarshaller _instance = new CreateUpdatedImageResponseUnmarshaller(); internal static CreateUpdatedImageResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUpdatedImageResponseUnmarshaller Instance { get { return _instance; } } } }
140
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateUsageReportSubscription Request Marshaller /// </summary> public class CreateUsageReportSubscriptionRequestMarshaller : IMarshaller<IRequest, CreateUsageReportSubscriptionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateUsageReportSubscriptionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateUsageReportSubscriptionRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateUsageReportSubscription"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; var content = "{}"; request.Content = System.Text.Encoding.UTF8.GetBytes(content); return request; } private static CreateUsageReportSubscriptionRequestMarshaller _instance = new CreateUsageReportSubscriptionRequestMarshaller(); internal static CreateUsageReportSubscriptionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUsageReportSubscriptionRequestMarshaller Instance { get { return _instance; } } } }
89
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateUsageReportSubscription operation /// </summary> public class CreateUsageReportSubscriptionResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateUsageReportSubscriptionResponse response = new CreateUsageReportSubscriptionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("S3BucketName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.S3BucketName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Schedule", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Schedule = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidRoleException")) { return InvalidRoleExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateUsageReportSubscriptionResponseUnmarshaller _instance = new CreateUsageReportSubscriptionResponseUnmarshaller(); internal static CreateUsageReportSubscriptionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUsageReportSubscriptionResponseUnmarshaller Instance { get { return _instance; } } } }
124
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// CreateUser Request Marshaller /// </summary> public class CreateUserRequestMarshaller : IMarshaller<IRequest, CreateUserRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((CreateUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(CreateUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.CreateUser"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAuthenticationType()) { context.Writer.WritePropertyName("AuthenticationType"); context.Writer.Write(publicRequest.AuthenticationType); } if(publicRequest.IsSetFirstName()) { context.Writer.WritePropertyName("FirstName"); context.Writer.Write(publicRequest.FirstName); } if(publicRequest.IsSetLastName()) { context.Writer.WritePropertyName("LastName"); context.Writer.Write(publicRequest.LastName); } if(publicRequest.IsSetMessageAction()) { context.Writer.WritePropertyName("MessageAction"); context.Writer.Write(publicRequest.MessageAction); } if(publicRequest.IsSetUserName()) { context.Writer.WritePropertyName("UserName"); context.Writer.Write(publicRequest.UserName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static CreateUserRequestMarshaller _instance = new CreateUserRequestMarshaller(); internal static CreateUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUserRequestMarshaller Instance { get { return _instance; } } } }
127
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for CreateUser operation /// </summary> public class CreateUserResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateUserResponse response = new CreateUserResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidParameterCombinationException")) { return InvalidParameterCombinationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceededException")) { return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExistsException")) { return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static CreateUserResponseUnmarshaller _instance = new CreateUserResponseUnmarshaller(); internal static CreateUserResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static CreateUserResponseUnmarshaller Instance { get { return _instance; } } } }
115
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteAppBlockBuilder Request Marshaller /// </summary> public class DeleteAppBlockBuilderRequestMarshaller : IMarshaller<IRequest, DeleteAppBlockBuilderRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteAppBlockBuilderRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteAppBlockBuilderRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteAppBlockBuilder"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteAppBlockBuilderRequestMarshaller _instance = new DeleteAppBlockBuilderRequestMarshaller(); internal static DeleteAppBlockBuilderRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAppBlockBuilderRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteAppBlockBuilder operation /// </summary> public class DeleteAppBlockBuilderResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteAppBlockBuilderResponse response = new DeleteAppBlockBuilderResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteAppBlockBuilderResponseUnmarshaller _instance = new DeleteAppBlockBuilderResponseUnmarshaller(); internal static DeleteAppBlockBuilderResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAppBlockBuilderResponseUnmarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteAppBlock Request Marshaller /// </summary> public class DeleteAppBlockRequestMarshaller : IMarshaller<IRequest, DeleteAppBlockRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteAppBlockRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteAppBlockRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteAppBlock"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteAppBlockRequestMarshaller _instance = new DeleteAppBlockRequestMarshaller(); internal static DeleteAppBlockRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAppBlockRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteAppBlock operation /// </summary> public class DeleteAppBlockResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteAppBlockResponse response = new DeleteAppBlockResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteAppBlockResponseUnmarshaller _instance = new DeleteAppBlockResponseUnmarshaller(); internal static DeleteAppBlockResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteAppBlockResponseUnmarshaller Instance { get { return _instance; } } } }
107
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteApplication Request Marshaller /// </summary> public class DeleteApplicationRequestMarshaller : IMarshaller<IRequest, DeleteApplicationRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteApplicationRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteApplicationRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteApplication"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteApplicationRequestMarshaller _instance = new DeleteApplicationRequestMarshaller(); internal static DeleteApplicationRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteApplicationRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteApplication operation /// </summary> public class DeleteApplicationResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteApplicationResponse response = new DeleteApplicationResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteApplicationResponseUnmarshaller _instance = new DeleteApplicationResponseUnmarshaller(); internal static DeleteApplicationResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteApplicationResponseUnmarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteDirectoryConfig Request Marshaller /// </summary> public class DeleteDirectoryConfigRequestMarshaller : IMarshaller<IRequest, DeleteDirectoryConfigRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteDirectoryConfigRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteDirectoryConfigRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteDirectoryConfig"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetDirectoryName()) { context.Writer.WritePropertyName("DirectoryName"); context.Writer.Write(publicRequest.DirectoryName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteDirectoryConfigRequestMarshaller _instance = new DeleteDirectoryConfigRequestMarshaller(); internal static DeleteDirectoryConfigRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDirectoryConfigRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteDirectoryConfig operation /// </summary> public class DeleteDirectoryConfigResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteDirectoryConfigResponse response = new DeleteDirectoryConfigResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteDirectoryConfigResponseUnmarshaller _instance = new DeleteDirectoryConfigResponseUnmarshaller(); internal static DeleteDirectoryConfigResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteDirectoryConfigResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteEntitlement Request Marshaller /// </summary> public class DeleteEntitlementRequestMarshaller : IMarshaller<IRequest, DeleteEntitlementRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteEntitlementRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteEntitlementRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteEntitlement"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetStackName()) { context.Writer.WritePropertyName("StackName"); context.Writer.Write(publicRequest.StackName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteEntitlementRequestMarshaller _instance = new DeleteEntitlementRequestMarshaller(); internal static DeleteEntitlementRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteEntitlementRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteEntitlement operation /// </summary> public class DeleteEntitlementResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteEntitlementResponse response = new DeleteEntitlementResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("EntitlementNotFoundException")) { return EntitlementNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteEntitlementResponseUnmarshaller _instance = new DeleteEntitlementResponseUnmarshaller(); internal static DeleteEntitlementResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteEntitlementResponseUnmarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteFleet Request Marshaller /// </summary> public class DeleteFleetRequestMarshaller : IMarshaller<IRequest, DeleteFleetRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteFleetRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteFleetRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteFleet"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteFleetRequestMarshaller _instance = new DeleteFleetRequestMarshaller(); internal static DeleteFleetRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteFleetRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteFleet operation /// </summary> public class DeleteFleetResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteFleetResponse response = new DeleteFleetResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteFleetResponseUnmarshaller _instance = new DeleteFleetResponseUnmarshaller(); internal static DeleteFleetResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteFleetResponseUnmarshaller Instance { get { return _instance; } } } }
107
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteImageBuilder Request Marshaller /// </summary> public class DeleteImageBuilderRequestMarshaller : IMarshaller<IRequest, DeleteImageBuilderRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteImageBuilderRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteImageBuilderRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteImageBuilder"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteImageBuilderRequestMarshaller _instance = new DeleteImageBuilderRequestMarshaller(); internal static DeleteImageBuilderRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteImageBuilderRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteImageBuilder operation /// </summary> public class DeleteImageBuilderResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteImageBuilderResponse response = new DeleteImageBuilderResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("ImageBuilder", targetDepth)) { var unmarshaller = ImageBuilderUnmarshaller.Instance; response.ImageBuilder = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteImageBuilderResponseUnmarshaller _instance = new DeleteImageBuilderResponseUnmarshaller(); internal static DeleteImageBuilderResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteImageBuilderResponseUnmarshaller Instance { get { return _instance; } } } }
118
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteImagePermissions Request Marshaller /// </summary> public class DeleteImagePermissionsRequestMarshaller : IMarshaller<IRequest, DeleteImagePermissionsRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteImagePermissionsRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteImagePermissionsRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteImagePermissions"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } if(publicRequest.IsSetSharedAccountId()) { context.Writer.WritePropertyName("SharedAccountId"); context.Writer.Write(publicRequest.SharedAccountId); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteImagePermissionsRequestMarshaller _instance = new DeleteImagePermissionsRequestMarshaller(); internal static DeleteImagePermissionsRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteImagePermissionsRequestMarshaller Instance { get { return _instance; } } } }
109
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteImagePermissions operation /// </summary> public class DeleteImagePermissionsResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteImagePermissionsResponse response = new DeleteImagePermissionsResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotAvailableException")) { return ResourceNotAvailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteImagePermissionsResponseUnmarshaller _instance = new DeleteImagePermissionsResponseUnmarshaller(); internal static DeleteImagePermissionsResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteImagePermissionsResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteImage Request Marshaller /// </summary> public class DeleteImageRequestMarshaller : IMarshaller<IRequest, DeleteImageRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteImageRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteImageRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteImage"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteImageRequestMarshaller _instance = new DeleteImageRequestMarshaller(); internal static DeleteImageRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteImageRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteImage operation /// </summary> public class DeleteImageResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteImageResponse response = new DeleteImageResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Image", targetDepth)) { var unmarshaller = ImageUnmarshaller.Instance; response.Image = unmarshaller.Unmarshall(context); continue; } } return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteImageResponseUnmarshaller _instance = new DeleteImageResponseUnmarshaller(); internal static DeleteImageResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteImageResponseUnmarshaller Instance { get { return _instance; } } } }
122
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteStack Request Marshaller /// </summary> public class DeleteStackRequestMarshaller : IMarshaller<IRequest, DeleteStackRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteStackRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteStackRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteStack"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetName()) { context.Writer.WritePropertyName("Name"); context.Writer.Write(publicRequest.Name); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteStackRequestMarshaller _instance = new DeleteStackRequestMarshaller(); internal static DeleteStackRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackRequestMarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteStack operation /// </summary> public class DeleteStackResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteStackResponse response = new DeleteStackResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("ConcurrentModificationException")) { return ConcurrentModificationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("OperationNotPermittedException")) { return OperationNotPermittedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceInUseException")) { return ResourceInUseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteStackResponseUnmarshaller _instance = new DeleteStackResponseUnmarshaller(); internal static DeleteStackResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteStackResponseUnmarshaller Instance { get { return _instance; } } } }
111
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteUsageReportSubscription Request Marshaller /// </summary> public class DeleteUsageReportSubscriptionRequestMarshaller : IMarshaller<IRequest, DeleteUsageReportSubscriptionRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteUsageReportSubscriptionRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteUsageReportSubscriptionRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteUsageReportSubscription"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; var content = "{}"; request.Content = System.Text.Encoding.UTF8.GetBytes(content); return request; } private static DeleteUsageReportSubscriptionRequestMarshaller _instance = new DeleteUsageReportSubscriptionRequestMarshaller(); internal static DeleteUsageReportSubscriptionRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteUsageReportSubscriptionRequestMarshaller Instance { get { return _instance; } } } }
89
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Net; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// Response Unmarshaller for DeleteUsageReportSubscription operation /// </summary> public class DeleteUsageReportSubscriptionResponseUnmarshaller : JsonResponseUnmarshaller { /// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DeleteUsageReportSubscriptionResponse response = new DeleteUsageReportSubscriptionResponse(); return response; } /// <summary> /// Unmarshaller error response to exception. /// </summary> /// <param name="context"></param> /// <param name="innerException"></param> /// <param name="statusCode"></param> /// <returns></returns> public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) { var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context); errorResponse.InnerException = innerException; errorResponse.StatusCode = statusCode; var responseBodyBytes = context.GetResponseBodyBytes(); using (var streamCopy = new MemoryStream(responseBodyBytes)) using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null)) { if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidAccountStatusException")) { return InvalidAccountStatusExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFoundException")) { return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse); } } return new AmazonAppStreamException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode); } private static DeleteUsageReportSubscriptionResponseUnmarshaller _instance = new DeleteUsageReportSubscriptionResponseUnmarshaller(); internal static DeleteUsageReportSubscriptionResponseUnmarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteUsageReportSubscriptionResponseUnmarshaller Instance { get { return _instance; } } } }
103
aws-sdk-net
aws
C#
/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the appstream-2016-12-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Globalization; using System.IO; using System.Text; using System.Xml.Serialization; using Amazon.AppStream.Model; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Transform; using Amazon.Runtime.Internal.Util; using ThirdParty.Json.LitJson; namespace Amazon.AppStream.Model.Internal.MarshallTransformations { /// <summary> /// DeleteUser Request Marshaller /// </summary> public class DeleteUserRequestMarshaller : IMarshaller<IRequest, DeleteUserRequest> , IMarshaller<IRequest,AmazonWebServiceRequest> { /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="input"></param> /// <returns></returns> public IRequest Marshall(AmazonWebServiceRequest input) { return this.Marshall((DeleteUserRequest)input); } /// <summary> /// Marshaller the request object to the HTTP request. /// </summary> /// <param name="publicRequest"></param> /// <returns></returns> public IRequest Marshall(DeleteUserRequest publicRequest) { IRequest request = new DefaultRequest(publicRequest, "Amazon.AppStream"); string target = "PhotonAdminProxyService.DeleteUser"; request.Headers["X-Amz-Target"] = target; request.Headers["Content-Type"] = "application/x-amz-json-1.1"; request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2016-12-01"; request.HttpMethod = "POST"; request.ResourcePath = "/"; using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture)) { JsonWriter writer = new JsonWriter(stringWriter); writer.WriteObjectStart(); var context = new JsonMarshallerContext(request, writer); if(publicRequest.IsSetAuthenticationType()) { context.Writer.WritePropertyName("AuthenticationType"); context.Writer.Write(publicRequest.AuthenticationType); } if(publicRequest.IsSetUserName()) { context.Writer.WritePropertyName("UserName"); context.Writer.Write(publicRequest.UserName); } writer.WriteObjectEnd(); string snippet = stringWriter.ToString(); request.Content = System.Text.Encoding.UTF8.GetBytes(snippet); } return request; } private static DeleteUserRequestMarshaller _instance = new DeleteUserRequestMarshaller(); internal static DeleteUserRequestMarshaller GetInstance() { return _instance; } /// <summary> /// Gets the singleton. /// </summary> public static DeleteUserRequestMarshaller Instance { get { return _instance; } } } }
109