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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// Container for the parameters to the UpdateVoiceConnectorGroup operation.
/// Updates the settings for the specified Amazon Chime SDK Voice Connector group.
/// </summary>
public partial class UpdateVoiceConnectorGroupRequest : AmazonChimeSDKVoiceRequest
{
private string _name;
private string _voiceConnectorGroupId;
private List<VoiceConnectorItem> _voiceConnectorItems = new List<VoiceConnectorItem>();
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The name of the Voice Connector group.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=256)]
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 VoiceConnectorGroupId.
/// <para>
/// The Voice Connector ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string VoiceConnectorGroupId
{
get { return this._voiceConnectorGroupId; }
set { this._voiceConnectorGroupId = value; }
}
// Check to see if VoiceConnectorGroupId property is set
internal bool IsSetVoiceConnectorGroupId()
{
return this._voiceConnectorGroupId != null;
}
/// <summary>
/// Gets and sets the property VoiceConnectorItems.
/// <para>
/// The <code>VoiceConnectorItems</code> to associate with the Voice Connector group.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public List<VoiceConnectorItem> VoiceConnectorItems
{
get { return this._voiceConnectorItems; }
set { this._voiceConnectorItems = value; }
}
// Check to see if VoiceConnectorItems property is set
internal bool IsSetVoiceConnectorItems()
{
return this._voiceConnectorItems != null && this._voiceConnectorItems.Count > 0;
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// This is the response object from the UpdateVoiceConnectorGroup operation.
/// </summary>
public partial class UpdateVoiceConnectorGroupResponse : AmazonWebServiceResponse
{
private VoiceConnectorGroup _voiceConnectorGroup;
/// <summary>
/// Gets and sets the property VoiceConnectorGroup.
/// <para>
/// The updated Voice Connector group.
/// </para>
/// </summary>
public VoiceConnectorGroup VoiceConnectorGroup
{
get { return this._voiceConnectorGroup; }
set { this._voiceConnectorGroup = value; }
}
// Check to see if VoiceConnectorGroup property is set
internal bool IsSetVoiceConnectorGroup()
{
return this._voiceConnectorGroup != 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// Container for the parameters to the UpdateVoiceConnector operation.
/// Updates the details for the specified Amazon Chime SDK Voice Connector.
/// </summary>
public partial class UpdateVoiceConnectorRequest : AmazonChimeSDKVoiceRequest
{
private string _name;
private bool? _requireEncryption;
private string _voiceConnectorId;
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The name of the Voice Connector.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=256)]
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 RequireEncryption.
/// <para>
/// When enabled, requires encryption for the Voice Connector.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public bool RequireEncryption
{
get { return this._requireEncryption.GetValueOrDefault(); }
set { this._requireEncryption = value; }
}
// Check to see if RequireEncryption property is set
internal bool IsSetRequireEncryption()
{
return this._requireEncryption.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceConnectorId.
/// <para>
/// The Voice Connector ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string VoiceConnectorId
{
get { return this._voiceConnectorId; }
set { this._voiceConnectorId = value; }
}
// Check to see if VoiceConnectorId property is set
internal bool IsSetVoiceConnectorId()
{
return this._voiceConnectorId != 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// This is the response object from the UpdateVoiceConnector operation.
/// </summary>
public partial class UpdateVoiceConnectorResponse : AmazonWebServiceResponse
{
private VoiceConnector _voiceConnector;
/// <summary>
/// Gets and sets the property VoiceConnector.
/// <para>
/// The updated Voice Connector details.
/// </para>
/// </summary>
public VoiceConnector VoiceConnector
{
get { return this._voiceConnector; }
set { this._voiceConnector = value; }
}
// Check to see if VoiceConnector property is set
internal bool IsSetVoiceConnector()
{
return this._voiceConnector != 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// Container for the parameters to the UpdateVoiceProfileDomain operation.
/// Updates the settings for the specified voice profile domain.
/// </summary>
public partial class UpdateVoiceProfileDomainRequest : AmazonChimeSDKVoiceRequest
{
private string _description;
private string _name;
private string _voiceProfileDomainId;
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The description of the voice profile domain.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
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 voice profile domain.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
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 VoiceProfileDomainId.
/// <para>
/// The domain ID.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=256)]
public string VoiceProfileDomainId
{
get { return this._voiceProfileDomainId; }
set { this._voiceProfileDomainId = value; }
}
// Check to see if VoiceProfileDomainId property is set
internal bool IsSetVoiceProfileDomainId()
{
return this._voiceProfileDomainId != 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// This is the response object from the UpdateVoiceProfileDomain operation.
/// </summary>
public partial class UpdateVoiceProfileDomainResponse : AmazonWebServiceResponse
{
private VoiceProfileDomain _voiceProfileDomain;
/// <summary>
/// Gets and sets the property VoiceProfileDomain.
/// <para>
/// The updated details of the voice profile domain.
/// </para>
/// </summary>
public VoiceProfileDomain VoiceProfileDomain
{
get { return this._voiceProfileDomain; }
set { this._voiceProfileDomain = value; }
}
// Check to see if VoiceProfileDomain property is set
internal bool IsSetVoiceProfileDomain()
{
return this._voiceProfileDomain != 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// This is the response object from the UpdateVoiceProfile operation.
/// </summary>
public partial class UpdateVoiceProfileResponse : AmazonWebServiceResponse
{
private VoiceProfile _voiceProfile;
/// <summary>
/// Gets and sets the property VoiceProfile.
/// <para>
/// The updated voice profile settings.
/// </para>
/// </summary>
public VoiceProfile VoiceProfile
{
get { return this._voiceProfile; }
set { this._voiceProfile = value; }
}
// Check to see if VoiceProfile property is set
internal bool IsSetVoiceProfile()
{
return this._voiceProfile != 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// Container for the parameters to the ValidateE911Address operation.
/// Validates an address to be used for 911 calls made with Amazon Chime SDK Voice Connectors.
/// You can use validated addresses in a Presence Information Data Format Location Object
/// file that you include in SIP requests. That helps ensure that addresses are routed
/// to the appropriate Public Safety Answering Point.
/// </summary>
public partial class ValidateE911AddressRequest : AmazonChimeSDKVoiceRequest
{
private string _awsAccountId;
private string _city;
private string _country;
private string _postalCode;
private string _state;
private string _streetInfo;
private string _streetNumber;
/// <summary>
/// Gets and sets the property AwsAccountId.
/// <para>
/// The AWS account ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string AwsAccountId
{
get { return this._awsAccountId; }
set { this._awsAccountId = value; }
}
// Check to see if AwsAccountId property is set
internal bool IsSetAwsAccountId()
{
return this._awsAccountId != null;
}
/// <summary>
/// Gets and sets the property City.
/// <para>
/// The address city, such as <code>Portland</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Sensitive=true)]
public string City
{
get { return this._city; }
set { this._city = value; }
}
// Check to see if City property is set
internal bool IsSetCity()
{
return this._city != null;
}
/// <summary>
/// Gets and sets the property Country.
/// <para>
/// The country in the address being validated.
/// </para>
/// </summary>
[AWSProperty(Required=true, Sensitive=true)]
public string Country
{
get { return this._country; }
set { this._country = value; }
}
// Check to see if Country property is set
internal bool IsSetCountry()
{
return this._country != null;
}
/// <summary>
/// Gets and sets the property PostalCode.
/// <para>
/// The dress postal code, such <code>04352</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Sensitive=true)]
public string PostalCode
{
get { return this._postalCode; }
set { this._postalCode = value; }
}
// Check to see if PostalCode property is set
internal bool IsSetPostalCode()
{
return this._postalCode != null;
}
/// <summary>
/// Gets and sets the property State.
/// <para>
/// The address state, such as <code>ME</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Sensitive=true)]
public string State
{
get { return this._state; }
set { this._state = value; }
}
// Check to see if State property is set
internal bool IsSetState()
{
return this._state != null;
}
/// <summary>
/// Gets and sets the property StreetInfo.
/// <para>
/// The address street information, such as <code>8th Avenue</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Sensitive=true)]
public string StreetInfo
{
get { return this._streetInfo; }
set { this._streetInfo = value; }
}
// Check to see if StreetInfo property is set
internal bool IsSetStreetInfo()
{
return this._streetInfo != null;
}
/// <summary>
/// Gets and sets the property StreetNumber.
/// <para>
/// The address street number, such as <code>200</code> or <code>2121</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Sensitive=true)]
public string StreetNumber
{
get { return this._streetNumber; }
set { this._streetNumber = value; }
}
// Check to see if StreetNumber property is set
internal bool IsSetStreetNumber()
{
return this._streetNumber != null;
}
}
}
| 182 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// This is the response object from the ValidateE911Address operation.
/// </summary>
public partial class ValidateE911AddressResponse : AmazonWebServiceResponse
{
private Address _address;
private string _addressExternalId;
private List<CandidateAddress> _candidateAddressList = new List<CandidateAddress>();
private int? _validationResult;
/// <summary>
/// Gets and sets the property Address.
/// <para>
/// The validated address.
/// </para>
/// </summary>
public Address Address
{
get { return this._address; }
set { this._address = value; }
}
// Check to see if Address property is set
internal bool IsSetAddress()
{
return this._address != null;
}
/// <summary>
/// Gets and sets the property AddressExternalId.
/// <para>
/// The ID that represents the address.
/// </para>
/// </summary>
public string AddressExternalId
{
get { return this._addressExternalId; }
set { this._addressExternalId = value; }
}
// Check to see if AddressExternalId property is set
internal bool IsSetAddressExternalId()
{
return this._addressExternalId != null;
}
/// <summary>
/// Gets and sets the property CandidateAddressList.
/// <para>
/// The list of address suggestions..
/// </para>
/// </summary>
public List<CandidateAddress> CandidateAddressList
{
get { return this._candidateAddressList; }
set { this._candidateAddressList = value; }
}
// Check to see if CandidateAddressList property is set
internal bool IsSetCandidateAddressList()
{
return this._candidateAddressList != null && this._candidateAddressList.Count > 0;
}
/// <summary>
/// Gets and sets the property ValidationResult.
/// <para>
/// Number indicating the result of address validation. <code>0</code> means the address
/// was perfect as-is and successfully validated. <code>1</code> means the address was
/// corrected. <code>2</code> means the address sent was not close enough and was not
/// validated.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=2)]
public int ValidationResult
{
get { return this._validationResult.GetValueOrDefault(); }
set { this._validationResult = value; }
}
// Check to see if ValidationResult property is set
internal bool IsSetValidationResult()
{
return this._validationResult.HasValue;
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// The Amazon Chime SDK Voice Connector configuration, including outbound host name and
/// encryption settings.
/// </summary>
public partial class VoiceConnector
{
private VoiceConnectorAwsRegion _awsRegion;
private DateTime? _createdTimestamp;
private string _name;
private string _outboundHostName;
private bool? _requireEncryption;
private DateTime? _updatedTimestamp;
private string _voiceConnectorArn;
private string _voiceConnectorId;
/// <summary>
/// Gets and sets the property AwsRegion.
/// <para>
/// The AWS Region in which the Voice Connector is created. Default: us-east-1.
/// </para>
/// </summary>
public VoiceConnectorAwsRegion AwsRegion
{
get { return this._awsRegion; }
set { this._awsRegion = value; }
}
// Check to see if AwsRegion property is set
internal bool IsSetAwsRegion()
{
return this._awsRegion != null;
}
/// <summary>
/// Gets and sets the property CreatedTimestamp.
/// <para>
/// The Voice Connector's creation timestamp, in ISO 8601 format.
/// </para>
/// </summary>
public DateTime CreatedTimestamp
{
get { return this._createdTimestamp.GetValueOrDefault(); }
set { this._createdTimestamp = value; }
}
// Check to see if CreatedTimestamp property is set
internal bool IsSetCreatedTimestamp()
{
return this._createdTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The Voice Connector's name.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
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 OutboundHostName.
/// <para>
/// The outbound host name for the Voice Connector.
/// </para>
/// </summary>
public string OutboundHostName
{
get { return this._outboundHostName; }
set { this._outboundHostName = value; }
}
// Check to see if OutboundHostName property is set
internal bool IsSetOutboundHostName()
{
return this._outboundHostName != null;
}
/// <summary>
/// Gets and sets the property RequireEncryption.
/// <para>
/// Enables or disables encryption for the Voice Connector.
/// </para>
/// </summary>
public bool RequireEncryption
{
get { return this._requireEncryption.GetValueOrDefault(); }
set { this._requireEncryption = value; }
}
// Check to see if RequireEncryption property is set
internal bool IsSetRequireEncryption()
{
return this._requireEncryption.HasValue;
}
/// <summary>
/// Gets and sets the property UpdatedTimestamp.
/// <para>
/// The Voice Connector's updated timestamp, in ISO 8601 format.
/// </para>
/// </summary>
public DateTime UpdatedTimestamp
{
get { return this._updatedTimestamp.GetValueOrDefault(); }
set { this._updatedTimestamp = value; }
}
// Check to see if UpdatedTimestamp property is set
internal bool IsSetUpdatedTimestamp()
{
return this._updatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceConnectorArn.
/// <para>
/// The ARN of the Voice Connector.
/// </para>
/// </summary>
public string VoiceConnectorArn
{
get { return this._voiceConnectorArn; }
set { this._voiceConnectorArn = value; }
}
// Check to see if VoiceConnectorArn property is set
internal bool IsSetVoiceConnectorArn()
{
return this._voiceConnectorArn != null;
}
/// <summary>
/// Gets and sets the property VoiceConnectorId.
/// <para>
/// The Voice Connector's ID.
/// </para>
/// </summary>
public string VoiceConnectorId
{
get { return this._voiceConnectorId; }
set { this._voiceConnectorId = value; }
}
// Check to see if VoiceConnectorId property is set
internal bool IsSetVoiceConnectorId()
{
return this._voiceConnectorId != null;
}
}
}
| 192 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// The Amazon Chime SDK Voice Connector group configuration, including associated Voice
/// Connectors. You can include Voice Connectors from different AWS Regions in a group.
/// This creates a fault tolerant mechanism for fallback in case of availability events.
/// </summary>
public partial class VoiceConnectorGroup
{
private DateTime? _createdTimestamp;
private string _name;
private DateTime? _updatedTimestamp;
private string _voiceConnectorGroupArn;
private string _voiceConnectorGroupId;
private List<VoiceConnectorItem> _voiceConnectorItems = new List<VoiceConnectorItem>();
/// <summary>
/// Gets and sets the property CreatedTimestamp.
/// <para>
/// The Voice Connector group's creation time stamp, in ISO 8601 format.
/// </para>
/// </summary>
public DateTime CreatedTimestamp
{
get { return this._createdTimestamp.GetValueOrDefault(); }
set { this._createdTimestamp = value; }
}
// Check to see if CreatedTimestamp property is set
internal bool IsSetCreatedTimestamp()
{
return this._createdTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property Name.
/// <para>
/// The name of a Voice Connector group.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
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 UpdatedTimestamp.
/// <para>
/// The Voice Connector group's creation time stamp, in ISO 8601 format.
/// </para>
/// </summary>
public DateTime UpdatedTimestamp
{
get { return this._updatedTimestamp.GetValueOrDefault(); }
set { this._updatedTimestamp = value; }
}
// Check to see if UpdatedTimestamp property is set
internal bool IsSetUpdatedTimestamp()
{
return this._updatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceConnectorGroupArn.
/// <para>
/// The ARN of the Voice Connector group.
/// </para>
/// </summary>
public string VoiceConnectorGroupArn
{
get { return this._voiceConnectorGroupArn; }
set { this._voiceConnectorGroupArn = value; }
}
// Check to see if VoiceConnectorGroupArn property is set
internal bool IsSetVoiceConnectorGroupArn()
{
return this._voiceConnectorGroupArn != null;
}
/// <summary>
/// Gets and sets the property VoiceConnectorGroupId.
/// <para>
/// The ID of a Voice Connector group.
/// </para>
/// </summary>
public string VoiceConnectorGroupId
{
get { return this._voiceConnectorGroupId; }
set { this._voiceConnectorGroupId = value; }
}
// Check to see if VoiceConnectorGroupId property is set
internal bool IsSetVoiceConnectorGroupId()
{
return this._voiceConnectorGroupId != null;
}
/// <summary>
/// Gets and sets the property VoiceConnectorItems.
/// <para>
/// The Voice Connectors to which you route inbound calls.
/// </para>
/// </summary>
public List<VoiceConnectorItem> VoiceConnectorItems
{
get { return this._voiceConnectorItems; }
set { this._voiceConnectorItems = value; }
}
// Check to see if VoiceConnectorItems property is set
internal bool IsSetVoiceConnectorItems()
{
return this._voiceConnectorItems != null && this._voiceConnectorItems.Count > 0;
}
}
}
| 155 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// For Amazon Chime SDK Voice Connector groups, the Amazon Chime SDK Voice Connectors
/// to which you route inbound calls. Includes priority configuration settings. Limit:
/// 3 VoiceConnectorItems per Voice Connector group.
/// </summary>
public partial class VoiceConnectorItem
{
private int? _priority;
private string _voiceConnectorId;
/// <summary>
/// Gets and sets the property Priority.
/// <para>
/// The priority setting of a Voice Connector item. Calls are routed to hosts in priority
/// order, with 1 as the highest priority. When hosts have equal priority, the system
/// distributes calls among them based on their relative weight.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=99)]
public int Priority
{
get { return this._priority.GetValueOrDefault(); }
set { this._priority = value; }
}
// Check to see if Priority property is set
internal bool IsSetPriority()
{
return this._priority.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceConnectorId.
/// <para>
/// The Voice Connector ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string VoiceConnectorId
{
get { return this._voiceConnectorId; }
set { this._voiceConnectorId = value; }
}
// Check to see if VoiceConnectorId property is set
internal bool IsSetVoiceConnectorId()
{
return this._voiceConnectorId != null;
}
}
}
| 82 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// The Amazon Chime SDK Voice Connector settings. Includes any Amazon S3 buckets designated
/// for storing call detail records.
/// </summary>
public partial class VoiceConnectorSettings
{
private string _cdrBucket;
/// <summary>
/// Gets and sets the property CdrBucket.
/// <para>
/// The S3 bucket that stores the Voice Connector's call detail records.
/// </para>
/// </summary>
public string CdrBucket
{
get { return this._cdrBucket; }
set { this._cdrBucket = value; }
}
// Check to see if CdrBucket property is set
internal bool IsSetCdrBucket()
{
return this._cdrBucket != null;
}
}
}
| 58 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// The combination of a voice print and caller ID.
/// </summary>
public partial class VoiceProfile
{
private DateTime? _createdTimestamp;
private DateTime? _expirationTimestamp;
private DateTime? _updatedTimestamp;
private string _voiceProfileArn;
private string _voiceProfileDomainId;
private string _voiceProfileId;
/// <summary>
/// Gets and sets the property CreatedTimestamp.
/// <para>
/// The time at which the voice profile was created and enrolled.
/// </para>
/// </summary>
public DateTime CreatedTimestamp
{
get { return this._createdTimestamp.GetValueOrDefault(); }
set { this._createdTimestamp = value; }
}
// Check to see if CreatedTimestamp property is set
internal bool IsSetCreatedTimestamp()
{
return this._createdTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property ExpirationTimestamp.
/// <para>
/// The time at which a voice profile expires unless you re-enroll the caller via the
/// <code>UpdateVoiceProfile</code> API.
/// </para>
/// </summary>
public DateTime ExpirationTimestamp
{
get { return this._expirationTimestamp.GetValueOrDefault(); }
set { this._expirationTimestamp = value; }
}
// Check to see if ExpirationTimestamp property is set
internal bool IsSetExpirationTimestamp()
{
return this._expirationTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property UpdatedTimestamp.
/// <para>
/// The time at which the voice profile was last updated.
/// </para>
/// </summary>
public DateTime UpdatedTimestamp
{
get { return this._updatedTimestamp.GetValueOrDefault(); }
set { this._updatedTimestamp = value; }
}
// Check to see if UpdatedTimestamp property is set
internal bool IsSetUpdatedTimestamp()
{
return this._updatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceProfileArn.
/// <para>
/// The ARN of the voice profile.
/// </para>
/// </summary>
[AWSProperty(Sensitive=true, Min=1, Max=1024)]
public string VoiceProfileArn
{
get { return this._voiceProfileArn; }
set { this._voiceProfileArn = value; }
}
// Check to see if VoiceProfileArn property is set
internal bool IsSetVoiceProfileArn()
{
return this._voiceProfileArn != null;
}
/// <summary>
/// Gets and sets the property VoiceProfileDomainId.
/// <para>
/// The ID of the domain that contains the voice profile.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string VoiceProfileDomainId
{
get { return this._voiceProfileDomainId; }
set { this._voiceProfileDomainId = value; }
}
// Check to see if VoiceProfileDomainId property is set
internal bool IsSetVoiceProfileDomainId()
{
return this._voiceProfileDomainId != null;
}
/// <summary>
/// Gets and sets the property VoiceProfileId.
/// <para>
/// The ID of the voice profile.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string VoiceProfileId
{
get { return this._voiceProfileId; }
set { this._voiceProfileId = value; }
}
// Check to see if VoiceProfileId property is set
internal bool IsSetVoiceProfileId()
{
return this._voiceProfileId != null;
}
}
}
| 156 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// A collection of voice profiles.
/// </summary>
public partial class VoiceProfileDomain
{
private DateTime? _createdTimestamp;
private string _description;
private string _name;
private ServerSideEncryptionConfiguration _serverSideEncryptionConfiguration;
private DateTime? _updatedTimestamp;
private string _voiceProfileDomainArn;
private string _voiceProfileDomainId;
/// <summary>
/// Gets and sets the property CreatedTimestamp.
/// <para>
/// The time at which the voice profile domain was created.
/// </para>
/// </summary>
public DateTime CreatedTimestamp
{
get { return this._createdTimestamp.GetValueOrDefault(); }
set { this._createdTimestamp = value; }
}
// Check to see if CreatedTimestamp property is set
internal bool IsSetCreatedTimestamp()
{
return this._createdTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// The description of the voice profile domain.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
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 voice profile domain.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
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 ServerSideEncryptionConfiguration.
/// <para>
/// A structure that contains the configuration settings for server-side encryption.
/// </para>
/// </summary>
public ServerSideEncryptionConfiguration ServerSideEncryptionConfiguration
{
get { return this._serverSideEncryptionConfiguration; }
set { this._serverSideEncryptionConfiguration = value; }
}
// Check to see if ServerSideEncryptionConfiguration property is set
internal bool IsSetServerSideEncryptionConfiguration()
{
return this._serverSideEncryptionConfiguration != null;
}
/// <summary>
/// Gets and sets the property UpdatedTimestamp.
/// <para>
/// The time at which the voice profile was last updated.
/// </para>
/// </summary>
public DateTime UpdatedTimestamp
{
get { return this._updatedTimestamp.GetValueOrDefault(); }
set { this._updatedTimestamp = value; }
}
// Check to see if UpdatedTimestamp property is set
internal bool IsSetUpdatedTimestamp()
{
return this._updatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceProfileDomainArn.
/// <para>
/// The voice profile domain's Amazon Resource Number (ARN).
/// </para>
/// </summary>
[AWSProperty(Sensitive=true, Min=1, Max=1024)]
public string VoiceProfileDomainArn
{
get { return this._voiceProfileDomainArn; }
set { this._voiceProfileDomainArn = value; }
}
// Check to see if VoiceProfileDomainArn property is set
internal bool IsSetVoiceProfileDomainArn()
{
return this._voiceProfileDomainArn != null;
}
/// <summary>
/// Gets and sets the property VoiceProfileDomainId.
/// <para>
/// The ID of the voice profile domain.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string VoiceProfileDomainId
{
get { return this._voiceProfileDomainId; }
set { this._voiceProfileDomainId = value; }
}
// Check to see if VoiceProfileDomainId property is set
internal bool IsSetVoiceProfileDomainId()
{
return this._voiceProfileDomainId != null;
}
}
}
| 175 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// A high-level overview of a voice profile domain.
/// </summary>
public partial class VoiceProfileDomainSummary
{
private DateTime? _createdTimestamp;
private string _description;
private string _name;
private DateTime? _updatedTimestamp;
private string _voiceProfileDomainArn;
private string _voiceProfileDomainId;
/// <summary>
/// Gets and sets the property CreatedTimestamp.
/// <para>
/// The time at which the voice profile domain summary was created.
/// </para>
/// </summary>
public DateTime CreatedTimestamp
{
get { return this._createdTimestamp.GetValueOrDefault(); }
set { this._createdTimestamp = value; }
}
// Check to see if CreatedTimestamp property is set
internal bool IsSetCreatedTimestamp()
{
return this._createdTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property Description.
/// <para>
/// Describes the voice profile domain summary.
/// </para>
/// </summary>
[AWSProperty(Min=0, Max=1024)]
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 voice profile domain summary.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
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 UpdatedTimestamp.
/// <para>
/// The time at which the voice profile domain summary was last updated.
/// </para>
/// </summary>
public DateTime UpdatedTimestamp
{
get { return this._updatedTimestamp.GetValueOrDefault(); }
set { this._updatedTimestamp = value; }
}
// Check to see if UpdatedTimestamp property is set
internal bool IsSetUpdatedTimestamp()
{
return this._updatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceProfileDomainArn.
/// <para>
/// The ARN of a voice profile in a voice profile domain summary.
/// </para>
/// </summary>
[AWSProperty(Sensitive=true, Min=1, Max=1024)]
public string VoiceProfileDomainArn
{
get { return this._voiceProfileDomainArn; }
set { this._voiceProfileDomainArn = value; }
}
// Check to see if VoiceProfileDomainArn property is set
internal bool IsSetVoiceProfileDomainArn()
{
return this._voiceProfileDomainArn != null;
}
/// <summary>
/// Gets and sets the property VoiceProfileDomainId.
/// <para>
/// The ID of the voice profile domain summary.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string VoiceProfileDomainId
{
get { return this._voiceProfileDomainId; }
set { this._voiceProfileDomainId = value; }
}
// Check to see if VoiceProfileDomainId property is set
internal bool IsSetVoiceProfileDomainId()
{
return this._voiceProfileDomainId != null;
}
}
}
| 156 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// A high-level summary of a voice profile.
/// </summary>
public partial class VoiceProfileSummary
{
private DateTime? _createdTimestamp;
private DateTime? _expirationTimestamp;
private DateTime? _updatedTimestamp;
private string _voiceProfileArn;
private string _voiceProfileDomainId;
private string _voiceProfileId;
/// <summary>
/// Gets and sets the property CreatedTimestamp.
/// <para>
/// The time at which a voice profile summary was created.
/// </para>
/// </summary>
public DateTime CreatedTimestamp
{
get { return this._createdTimestamp.GetValueOrDefault(); }
set { this._createdTimestamp = value; }
}
// Check to see if CreatedTimestamp property is set
internal bool IsSetCreatedTimestamp()
{
return this._createdTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property ExpirationTimestamp.
/// <para>
/// Extends the life of the voice profile. You can use <code>UpdateVoiceProfile</code>
/// to refresh an existing voice profile's voice print and extend the life of the summary.
/// </para>
/// </summary>
public DateTime ExpirationTimestamp
{
get { return this._expirationTimestamp.GetValueOrDefault(); }
set { this._expirationTimestamp = value; }
}
// Check to see if ExpirationTimestamp property is set
internal bool IsSetExpirationTimestamp()
{
return this._expirationTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property UpdatedTimestamp.
/// <para>
/// The time at which a voice profile summary was last updated.
/// </para>
/// </summary>
public DateTime UpdatedTimestamp
{
get { return this._updatedTimestamp.GetValueOrDefault(); }
set { this._updatedTimestamp = value; }
}
// Check to see if UpdatedTimestamp property is set
internal bool IsSetUpdatedTimestamp()
{
return this._updatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceProfileArn.
/// <para>
/// The ARN of the voice profile in a voice profile summary.
/// </para>
/// </summary>
[AWSProperty(Sensitive=true, Min=1, Max=1024)]
public string VoiceProfileArn
{
get { return this._voiceProfileArn; }
set { this._voiceProfileArn = value; }
}
// Check to see if VoiceProfileArn property is set
internal bool IsSetVoiceProfileArn()
{
return this._voiceProfileArn != null;
}
/// <summary>
/// Gets and sets the property VoiceProfileDomainId.
/// <para>
/// The ID of the voice profile domain in a voice profile summary.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string VoiceProfileDomainId
{
get { return this._voiceProfileDomainId; }
set { this._voiceProfileDomainId = value; }
}
// Check to see if VoiceProfileDomainId property is set
internal bool IsSetVoiceProfileDomainId()
{
return this._voiceProfileDomainId != null;
}
/// <summary>
/// Gets and sets the property VoiceProfileId.
/// <para>
/// The ID of the voice profile in a voice profile summary.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string VoiceProfileId
{
get { return this._voiceProfileId; }
set { this._voiceProfileId = value; }
}
// Check to see if VoiceProfileId property is set
internal bool IsSetVoiceProfileId()
{
return this._voiceProfileId != null;
}
}
}
| 156 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model
{
/// <summary>
/// A representation of an asynchronous request to perform voice tone analysis on a Voice
/// Connector call.
/// </summary>
public partial class VoiceToneAnalysisTask
{
private CallDetails _callDetails;
private DateTime? _createdTimestamp;
private DateTime? _startedTimestamp;
private string _statusMessage;
private DateTime? _updatedTimestamp;
private string _voiceToneAnalysisTaskId;
private string _voiceToneAnalysisTaskStatus;
/// <summary>
/// Gets and sets the property CallDetails.
/// <para>
/// The call details of a voice tone analysis task.
/// </para>
/// </summary>
public CallDetails CallDetails
{
get { return this._callDetails; }
set { this._callDetails = value; }
}
// Check to see if CallDetails property is set
internal bool IsSetCallDetails()
{
return this._callDetails != null;
}
/// <summary>
/// Gets and sets the property CreatedTimestamp.
/// <para>
/// The time at which a voice tone analysis task was created.
/// </para>
/// </summary>
public DateTime CreatedTimestamp
{
get { return this._createdTimestamp.GetValueOrDefault(); }
set { this._createdTimestamp = value; }
}
// Check to see if CreatedTimestamp property is set
internal bool IsSetCreatedTimestamp()
{
return this._createdTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property StartedTimestamp.
/// <para>
/// The time at which a voice tone analysis task started.
/// </para>
/// </summary>
public DateTime StartedTimestamp
{
get { return this._startedTimestamp.GetValueOrDefault(); }
set { this._startedTimestamp = value; }
}
// Check to see if StartedTimestamp property is set
internal bool IsSetStartedTimestamp()
{
return this._startedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property StatusMessage.
/// <para>
/// The status of a voice tone analysis task.
/// </para>
/// </summary>
public string StatusMessage
{
get { return this._statusMessage; }
set { this._statusMessage = value; }
}
// Check to see if StatusMessage property is set
internal bool IsSetStatusMessage()
{
return this._statusMessage != null;
}
/// <summary>
/// Gets and sets the property UpdatedTimestamp.
/// <para>
/// The time at which a voice tone analysis task was updated.
/// </para>
/// </summary>
public DateTime UpdatedTimestamp
{
get { return this._updatedTimestamp.GetValueOrDefault(); }
set { this._updatedTimestamp = value; }
}
// Check to see if UpdatedTimestamp property is set
internal bool IsSetUpdatedTimestamp()
{
return this._updatedTimestamp.HasValue;
}
/// <summary>
/// Gets and sets the property VoiceToneAnalysisTaskId.
/// <para>
/// The ID of the voice tone analysis task.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=256)]
public string VoiceToneAnalysisTaskId
{
get { return this._voiceToneAnalysisTaskId; }
set { this._voiceToneAnalysisTaskId = value; }
}
// Check to see if VoiceToneAnalysisTaskId property is set
internal bool IsSetVoiceToneAnalysisTaskId()
{
return this._voiceToneAnalysisTaskId != null;
}
/// <summary>
/// Gets and sets the property VoiceToneAnalysisTaskStatus.
/// <para>
/// The status of a voice tone analysis task, <code>IN_QUEUE</code>, <code>IN_PROGRESS</code>,
/// <code>PARTIAL_SUCCESS</code>, <code>SUCCEEDED</code>, <code>FAILED</code>, or <code>STOPPED</code>.
/// </para>
/// </summary>
public string VoiceToneAnalysisTaskStatus
{
get { return this._voiceToneAnalysisTaskStatus; }
set { this._voiceToneAnalysisTaskStatus = value; }
}
// Check to see if VoiceToneAnalysisTaskStatus property is set
internal bool IsSetVoiceToneAnalysisTaskStatus()
{
return this._voiceToneAnalysisTaskStatus != null;
}
}
}
| 174 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AccessDeniedException Object
/// </summary>
public class AccessDeniedExceptionUnmarshaller : IErrorResponseUnmarshaller<AccessDeniedException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AccessDeniedException 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 AccessDeniedException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
AccessDeniedException unmarshalledObject = new AccessDeniedException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static AccessDeniedExceptionUnmarshaller _instance = new AccessDeniedExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AccessDeniedExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Address Object
/// </summary>
public class AddressUnmarshaller : IUnmarshaller<Address, XmlUnmarshallerContext>, IUnmarshaller<Address, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
Address IUnmarshaller<Address, 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 Address Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
Address unmarshalledObject = new Address();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("city", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.City = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("country", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Country = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("postalCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PostalCode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("postalCodePlus4", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PostalCodePlus4 = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("postDirectional", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PostDirectional = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("preDirectional", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PreDirectional = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("state", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("streetName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StreetName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("streetNumber", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StreetNumber = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("streetSuffix", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StreetSuffix = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static AddressUnmarshaller _instance = new AddressUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AddressUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// AssociatePhoneNumbersWithVoiceConnectorGroup Request Marshaller
/// </summary>
public class AssociatePhoneNumbersWithVoiceConnectorGroupRequestMarshaller : IMarshaller<IRequest, AssociatePhoneNumbersWithVoiceConnectorGroupRequest> , 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((AssociatePhoneNumbersWithVoiceConnectorGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(AssociatePhoneNumbersWithVoiceConnectorGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "associate-phone-numbers");
if (!publicRequest.IsSetVoiceConnectorGroupId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorGroupId set");
request.AddPathResource("{voiceConnectorGroupId}", StringUtils.FromString(publicRequest.VoiceConnectorGroupId));
request.ResourcePath = "/voice-connector-groups/{voiceConnectorGroupId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetE164PhoneNumbers())
{
context.Writer.WritePropertyName("E164PhoneNumbers");
context.Writer.WriteArrayStart();
foreach(var publicRequestE164PhoneNumbersListValue in publicRequest.E164PhoneNumbers)
{
context.Writer.Write(publicRequestE164PhoneNumbersListValue);
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetForceAssociate())
{
context.Writer.WritePropertyName("ForceAssociate");
context.Writer.Write(publicRequest.ForceAssociate);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static AssociatePhoneNumbersWithVoiceConnectorGroupRequestMarshaller _instance = new AssociatePhoneNumbersWithVoiceConnectorGroupRequestMarshaller();
internal static AssociatePhoneNumbersWithVoiceConnectorGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static AssociatePhoneNumbersWithVoiceConnectorGroupRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 116 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AssociatePhoneNumbersWithVoiceConnectorGroup operation
/// </summary>
public class AssociatePhoneNumbersWithVoiceConnectorGroupResponseUnmarshaller : 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)
{
AssociatePhoneNumbersWithVoiceConnectorGroupResponse response = new AssociatePhoneNumbersWithVoiceConnectorGroupResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberErrors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<PhoneNumberError, PhoneNumberErrorUnmarshaller>(PhoneNumberErrorUnmarshaller.Instance);
response.PhoneNumberErrors = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static AssociatePhoneNumbersWithVoiceConnectorGroupResponseUnmarshaller _instance = new AssociatePhoneNumbersWithVoiceConnectorGroupResponseUnmarshaller();
internal static AssociatePhoneNumbersWithVoiceConnectorGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static AssociatePhoneNumbersWithVoiceConnectorGroupResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// AssociatePhoneNumbersWithVoiceConnector Request Marshaller
/// </summary>
public class AssociatePhoneNumbersWithVoiceConnectorRequestMarshaller : IMarshaller<IRequest, AssociatePhoneNumbersWithVoiceConnectorRequest> , 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((AssociatePhoneNumbersWithVoiceConnectorRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(AssociatePhoneNumbersWithVoiceConnectorRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "associate-phone-numbers");
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetE164PhoneNumbers())
{
context.Writer.WritePropertyName("E164PhoneNumbers");
context.Writer.WriteArrayStart();
foreach(var publicRequestE164PhoneNumbersListValue in publicRequest.E164PhoneNumbers)
{
context.Writer.Write(publicRequestE164PhoneNumbersListValue);
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetForceAssociate())
{
context.Writer.WritePropertyName("ForceAssociate");
context.Writer.Write(publicRequest.ForceAssociate);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static AssociatePhoneNumbersWithVoiceConnectorRequestMarshaller _instance = new AssociatePhoneNumbersWithVoiceConnectorRequestMarshaller();
internal static AssociatePhoneNumbersWithVoiceConnectorRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static AssociatePhoneNumbersWithVoiceConnectorRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 116 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AssociatePhoneNumbersWithVoiceConnector operation
/// </summary>
public class AssociatePhoneNumbersWithVoiceConnectorResponseUnmarshaller : 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)
{
AssociatePhoneNumbersWithVoiceConnectorResponse response = new AssociatePhoneNumbersWithVoiceConnectorResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberErrors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<PhoneNumberError, PhoneNumberErrorUnmarshaller>(PhoneNumberErrorUnmarshaller.Instance);
response.PhoneNumberErrors = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static AssociatePhoneNumbersWithVoiceConnectorResponseUnmarshaller _instance = new AssociatePhoneNumbersWithVoiceConnectorResponseUnmarshaller();
internal static AssociatePhoneNumbersWithVoiceConnectorResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static AssociatePhoneNumbersWithVoiceConnectorResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BadRequestException Object
/// </summary>
public class BadRequestExceptionUnmarshaller : IErrorResponseUnmarshaller<BadRequestException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BadRequestException 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 BadRequestException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
BadRequestException unmarshalledObject = new BadRequestException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static BadRequestExceptionUnmarshaller _instance = new BadRequestExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BadRequestExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// BatchDeletePhoneNumber Request Marshaller
/// </summary>
public class BatchDeletePhoneNumberRequestMarshaller : IMarshaller<IRequest, BatchDeletePhoneNumberRequest> , 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((BatchDeletePhoneNumberRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(BatchDeletePhoneNumberRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "batch-delete");
request.ResourcePath = "/phone-numbers";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetPhoneNumberIds())
{
context.Writer.WritePropertyName("PhoneNumberIds");
context.Writer.WriteArrayStart();
foreach(var publicRequestPhoneNumberIdsListValue in publicRequest.PhoneNumberIds)
{
context.Writer.Write(publicRequestPhoneNumberIdsListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static BatchDeletePhoneNumberRequestMarshaller _instance = new BatchDeletePhoneNumberRequestMarshaller();
internal static BatchDeletePhoneNumberRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchDeletePhoneNumberRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BatchDeletePhoneNumber operation
/// </summary>
public class BatchDeletePhoneNumberResponseUnmarshaller : 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)
{
BatchDeletePhoneNumberResponse response = new BatchDeletePhoneNumberResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberErrors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<PhoneNumberError, PhoneNumberErrorUnmarshaller>(PhoneNumberErrorUnmarshaller.Instance);
response.PhoneNumberErrors = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static BatchDeletePhoneNumberResponseUnmarshaller _instance = new BatchDeletePhoneNumberResponseUnmarshaller();
internal static BatchDeletePhoneNumberResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchDeletePhoneNumberResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// BatchUpdatePhoneNumber Request Marshaller
/// </summary>
public class BatchUpdatePhoneNumberRequestMarshaller : IMarshaller<IRequest, BatchUpdatePhoneNumberRequest> , 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((BatchUpdatePhoneNumberRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(BatchUpdatePhoneNumberRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "batch-update");
request.ResourcePath = "/phone-numbers";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetUpdatePhoneNumberRequestItems())
{
context.Writer.WritePropertyName("UpdatePhoneNumberRequestItems");
context.Writer.WriteArrayStart();
foreach(var publicRequestUpdatePhoneNumberRequestItemsListValue in publicRequest.UpdatePhoneNumberRequestItems)
{
context.Writer.WriteObjectStart();
var marshaller = UpdatePhoneNumberRequestItemMarshaller.Instance;
marshaller.Marshall(publicRequestUpdatePhoneNumberRequestItemsListValue, 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 BatchUpdatePhoneNumberRequestMarshaller _instance = new BatchUpdatePhoneNumberRequestMarshaller();
internal static BatchUpdatePhoneNumberRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchUpdatePhoneNumberRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 112 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BatchUpdatePhoneNumber operation
/// </summary>
public class BatchUpdatePhoneNumberResponseUnmarshaller : 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)
{
BatchUpdatePhoneNumberResponse response = new BatchUpdatePhoneNumberResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberErrors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<PhoneNumberError, PhoneNumberErrorUnmarshaller>(PhoneNumberErrorUnmarshaller.Instance);
response.PhoneNumberErrors = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static BatchUpdatePhoneNumberResponseUnmarshaller _instance = new BatchUpdatePhoneNumberResponseUnmarshaller();
internal static BatchUpdatePhoneNumberResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BatchUpdatePhoneNumberResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CallDetails Object
/// </summary>
public class CallDetailsUnmarshaller : IUnmarshaller<CallDetails, XmlUnmarshallerContext>, IUnmarshaller<CallDetails, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CallDetails IUnmarshaller<CallDetails, 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 CallDetails Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CallDetails unmarshalledObject = new CallDetails();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("IsCaller", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.IsCaller = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TransactionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TransactionId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("VoiceConnectorId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.VoiceConnectorId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CallDetailsUnmarshaller _instance = new CallDetailsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CallDetailsUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CandidateAddress Object
/// </summary>
public class CandidateAddressUnmarshaller : IUnmarshaller<CandidateAddress, XmlUnmarshallerContext>, IUnmarshaller<CandidateAddress, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CandidateAddress IUnmarshaller<CandidateAddress, 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 CandidateAddress Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CandidateAddress unmarshalledObject = new CandidateAddress();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("city", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.City = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("country", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Country = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("postalCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PostalCode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("postalCodePlus4", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PostalCodePlus4 = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("state", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.State = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("streetInfo", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StreetInfo = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("streetNumber", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StreetNumber = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CandidateAddressUnmarshaller _instance = new CandidateAddressUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CandidateAddressUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ConflictException Object
/// </summary>
public class ConflictExceptionUnmarshaller : IErrorResponseUnmarshaller<ConflictException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ConflictException 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 ConflictException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ConflictException unmarshalledObject = new ConflictException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ConflictExceptionUnmarshaller _instance = new ConflictExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ConflictExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreatePhoneNumberOrder Request Marshaller
/// </summary>
public class CreatePhoneNumberOrderRequestMarshaller : IMarshaller<IRequest, CreatePhoneNumberOrderRequest> , 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((CreatePhoneNumberOrderRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreatePhoneNumberOrderRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/phone-number-orders";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetE164PhoneNumbers())
{
context.Writer.WritePropertyName("E164PhoneNumbers");
context.Writer.WriteArrayStart();
foreach(var publicRequestE164PhoneNumbersListValue in publicRequest.E164PhoneNumbers)
{
context.Writer.Write(publicRequestE164PhoneNumbersListValue);
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetProductType())
{
context.Writer.WritePropertyName("ProductType");
context.Writer.Write(publicRequest.ProductType);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreatePhoneNumberOrderRequestMarshaller _instance = new CreatePhoneNumberOrderRequestMarshaller();
internal static CreatePhoneNumberOrderRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePhoneNumberOrderRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 112 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreatePhoneNumberOrder operation
/// </summary>
public class CreatePhoneNumberOrderResponseUnmarshaller : 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)
{
CreatePhoneNumberOrderResponse response = new CreatePhoneNumberOrderResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberOrder", targetDepth))
{
var unmarshaller = PhoneNumberOrderUnmarshaller.Instance;
response.PhoneNumberOrder = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreatePhoneNumberOrderResponseUnmarshaller _instance = new CreatePhoneNumberOrderResponseUnmarshaller();
internal static CreatePhoneNumberOrderResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreatePhoneNumberOrderResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateProxySession Request Marshaller
/// </summary>
public class CreateProxySessionRequestMarshaller : IMarshaller<IRequest, CreateProxySessionRequest> , 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((CreateProxySessionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateProxySessionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/proxy-sessions";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetCapabilities())
{
context.Writer.WritePropertyName("Capabilities");
context.Writer.WriteArrayStart();
foreach(var publicRequestCapabilitiesListValue in publicRequest.Capabilities)
{
context.Writer.Write(publicRequestCapabilitiesListValue);
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetExpiryMinutes())
{
context.Writer.WritePropertyName("ExpiryMinutes");
context.Writer.Write(publicRequest.ExpiryMinutes);
}
if(publicRequest.IsSetGeoMatchLevel())
{
context.Writer.WritePropertyName("GeoMatchLevel");
context.Writer.Write(publicRequest.GeoMatchLevel);
}
if(publicRequest.IsSetGeoMatchParams())
{
context.Writer.WritePropertyName("GeoMatchParams");
context.Writer.WriteObjectStart();
var marshaller = GeoMatchParamsMarshaller.Instance;
marshaller.Marshall(publicRequest.GeoMatchParams, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetNumberSelectionBehavior())
{
context.Writer.WritePropertyName("NumberSelectionBehavior");
context.Writer.Write(publicRequest.NumberSelectionBehavior);
}
if(publicRequest.IsSetParticipantPhoneNumbers())
{
context.Writer.WritePropertyName("ParticipantPhoneNumbers");
context.Writer.WriteArrayStart();
foreach(var publicRequestParticipantPhoneNumbersListValue in publicRequest.ParticipantPhoneNumbers)
{
context.Writer.Write(publicRequestParticipantPhoneNumbersListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateProxySessionRequestMarshaller _instance = new CreateProxySessionRequestMarshaller();
internal static CreateProxySessionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateProxySessionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 155 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateProxySession operation
/// </summary>
public class CreateProxySessionResponseUnmarshaller : 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)
{
CreateProxySessionResponse response = new CreateProxySessionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ProxySession", targetDepth))
{
var unmarshaller = ProxySessionUnmarshaller.Instance;
response.ProxySession = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateProxySessionResponseUnmarshaller _instance = new CreateProxySessionResponseUnmarshaller();
internal static CreateProxySessionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateProxySessionResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateSipMediaApplicationCall Request Marshaller
/// </summary>
public class CreateSipMediaApplicationCallRequestMarshaller : IMarshaller<IRequest, CreateSipMediaApplicationCallRequest> , 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((CreateSipMediaApplicationCallRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateSipMediaApplicationCallRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
if (!publicRequest.IsSetSipMediaApplicationId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field SipMediaApplicationId set");
request.AddPathResource("{sipMediaApplicationId}", StringUtils.FromString(publicRequest.SipMediaApplicationId));
request.ResourcePath = "/sip-media-applications/{sipMediaApplicationId}/calls";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetArgumentsMap())
{
context.Writer.WritePropertyName("ArgumentsMap");
context.Writer.WriteObjectStart();
foreach (var publicRequestArgumentsMapKvp in publicRequest.ArgumentsMap)
{
context.Writer.WritePropertyName(publicRequestArgumentsMapKvp.Key);
var publicRequestArgumentsMapValue = publicRequestArgumentsMapKvp.Value;
context.Writer.Write(publicRequestArgumentsMapValue);
}
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetFromPhoneNumber())
{
context.Writer.WritePropertyName("FromPhoneNumber");
context.Writer.Write(publicRequest.FromPhoneNumber);
}
if(publicRequest.IsSetSipHeaders())
{
context.Writer.WritePropertyName("SipHeaders");
context.Writer.WriteObjectStart();
foreach (var publicRequestSipHeadersKvp in publicRequest.SipHeaders)
{
context.Writer.WritePropertyName(publicRequestSipHeadersKvp.Key);
var publicRequestSipHeadersValue = publicRequestSipHeadersKvp.Value;
context.Writer.Write(publicRequestSipHeadersValue);
}
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetToPhoneNumber())
{
context.Writer.WritePropertyName("ToPhoneNumber");
context.Writer.Write(publicRequest.ToPhoneNumber);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateSipMediaApplicationCallRequestMarshaller _instance = new CreateSipMediaApplicationCallRequestMarshaller();
internal static CreateSipMediaApplicationCallRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateSipMediaApplicationCallRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateSipMediaApplicationCall operation
/// </summary>
public class CreateSipMediaApplicationCallResponseUnmarshaller : 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)
{
CreateSipMediaApplicationCallResponse response = new CreateSipMediaApplicationCallResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("SipMediaApplicationCall", targetDepth))
{
var unmarshaller = SipMediaApplicationCallUnmarshaller.Instance;
response.SipMediaApplicationCall = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateSipMediaApplicationCallResponseUnmarshaller _instance = new CreateSipMediaApplicationCallResponseUnmarshaller();
internal static CreateSipMediaApplicationCallResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateSipMediaApplicationCallResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateSipMediaApplication Request Marshaller
/// </summary>
public class CreateSipMediaApplicationRequestMarshaller : IMarshaller<IRequest, CreateSipMediaApplicationRequest> , 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((CreateSipMediaApplicationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateSipMediaApplicationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/sip-media-applications";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetAwsRegion())
{
context.Writer.WritePropertyName("AwsRegion");
context.Writer.Write(publicRequest.AwsRegion);
}
if(publicRequest.IsSetEndpoints())
{
context.Writer.WritePropertyName("Endpoints");
context.Writer.WriteArrayStart();
foreach(var publicRequestEndpointsListValue in publicRequest.Endpoints)
{
context.Writer.WriteObjectStart();
var marshaller = SipMediaApplicationEndpointMarshaller.Instance;
marshaller.Marshall(publicRequestEndpointsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetTags())
{
context.Writer.WritePropertyName("Tags");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagsListValue in publicRequest.Tags)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagsListValue, 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 CreateSipMediaApplicationRequestMarshaller _instance = new CreateSipMediaApplicationRequestMarshaller();
internal static CreateSipMediaApplicationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateSipMediaApplicationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 139 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateSipMediaApplication operation
/// </summary>
public class CreateSipMediaApplicationResponseUnmarshaller : 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)
{
CreateSipMediaApplicationResponse response = new CreateSipMediaApplicationResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("SipMediaApplication", targetDepth))
{
var unmarshaller = SipMediaApplicationUnmarshaller.Instance;
response.SipMediaApplication = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateSipMediaApplicationResponseUnmarshaller _instance = new CreateSipMediaApplicationResponseUnmarshaller();
internal static CreateSipMediaApplicationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateSipMediaApplicationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 142 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateSipRule Request Marshaller
/// </summary>
public class CreateSipRuleRequestMarshaller : IMarshaller<IRequest, CreateSipRuleRequest> , 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((CreateSipRuleRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateSipRuleRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/sip-rules";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetDisabled())
{
context.Writer.WritePropertyName("Disabled");
context.Writer.Write(publicRequest.Disabled);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetTargetApplications())
{
context.Writer.WritePropertyName("TargetApplications");
context.Writer.WriteArrayStart();
foreach(var publicRequestTargetApplicationsListValue in publicRequest.TargetApplications)
{
context.Writer.WriteObjectStart();
var marshaller = SipRuleTargetApplicationMarshaller.Instance;
marshaller.Marshall(publicRequestTargetApplicationsListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(publicRequest.IsSetTriggerType())
{
context.Writer.WritePropertyName("TriggerType");
context.Writer.Write(publicRequest.TriggerType);
}
if(publicRequest.IsSetTriggerValue())
{
context.Writer.WritePropertyName("TriggerValue");
context.Writer.Write(publicRequest.TriggerValue);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateSipRuleRequestMarshaller _instance = new CreateSipRuleRequestMarshaller();
internal static CreateSipRuleRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateSipRuleRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 135 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateSipRule operation
/// </summary>
public class CreateSipRuleResponseUnmarshaller : 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)
{
CreateSipRuleResponse response = new CreateSipRuleResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("SipRule", targetDepth))
{
var unmarshaller = SipRuleUnmarshaller.Instance;
response.SipRule = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateSipRuleResponseUnmarshaller _instance = new CreateSipRuleResponseUnmarshaller();
internal static CreateSipRuleResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateSipRuleResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 142 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateVoiceConnectorGroup Request Marshaller
/// </summary>
public class CreateVoiceConnectorGroupRequestMarshaller : IMarshaller<IRequest, CreateVoiceConnectorGroupRequest> , 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((CreateVoiceConnectorGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateVoiceConnectorGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/voice-connector-groups";
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.IsSetVoiceConnectorItems())
{
context.Writer.WritePropertyName("VoiceConnectorItems");
context.Writer.WriteArrayStart();
foreach(var publicRequestVoiceConnectorItemsListValue in publicRequest.VoiceConnectorItems)
{
context.Writer.WriteObjectStart();
var marshaller = VoiceConnectorItemMarshaller.Instance;
marshaller.Marshall(publicRequestVoiceConnectorItemsListValue, 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 CreateVoiceConnectorGroupRequestMarshaller _instance = new CreateVoiceConnectorGroupRequestMarshaller();
internal static CreateVoiceConnectorGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceConnectorGroupRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 117 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateVoiceConnectorGroup operation
/// </summary>
public class CreateVoiceConnectorGroupResponseUnmarshaller : 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)
{
CreateVoiceConnectorGroupResponse response = new CreateVoiceConnectorGroupResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceConnectorGroup", targetDepth))
{
var unmarshaller = VoiceConnectorGroupUnmarshaller.Instance;
response.VoiceConnectorGroup = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateVoiceConnectorGroupResponseUnmarshaller _instance = new CreateVoiceConnectorGroupResponseUnmarshaller();
internal static CreateVoiceConnectorGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceConnectorGroupResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateVoiceConnector Request Marshaller
/// </summary>
public class CreateVoiceConnectorRequestMarshaller : IMarshaller<IRequest, CreateVoiceConnectorRequest> , 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((CreateVoiceConnectorRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateVoiceConnectorRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/voice-connectors";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetAwsRegion())
{
context.Writer.WritePropertyName("AwsRegion");
context.Writer.Write(publicRequest.AwsRegion);
}
if(publicRequest.IsSetName())
{
context.Writer.WritePropertyName("Name");
context.Writer.Write(publicRequest.Name);
}
if(publicRequest.IsSetRequireEncryption())
{
context.Writer.WritePropertyName("RequireEncryption");
context.Writer.Write(publicRequest.RequireEncryption);
}
if(publicRequest.IsSetTags())
{
context.Writer.WritePropertyName("Tags");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagsListValue in publicRequest.Tags)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagsListValue, 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 CreateVoiceConnectorRequestMarshaller _instance = new CreateVoiceConnectorRequestMarshaller();
internal static CreateVoiceConnectorRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceConnectorRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 129 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateVoiceConnector operation
/// </summary>
public class CreateVoiceConnectorResponseUnmarshaller : 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)
{
CreateVoiceConnectorResponse response = new CreateVoiceConnectorResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceConnector", targetDepth))
{
var unmarshaller = VoiceConnectorUnmarshaller.Instance;
response.VoiceConnector = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateVoiceConnectorResponseUnmarshaller _instance = new CreateVoiceConnectorResponseUnmarshaller();
internal static CreateVoiceConnectorResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceConnectorResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateVoiceProfileDomain Request Marshaller
/// </summary>
public class CreateVoiceProfileDomainRequestMarshaller : IMarshaller<IRequest, CreateVoiceProfileDomainRequest> , 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((CreateVoiceProfileDomainRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateVoiceProfileDomainRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/voice-profile-domains";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetClientRequestToken())
{
context.Writer.WritePropertyName("ClientRequestToken");
context.Writer.Write(publicRequest.ClientRequestToken);
}
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.IsSetServerSideEncryptionConfiguration())
{
context.Writer.WritePropertyName("ServerSideEncryptionConfiguration");
context.Writer.WriteObjectStart();
var marshaller = ServerSideEncryptionConfigurationMarshaller.Instance;
marshaller.Marshall(publicRequest.ServerSideEncryptionConfiguration, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetTags())
{
context.Writer.WritePropertyName("Tags");
context.Writer.WriteArrayStart();
foreach(var publicRequestTagsListValue in publicRequest.Tags)
{
context.Writer.WriteObjectStart();
var marshaller = TagMarshaller.Instance;
marshaller.Marshall(publicRequestTagsListValue, 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 CreateVoiceProfileDomainRequestMarshaller _instance = new CreateVoiceProfileDomainRequestMarshaller();
internal static CreateVoiceProfileDomainRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceProfileDomainRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateVoiceProfileDomain operation
/// </summary>
public class CreateVoiceProfileDomainResponseUnmarshaller : 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)
{
CreateVoiceProfileDomainResponse response = new CreateVoiceProfileDomainResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceProfileDomain", targetDepth))
{
var unmarshaller = VoiceProfileDomainUnmarshaller.Instance;
response.VoiceProfileDomain = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateVoiceProfileDomainResponseUnmarshaller _instance = new CreateVoiceProfileDomainResponseUnmarshaller();
internal static CreateVoiceProfileDomainResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceProfileDomainResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 142 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateVoiceProfile Request Marshaller
/// </summary>
public class CreateVoiceProfileRequestMarshaller : IMarshaller<IRequest, CreateVoiceProfileRequest> , 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((CreateVoiceProfileRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateVoiceProfileRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.ResourcePath = "/voice-profiles";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetSpeakerSearchTaskId())
{
context.Writer.WritePropertyName("SpeakerSearchTaskId");
context.Writer.Write(publicRequest.SpeakerSearchTaskId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateVoiceProfileRequestMarshaller _instance = new CreateVoiceProfileRequestMarshaller();
internal static CreateVoiceProfileRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceProfileRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 101 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateVoiceProfile operation
/// </summary>
public class CreateVoiceProfileResponseUnmarshaller : 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)
{
CreateVoiceProfileResponse response = new CreateVoiceProfileResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceProfile", targetDepth))
{
var unmarshaller = VoiceProfileUnmarshaller.Instance;
response.VoiceProfile = 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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GoneException"))
{
return GoneExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceLimitExceededException"))
{
return ResourceLimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateVoiceProfileResponseUnmarshaller _instance = new CreateVoiceProfileResponseUnmarshaller();
internal static CreateVoiceProfileResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateVoiceProfileResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Credential Marshaller
/// </summary>
public class CredentialMarshaller : IRequestMarshaller<Credential, 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(Credential requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetPassword())
{
context.Writer.WritePropertyName("Password");
context.Writer.Write(requestObject.Password);
}
if(requestObject.IsSetUsername())
{
context.Writer.WritePropertyName("Username");
context.Writer.Write(requestObject.Username);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CredentialMarshaller Instance = new CredentialMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeletePhoneNumber Request Marshaller
/// </summary>
public class DeletePhoneNumberRequestMarshaller : IMarshaller<IRequest, DeletePhoneNumberRequest> , 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((DeletePhoneNumberRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeletePhoneNumberRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetPhoneNumberId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field PhoneNumberId set");
request.AddPathResource("{phoneNumberId}", StringUtils.FromString(publicRequest.PhoneNumberId));
request.ResourcePath = "/phone-numbers/{phoneNumberId}";
return request;
}
private static DeletePhoneNumberRequestMarshaller _instance = new DeletePhoneNumberRequestMarshaller();
internal static DeletePhoneNumberRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeletePhoneNumberRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeletePhoneNumber operation
/// </summary>
public class DeletePhoneNumberResponseUnmarshaller : 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)
{
DeletePhoneNumberResponse response = new DeletePhoneNumberResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeletePhoneNumberResponseUnmarshaller _instance = new DeletePhoneNumberResponseUnmarshaller();
internal static DeletePhoneNumberResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeletePhoneNumberResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteProxySession Request Marshaller
/// </summary>
public class DeleteProxySessionRequestMarshaller : IMarshaller<IRequest, DeleteProxySessionRequest> , 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((DeleteProxySessionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteProxySessionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetProxySessionId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field ProxySessionId set");
request.AddPathResource("{proxySessionId}", StringUtils.FromString(publicRequest.ProxySessionId));
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/proxy-sessions/{proxySessionId}";
return request;
}
private static DeleteProxySessionRequestMarshaller _instance = new DeleteProxySessionRequestMarshaller();
internal static DeleteProxySessionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteProxySessionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 90 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteProxySession operation
/// </summary>
public class DeleteProxySessionResponseUnmarshaller : 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)
{
DeleteProxySessionResponse response = new DeleteProxySessionResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteProxySessionResponseUnmarshaller _instance = new DeleteProxySessionResponseUnmarshaller();
internal static DeleteProxySessionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteProxySessionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteSipMediaApplication Request Marshaller
/// </summary>
public class DeleteSipMediaApplicationRequestMarshaller : IMarshaller<IRequest, DeleteSipMediaApplicationRequest> , 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((DeleteSipMediaApplicationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteSipMediaApplicationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetSipMediaApplicationId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field SipMediaApplicationId set");
request.AddPathResource("{sipMediaApplicationId}", StringUtils.FromString(publicRequest.SipMediaApplicationId));
request.ResourcePath = "/sip-media-applications/{sipMediaApplicationId}";
return request;
}
private static DeleteSipMediaApplicationRequestMarshaller _instance = new DeleteSipMediaApplicationRequestMarshaller();
internal static DeleteSipMediaApplicationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteSipMediaApplicationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteSipMediaApplication operation
/// </summary>
public class DeleteSipMediaApplicationResponseUnmarshaller : 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)
{
DeleteSipMediaApplicationResponse response = new DeleteSipMediaApplicationResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteSipMediaApplicationResponseUnmarshaller _instance = new DeleteSipMediaApplicationResponseUnmarshaller();
internal static DeleteSipMediaApplicationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteSipMediaApplicationResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteSipRule Request Marshaller
/// </summary>
public class DeleteSipRuleRequestMarshaller : IMarshaller<IRequest, DeleteSipRuleRequest> , 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((DeleteSipRuleRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteSipRuleRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetSipRuleId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field SipRuleId set");
request.AddPathResource("{sipRuleId}", StringUtils.FromString(publicRequest.SipRuleId));
request.ResourcePath = "/sip-rules/{sipRuleId}";
return request;
}
private static DeleteSipRuleRequestMarshaller _instance = new DeleteSipRuleRequestMarshaller();
internal static DeleteSipRuleRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteSipRuleRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteSipRule operation
/// </summary>
public class DeleteSipRuleResponseUnmarshaller : 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)
{
DeleteSipRuleResponse response = new DeleteSipRuleResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteSipRuleResponseUnmarshaller _instance = new DeleteSipRuleResponseUnmarshaller();
internal static DeleteSipRuleResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteSipRuleResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnectorEmergencyCallingConfiguration Request Marshaller
/// </summary>
public class DeleteVoiceConnectorEmergencyCallingConfigurationRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorEmergencyCallingConfigurationRequest> , 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((DeleteVoiceConnectorEmergencyCallingConfigurationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorEmergencyCallingConfigurationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/emergency-calling-configuration";
return request;
}
private static DeleteVoiceConnectorEmergencyCallingConfigurationRequestMarshaller _instance = new DeleteVoiceConnectorEmergencyCallingConfigurationRequestMarshaller();
internal static DeleteVoiceConnectorEmergencyCallingConfigurationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorEmergencyCallingConfigurationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnectorEmergencyCallingConfiguration operation
/// </summary>
public class DeleteVoiceConnectorEmergencyCallingConfigurationResponseUnmarshaller : 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)
{
DeleteVoiceConnectorEmergencyCallingConfigurationResponse response = new DeleteVoiceConnectorEmergencyCallingConfigurationResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorEmergencyCallingConfigurationResponseUnmarshaller _instance = new DeleteVoiceConnectorEmergencyCallingConfigurationResponseUnmarshaller();
internal static DeleteVoiceConnectorEmergencyCallingConfigurationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorEmergencyCallingConfigurationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnectorGroup Request Marshaller
/// </summary>
public class DeleteVoiceConnectorGroupRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorGroupRequest> , 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((DeleteVoiceConnectorGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceConnectorGroupId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorGroupId set");
request.AddPathResource("{voiceConnectorGroupId}", StringUtils.FromString(publicRequest.VoiceConnectorGroupId));
request.ResourcePath = "/voice-connector-groups/{voiceConnectorGroupId}";
return request;
}
private static DeleteVoiceConnectorGroupRequestMarshaller _instance = new DeleteVoiceConnectorGroupRequestMarshaller();
internal static DeleteVoiceConnectorGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorGroupRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnectorGroup operation
/// </summary>
public class DeleteVoiceConnectorGroupResponseUnmarshaller : 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)
{
DeleteVoiceConnectorGroupResponse response = new DeleteVoiceConnectorGroupResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorGroupResponseUnmarshaller _instance = new DeleteVoiceConnectorGroupResponseUnmarshaller();
internal static DeleteVoiceConnectorGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorGroupResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnectorOrigination Request Marshaller
/// </summary>
public class DeleteVoiceConnectorOriginationRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorOriginationRequest> , 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((DeleteVoiceConnectorOriginationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorOriginationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/origination";
return request;
}
private static DeleteVoiceConnectorOriginationRequestMarshaller _instance = new DeleteVoiceConnectorOriginationRequestMarshaller();
internal static DeleteVoiceConnectorOriginationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorOriginationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnectorOrigination operation
/// </summary>
public class DeleteVoiceConnectorOriginationResponseUnmarshaller : 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)
{
DeleteVoiceConnectorOriginationResponse response = new DeleteVoiceConnectorOriginationResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorOriginationResponseUnmarshaller _instance = new DeleteVoiceConnectorOriginationResponseUnmarshaller();
internal static DeleteVoiceConnectorOriginationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorOriginationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnectorProxy Request Marshaller
/// </summary>
public class DeleteVoiceConnectorProxyRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorProxyRequest> , 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((DeleteVoiceConnectorProxyRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorProxyRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/programmable-numbers/proxy";
return request;
}
private static DeleteVoiceConnectorProxyRequestMarshaller _instance = new DeleteVoiceConnectorProxyRequestMarshaller();
internal static DeleteVoiceConnectorProxyRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorProxyRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnectorProxy operation
/// </summary>
public class DeleteVoiceConnectorProxyResponseUnmarshaller : 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)
{
DeleteVoiceConnectorProxyResponse response = new DeleteVoiceConnectorProxyResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorProxyResponseUnmarshaller _instance = new DeleteVoiceConnectorProxyResponseUnmarshaller();
internal static DeleteVoiceConnectorProxyResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorProxyResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnector Request Marshaller
/// </summary>
public class DeleteVoiceConnectorRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorRequest> , 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((DeleteVoiceConnectorRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}";
return request;
}
private static DeleteVoiceConnectorRequestMarshaller _instance = new DeleteVoiceConnectorRequestMarshaller();
internal static DeleteVoiceConnectorRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnector operation
/// </summary>
public class DeleteVoiceConnectorResponseUnmarshaller : 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)
{
DeleteVoiceConnectorResponse response = new DeleteVoiceConnectorResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorResponseUnmarshaller _instance = new DeleteVoiceConnectorResponseUnmarshaller();
internal static DeleteVoiceConnectorResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnectorStreamingConfiguration Request Marshaller
/// </summary>
public class DeleteVoiceConnectorStreamingConfigurationRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorStreamingConfigurationRequest> , 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((DeleteVoiceConnectorStreamingConfigurationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorStreamingConfigurationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/streaming-configuration";
return request;
}
private static DeleteVoiceConnectorStreamingConfigurationRequestMarshaller _instance = new DeleteVoiceConnectorStreamingConfigurationRequestMarshaller();
internal static DeleteVoiceConnectorStreamingConfigurationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorStreamingConfigurationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnectorStreamingConfiguration operation
/// </summary>
public class DeleteVoiceConnectorStreamingConfigurationResponseUnmarshaller : 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)
{
DeleteVoiceConnectorStreamingConfigurationResponse response = new DeleteVoiceConnectorStreamingConfigurationResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorStreamingConfigurationResponseUnmarshaller _instance = new DeleteVoiceConnectorStreamingConfigurationResponseUnmarshaller();
internal static DeleteVoiceConnectorStreamingConfigurationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorStreamingConfigurationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnectorTerminationCredentials Request Marshaller
/// </summary>
public class DeleteVoiceConnectorTerminationCredentialsRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorTerminationCredentialsRequest> , 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((DeleteVoiceConnectorTerminationCredentialsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorTerminationCredentialsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "delete");
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/termination/credentials";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetUsernames())
{
context.Writer.WritePropertyName("Usernames");
context.Writer.WriteArrayStart();
foreach(var publicRequestUsernamesListValue in publicRequest.Usernames)
{
context.Writer.Write(publicRequestUsernamesListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteVoiceConnectorTerminationCredentialsRequestMarshaller _instance = new DeleteVoiceConnectorTerminationCredentialsRequestMarshaller();
internal static DeleteVoiceConnectorTerminationCredentialsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorTerminationCredentialsRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnectorTerminationCredentials operation
/// </summary>
public class DeleteVoiceConnectorTerminationCredentialsResponseUnmarshaller : 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)
{
DeleteVoiceConnectorTerminationCredentialsResponse response = new DeleteVoiceConnectorTerminationCredentialsResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorTerminationCredentialsResponseUnmarshaller _instance = new DeleteVoiceConnectorTerminationCredentialsResponseUnmarshaller();
internal static DeleteVoiceConnectorTerminationCredentialsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorTerminationCredentialsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceConnectorTermination Request Marshaller
/// </summary>
public class DeleteVoiceConnectorTerminationRequestMarshaller : IMarshaller<IRequest, DeleteVoiceConnectorTerminationRequest> , 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((DeleteVoiceConnectorTerminationRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceConnectorTerminationRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/termination";
return request;
}
private static DeleteVoiceConnectorTerminationRequestMarshaller _instance = new DeleteVoiceConnectorTerminationRequestMarshaller();
internal static DeleteVoiceConnectorTerminationRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorTerminationRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceConnectorTermination operation
/// </summary>
public class DeleteVoiceConnectorTerminationResponseUnmarshaller : 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)
{
DeleteVoiceConnectorTerminationResponse response = new DeleteVoiceConnectorTerminationResponse();
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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceConnectorTerminationResponseUnmarshaller _instance = new DeleteVoiceConnectorTerminationResponseUnmarshaller();
internal static DeleteVoiceConnectorTerminationResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceConnectorTerminationResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceProfileDomain Request Marshaller
/// </summary>
public class DeleteVoiceProfileDomainRequestMarshaller : IMarshaller<IRequest, DeleteVoiceProfileDomainRequest> , 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((DeleteVoiceProfileDomainRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceProfileDomainRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceProfileDomainId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceProfileDomainId set");
request.AddPathResource("{VoiceProfileDomainId}", StringUtils.FromString(publicRequest.VoiceProfileDomainId));
request.ResourcePath = "/voice-profile-domains/{VoiceProfileDomainId}";
return request;
}
private static DeleteVoiceProfileDomainRequestMarshaller _instance = new DeleteVoiceProfileDomainRequestMarshaller();
internal static DeleteVoiceProfileDomainRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceProfileDomainRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceProfileDomain operation
/// </summary>
public class DeleteVoiceProfileDomainResponseUnmarshaller : 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)
{
DeleteVoiceProfileDomainResponse response = new DeleteVoiceProfileDomainResponse();
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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceProfileDomainResponseUnmarshaller _instance = new DeleteVoiceProfileDomainResponseUnmarshaller();
internal static DeleteVoiceProfileDomainResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceProfileDomainResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 131 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteVoiceProfile Request Marshaller
/// </summary>
public class DeleteVoiceProfileRequestMarshaller : IMarshaller<IRequest, DeleteVoiceProfileRequest> , 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((DeleteVoiceProfileRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteVoiceProfileRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "DELETE";
if (!publicRequest.IsSetVoiceProfileId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceProfileId set");
request.AddPathResource("{VoiceProfileId}", StringUtils.FromString(publicRequest.VoiceProfileId));
request.ResourcePath = "/voice-profiles/{VoiceProfileId}";
return request;
}
private static DeleteVoiceProfileRequestMarshaller _instance = new DeleteVoiceProfileRequestMarshaller();
internal static DeleteVoiceProfileRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceProfileRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteVoiceProfile operation
/// </summary>
public class DeleteVoiceProfileResponseUnmarshaller : 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)
{
DeleteVoiceProfileResponse response = new DeleteVoiceProfileResponse();
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("AccessDeniedException"))
{
return AccessDeniedExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ConflictException"))
{
return ConflictExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteVoiceProfileResponseUnmarshaller _instance = new DeleteVoiceProfileResponseUnmarshaller();
internal static DeleteVoiceProfileResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteVoiceProfileResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 131 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DisassociatePhoneNumbersFromVoiceConnectorGroup Request Marshaller
/// </summary>
public class DisassociatePhoneNumbersFromVoiceConnectorGroupRequestMarshaller : IMarshaller<IRequest, DisassociatePhoneNumbersFromVoiceConnectorGroupRequest> , 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((DisassociatePhoneNumbersFromVoiceConnectorGroupRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DisassociatePhoneNumbersFromVoiceConnectorGroupRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "disassociate-phone-numbers");
if (!publicRequest.IsSetVoiceConnectorGroupId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorGroupId set");
request.AddPathResource("{voiceConnectorGroupId}", StringUtils.FromString(publicRequest.VoiceConnectorGroupId));
request.ResourcePath = "/voice-connector-groups/{voiceConnectorGroupId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetE164PhoneNumbers())
{
context.Writer.WritePropertyName("E164PhoneNumbers");
context.Writer.WriteArrayStart();
foreach(var publicRequestE164PhoneNumbersListValue in publicRequest.E164PhoneNumbers)
{
context.Writer.Write(publicRequestE164PhoneNumbersListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DisassociatePhoneNumbersFromVoiceConnectorGroupRequestMarshaller _instance = new DisassociatePhoneNumbersFromVoiceConnectorGroupRequestMarshaller();
internal static DisassociatePhoneNumbersFromVoiceConnectorGroupRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociatePhoneNumbersFromVoiceConnectorGroupRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DisassociatePhoneNumbersFromVoiceConnectorGroup operation
/// </summary>
public class DisassociatePhoneNumbersFromVoiceConnectorGroupResponseUnmarshaller : 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)
{
DisassociatePhoneNumbersFromVoiceConnectorGroupResponse response = new DisassociatePhoneNumbersFromVoiceConnectorGroupResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberErrors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<PhoneNumberError, PhoneNumberErrorUnmarshaller>(PhoneNumberErrorUnmarshaller.Instance);
response.PhoneNumberErrors = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DisassociatePhoneNumbersFromVoiceConnectorGroupResponseUnmarshaller _instance = new DisassociatePhoneNumbersFromVoiceConnectorGroupResponseUnmarshaller();
internal static DisassociatePhoneNumbersFromVoiceConnectorGroupResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociatePhoneNumbersFromVoiceConnectorGroupResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DisassociatePhoneNumbersFromVoiceConnector Request Marshaller
/// </summary>
public class DisassociatePhoneNumbersFromVoiceConnectorRequestMarshaller : IMarshaller<IRequest, DisassociatePhoneNumbersFromVoiceConnectorRequest> , 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((DisassociatePhoneNumbersFromVoiceConnectorRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DisassociatePhoneNumbersFromVoiceConnectorRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "POST";
request.AddSubResource("operation", "disassociate-phone-numbers");
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetE164PhoneNumbers())
{
context.Writer.WritePropertyName("E164PhoneNumbers");
context.Writer.WriteArrayStart();
foreach(var publicRequestE164PhoneNumbersListValue in publicRequest.E164PhoneNumbers)
{
context.Writer.Write(publicRequestE164PhoneNumbersListValue);
}
context.Writer.WriteArrayEnd();
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DisassociatePhoneNumbersFromVoiceConnectorRequestMarshaller _instance = new DisassociatePhoneNumbersFromVoiceConnectorRequestMarshaller();
internal static DisassociatePhoneNumbersFromVoiceConnectorRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociatePhoneNumbersFromVoiceConnectorRequestMarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DisassociatePhoneNumbersFromVoiceConnector operation
/// </summary>
public class DisassociatePhoneNumbersFromVoiceConnectorResponseUnmarshaller : 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)
{
DisassociatePhoneNumbersFromVoiceConnectorResponse response = new DisassociatePhoneNumbersFromVoiceConnectorResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberErrors", targetDepth))
{
var unmarshaller = new ListUnmarshaller<PhoneNumberError, PhoneNumberErrorUnmarshaller>(PhoneNumberErrorUnmarshaller.Instance);
response.PhoneNumberErrors = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DisassociatePhoneNumbersFromVoiceConnectorResponseUnmarshaller _instance = new DisassociatePhoneNumbersFromVoiceConnectorResponseUnmarshaller();
internal static DisassociatePhoneNumbersFromVoiceConnectorResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisassociatePhoneNumbersFromVoiceConnectorResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// DNISEmergencyCallingConfiguration Marshaller
/// </summary>
public class DNISEmergencyCallingConfigurationMarshaller : IRequestMarshaller<DNISEmergencyCallingConfiguration, 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(DNISEmergencyCallingConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCallingCountry())
{
context.Writer.WritePropertyName("CallingCountry");
context.Writer.Write(requestObject.CallingCountry);
}
if(requestObject.IsSetEmergencyPhoneNumber())
{
context.Writer.WritePropertyName("EmergencyPhoneNumber");
context.Writer.Write(requestObject.EmergencyPhoneNumber);
}
if(requestObject.IsSetTestPhoneNumber())
{
context.Writer.WritePropertyName("TestPhoneNumber");
context.Writer.Write(requestObject.TestPhoneNumber);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static DNISEmergencyCallingConfigurationMarshaller Instance = new DNISEmergencyCallingConfigurationMarshaller();
}
}
| 74 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DNISEmergencyCallingConfiguration Object
/// </summary>
public class DNISEmergencyCallingConfigurationUnmarshaller : IUnmarshaller<DNISEmergencyCallingConfiguration, XmlUnmarshallerContext>, IUnmarshaller<DNISEmergencyCallingConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
DNISEmergencyCallingConfiguration IUnmarshaller<DNISEmergencyCallingConfiguration, 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 DNISEmergencyCallingConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
DNISEmergencyCallingConfiguration unmarshalledObject = new DNISEmergencyCallingConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CallingCountry", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CallingCountry = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("EmergencyPhoneNumber", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EmergencyPhoneNumber = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TestPhoneNumber", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TestPhoneNumber = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static DNISEmergencyCallingConfigurationUnmarshaller _instance = new DNISEmergencyCallingConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DNISEmergencyCallingConfigurationUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// EmergencyCallingConfiguration Marshaller
/// </summary>
public class EmergencyCallingConfigurationMarshaller : IRequestMarshaller<EmergencyCallingConfiguration, 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(EmergencyCallingConfiguration requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetDNIS())
{
context.Writer.WritePropertyName("DNIS");
context.Writer.WriteArrayStart();
foreach(var requestObjectDNISListValue in requestObject.DNIS)
{
context.Writer.WriteObjectStart();
var marshaller = DNISEmergencyCallingConfigurationMarshaller.Instance;
marshaller.Marshall(requestObjectDNISListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static EmergencyCallingConfigurationMarshaller Instance = new EmergencyCallingConfigurationMarshaller();
}
}
| 72 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for EmergencyCallingConfiguration Object
/// </summary>
public class EmergencyCallingConfigurationUnmarshaller : IUnmarshaller<EmergencyCallingConfiguration, XmlUnmarshallerContext>, IUnmarshaller<EmergencyCallingConfiguration, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
EmergencyCallingConfiguration IUnmarshaller<EmergencyCallingConfiguration, 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 EmergencyCallingConfiguration Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
EmergencyCallingConfiguration unmarshalledObject = new EmergencyCallingConfiguration();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("DNIS", targetDepth))
{
var unmarshaller = new ListUnmarshaller<DNISEmergencyCallingConfiguration, DNISEmergencyCallingConfigurationUnmarshaller>(DNISEmergencyCallingConfigurationUnmarshaller.Instance);
unmarshalledObject.DNIS = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static EmergencyCallingConfigurationUnmarshaller _instance = new EmergencyCallingConfigurationUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static EmergencyCallingConfigurationUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 92 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ForbiddenException Object
/// </summary>
public class ForbiddenExceptionUnmarshaller : IErrorResponseUnmarshaller<ForbiddenException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ForbiddenException 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 ForbiddenException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
ForbiddenException unmarshalledObject = new ForbiddenException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static ForbiddenExceptionUnmarshaller _instance = new ForbiddenExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ForbiddenExceptionUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// GeoMatchParams Marshaller
/// </summary>
public class GeoMatchParamsMarshaller : IRequestMarshaller<GeoMatchParams, 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(GeoMatchParams requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAreaCode())
{
context.Writer.WritePropertyName("AreaCode");
context.Writer.Write(requestObject.AreaCode);
}
if(requestObject.IsSetCountry())
{
context.Writer.WritePropertyName("Country");
context.Writer.Write(requestObject.Country);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static GeoMatchParamsMarshaller Instance = new GeoMatchParamsMarshaller();
}
}
| 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GeoMatchParams Object
/// </summary>
public class GeoMatchParamsUnmarshaller : IUnmarshaller<GeoMatchParams, XmlUnmarshallerContext>, IUnmarshaller<GeoMatchParams, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
GeoMatchParams IUnmarshaller<GeoMatchParams, 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 GeoMatchParams Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
GeoMatchParams unmarshalledObject = new GeoMatchParams();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("AreaCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AreaCode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Country", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Country = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static GeoMatchParamsUnmarshaller _instance = new GeoMatchParamsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static GeoMatchParamsUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetGlobalSettings Request Marshaller
/// </summary>
public class GetGlobalSettingsRequestMarshaller : IMarshaller<IRequest, GetGlobalSettingsRequest> , 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((GetGlobalSettingsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetGlobalSettingsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "GET";
request.ResourcePath = "/settings";
return request;
}
private static GetGlobalSettingsRequestMarshaller _instance = new GetGlobalSettingsRequestMarshaller();
internal static GetGlobalSettingsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetGlobalSettingsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 84 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetGlobalSettings operation
/// </summary>
public class GetGlobalSettingsResponseUnmarshaller : 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)
{
GetGlobalSettingsResponse response = new GetGlobalSettingsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("VoiceConnector", targetDepth))
{
var unmarshaller = VoiceConnectorSettingsUnmarshaller.Instance;
response.VoiceConnector = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetGlobalSettingsResponseUnmarshaller _instance = new GetGlobalSettingsResponseUnmarshaller();
internal static GetGlobalSettingsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetGlobalSettingsResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetPhoneNumberOrder Request Marshaller
/// </summary>
public class GetPhoneNumberOrderRequestMarshaller : IMarshaller<IRequest, GetPhoneNumberOrderRequest> , 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((GetPhoneNumberOrderRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetPhoneNumberOrderRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "GET";
if (!publicRequest.IsSetPhoneNumberOrderId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field PhoneNumberOrderId set");
request.AddPathResource("{phoneNumberOrderId}", StringUtils.FromString(publicRequest.PhoneNumberOrderId));
request.ResourcePath = "/phone-number-orders/{phoneNumberOrderId}";
return request;
}
private static GetPhoneNumberOrderRequestMarshaller _instance = new GetPhoneNumberOrderRequestMarshaller();
internal static GetPhoneNumberOrderRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPhoneNumberOrderRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetPhoneNumberOrder operation
/// </summary>
public class GetPhoneNumberOrderResponseUnmarshaller : 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)
{
GetPhoneNumberOrderResponse response = new GetPhoneNumberOrderResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumberOrder", targetDepth))
{
var unmarshaller = PhoneNumberOrderUnmarshaller.Instance;
response.PhoneNumberOrder = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetPhoneNumberOrderResponseUnmarshaller _instance = new GetPhoneNumberOrderResponseUnmarshaller();
internal static GetPhoneNumberOrderResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPhoneNumberOrderResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetPhoneNumber Request Marshaller
/// </summary>
public class GetPhoneNumberRequestMarshaller : IMarshaller<IRequest, GetPhoneNumberRequest> , 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((GetPhoneNumberRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetPhoneNumberRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "GET";
if (!publicRequest.IsSetPhoneNumberId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field PhoneNumberId set");
request.AddPathResource("{phoneNumberId}", StringUtils.FromString(publicRequest.PhoneNumberId));
request.ResourcePath = "/phone-numbers/{phoneNumberId}";
return request;
}
private static GetPhoneNumberRequestMarshaller _instance = new GetPhoneNumberRequestMarshaller();
internal static GetPhoneNumberRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPhoneNumberRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 87 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetPhoneNumber operation
/// </summary>
public class GetPhoneNumberResponseUnmarshaller : 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)
{
GetPhoneNumberResponse response = new GetPhoneNumberResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("PhoneNumber", targetDepth))
{
var unmarshaller = PhoneNumberUnmarshaller.Instance;
response.PhoneNumber = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetPhoneNumberResponseUnmarshaller _instance = new GetPhoneNumberResponseUnmarshaller();
internal static GetPhoneNumberResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPhoneNumberResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetPhoneNumberSettings Request Marshaller
/// </summary>
public class GetPhoneNumberSettingsRequestMarshaller : IMarshaller<IRequest, GetPhoneNumberSettingsRequest> , 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((GetPhoneNumberSettingsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetPhoneNumberSettingsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "GET";
request.ResourcePath = "/settings/phone-number";
return request;
}
private static GetPhoneNumberSettingsRequestMarshaller _instance = new GetPhoneNumberSettingsRequestMarshaller();
internal static GetPhoneNumberSettingsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPhoneNumberSettingsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 84 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetPhoneNumberSettings operation
/// </summary>
public class GetPhoneNumberSettingsResponseUnmarshaller : 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)
{
GetPhoneNumberSettingsResponse response = new GetPhoneNumberSettingsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("CallingName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.CallingName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("CallingNameUpdatedTimestamp", targetDepth))
{
var unmarshaller = DateTimeUnmarshaller.Instance;
response.CallingNameUpdatedTimestamp = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetPhoneNumberSettingsResponseUnmarshaller _instance = new GetPhoneNumberSettingsResponseUnmarshaller();
internal static GetPhoneNumberSettingsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetPhoneNumberSettingsResponseUnmarshaller 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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetProxySession Request Marshaller
/// </summary>
public class GetProxySessionRequestMarshaller : IMarshaller<IRequest, GetProxySessionRequest> , 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((GetProxySessionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetProxySessionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.ChimeSDKVoice");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2022-08-03";
request.HttpMethod = "GET";
if (!publicRequest.IsSetProxySessionId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field ProxySessionId set");
request.AddPathResource("{proxySessionId}", StringUtils.FromString(publicRequest.ProxySessionId));
if (!publicRequest.IsSetVoiceConnectorId())
throw new AmazonChimeSDKVoiceException("Request object does not have required field VoiceConnectorId set");
request.AddPathResource("{voiceConnectorId}", StringUtils.FromString(publicRequest.VoiceConnectorId));
request.ResourcePath = "/voice-connectors/{voiceConnectorId}/proxy-sessions/{proxySessionId}";
return request;
}
private static GetProxySessionRequestMarshaller _instance = new GetProxySessionRequestMarshaller();
internal static GetProxySessionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetProxySessionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 90 |
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 chime-sdk-voice-2022-08-03.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.ChimeSDKVoice.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.ChimeSDKVoice.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetProxySession operation
/// </summary>
public class GetProxySessionResponseUnmarshaller : 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)
{
GetProxySessionResponse response = new GetProxySessionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("ProxySession", targetDepth))
{
var unmarshaller = ProxySessionUnmarshaller.Instance;
response.ProxySession = 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("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ForbiddenException"))
{
return ForbiddenExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceFailureException"))
{
return ServiceFailureExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ServiceUnavailableException"))
{
return ServiceUnavailableExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ThrottledClientException"))
{
return ThrottledClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("UnauthorizedClientException"))
{
return UnauthorizedClientExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonChimeSDKVoiceException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetProxySessionResponseUnmarshaller _instance = new GetProxySessionResponseUnmarshaller();
internal static GetProxySessionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetProxySessionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
}
| 134 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.