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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for a double-precision 64-bit floating point field. Present if <code>IndexFieldType</code>
/// specifies the field is of type <code>double</code>. All options are enabled by default.
/// </summary>
public partial class DoubleOptions
{
private double? _defaultValue;
private bool? _facetEnabled;
private bool? _returnEnabled;
private bool? _searchEnabled;
private bool? _sortEnabled;
private string _sourceField;
/// <summary>
/// Gets and sets the property DefaultValue.
/// <para>
/// A value to use for the field if the field isn't specified for a document. This can
/// be important if you are using the field in an expression and that field is not present
/// in every document.
/// </para>
/// </summary>
public double DefaultValue
{
get { return this._defaultValue.GetValueOrDefault(); }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue.HasValue;
}
/// <summary>
/// Gets and sets the property FacetEnabled.
/// <para>
/// Whether facet information can be returned for the field.
/// </para>
/// </summary>
public bool FacetEnabled
{
get { return this._facetEnabled.GetValueOrDefault(); }
set { this._facetEnabled = value; }
}
// Check to see if FacetEnabled property is set
internal bool IsSetFacetEnabled()
{
return this._facetEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SearchEnabled.
/// <para>
/// Whether the contents of the field are searchable.
/// </para>
/// </summary>
public bool SearchEnabled
{
get { return this._searchEnabled.GetValueOrDefault(); }
set { this._searchEnabled = value; }
}
// Check to see if SearchEnabled property is set
internal bool IsSetSearchEnabled()
{
return this._searchEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SortEnabled.
/// <para>
/// Whether the field can be used to sort the search results.
/// </para>
/// </summary>
public bool SortEnabled
{
get { return this._sortEnabled.GetValueOrDefault(); }
set { this._sortEnabled = value; }
}
// Check to see if SortEnabled property is set
internal bool IsSetSortEnabled()
{
return this._sortEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceField.
/// <para>
/// The name of the source field to map to the field.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=64)]
public string SourceField
{
get { return this._sourceField; }
set { this._sourceField = value; }
}
// Check to see if SourceField property is set
internal bool IsSetSourceField()
{
return this._sourceField != 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// A named expression that can be evaluated at search time. Can be used to sort the search
/// results, define other expressions, or return computed information in the search results.
/// </summary>
public partial class Expression
{
private string _expressionName;
private string _expressionValue;
/// <summary>
/// Gets and sets the property ExpressionName.
/// </summary>
[AWSProperty(Required=true, Min=1, Max=64)]
public string ExpressionName
{
get { return this._expressionName; }
set { this._expressionName = value; }
}
// Check to see if ExpressionName property is set
internal bool IsSetExpressionName()
{
return this._expressionName != null;
}
/// <summary>
/// Gets and sets the property ExpressionValue.
/// </summary>
[AWSProperty(Required=true, Min=1, Max=10240)]
public string ExpressionValue
{
get { return this._expressionValue; }
set { this._expressionValue = value; }
}
// Check to see if ExpressionValue property is set
internal bool IsSetExpressionValue()
{
return this._expressionValue != null;
}
}
} | 73 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The value of an <code>Expression</code> and its current status.
/// </summary>
public partial class ExpressionStatus
{
private Expression _options;
private OptionStatus _status;
/// <summary>
/// Gets and sets the property Options.
/// <para>
/// The expression that is evaluated for sorting while processing a search request.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public Expression Options
{
get { return this._options; }
set { this._options = value; }
}
// Check to see if Options property is set
internal bool IsSetOptions()
{
return this._options != null;
}
/// <summary>
/// Gets and sets the property Status.
/// </summary>
[AWSProperty(Required=true)]
public OptionStatus Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
}
} | 75 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Container for the parameters to the IndexDocuments operation.
/// Tells the search domain to start indexing its documents using the latest indexing
/// options. This operation must be invoked to activate options whose <a>OptionStatus</a>
/// is <code>RequiresIndexDocuments</code>.
/// </summary>
public partial class IndexDocumentsRequest : AmazonCloudSearchRequest
{
private string _domainName;
/// <summary>
/// Gets and sets the property DomainName.
/// </summary>
[AWSProperty(Required=true, Min=3, Max=28)]
public string DomainName
{
get { return this._domainName; }
set { this._domainName = value; }
}
// Check to see if DomainName property is set
internal bool IsSetDomainName()
{
return this._domainName != 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The result of an <code>IndexDocuments</code> request. Contains the status of the indexing
/// operation, including the fields being indexed.
/// </summary>
public partial class IndexDocumentsResponse : AmazonWebServiceResponse
{
private List<string> _fieldNames = new List<string>();
/// <summary>
/// Gets and sets the property FieldNames.
/// <para>
/// The names of the fields that are currently being indexed.
/// </para>
/// </summary>
public List<string> FieldNames
{
get { return this._fieldNames; }
set { this._fieldNames = value; }
}
// Check to see if FieldNames property is set
internal bool IsSetFieldNames()
{
return this._fieldNames != null && this._fieldNames.Count > 0;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Configuration information for a field in the index, including its name, type, and
/// options. The supported options depend on the <code><a>IndexFieldType</a></code>.
/// </summary>
public partial class IndexField
{
private DateArrayOptions _dateArrayOptions;
private DateOptions _dateOptions;
private DoubleArrayOptions _doubleArrayOptions;
private DoubleOptions _doubleOptions;
private string _indexFieldName;
private IndexFieldType _indexFieldType;
private IntArrayOptions _intArrayOptions;
private IntOptions _intOptions;
private LatLonOptions _latLonOptions;
private LiteralArrayOptions _literalArrayOptions;
private LiteralOptions _literalOptions;
private TextArrayOptions _textArrayOptions;
private TextOptions _textOptions;
/// <summary>
/// Gets and sets the property DateArrayOptions.
/// </summary>
public DateArrayOptions DateArrayOptions
{
get { return this._dateArrayOptions; }
set { this._dateArrayOptions = value; }
}
// Check to see if DateArrayOptions property is set
internal bool IsSetDateArrayOptions()
{
return this._dateArrayOptions != null;
}
/// <summary>
/// Gets and sets the property DateOptions.
/// </summary>
public DateOptions DateOptions
{
get { return this._dateOptions; }
set { this._dateOptions = value; }
}
// Check to see if DateOptions property is set
internal bool IsSetDateOptions()
{
return this._dateOptions != null;
}
/// <summary>
/// Gets and sets the property DoubleArrayOptions.
/// </summary>
public DoubleArrayOptions DoubleArrayOptions
{
get { return this._doubleArrayOptions; }
set { this._doubleArrayOptions = value; }
}
// Check to see if DoubleArrayOptions property is set
internal bool IsSetDoubleArrayOptions()
{
return this._doubleArrayOptions != null;
}
/// <summary>
/// Gets and sets the property DoubleOptions.
/// </summary>
public DoubleOptions DoubleOptions
{
get { return this._doubleOptions; }
set { this._doubleOptions = value; }
}
// Check to see if DoubleOptions property is set
internal bool IsSetDoubleOptions()
{
return this._doubleOptions != null;
}
/// <summary>
/// Gets and sets the property IndexFieldName.
/// <para>
/// A string that represents the name of an index field. CloudSearch supports regular
/// index fields as well as dynamic fields. A dynamic field's name defines a pattern that
/// begins or ends with a wildcard. Any document fields that don't map to a regular index
/// field but do match a dynamic field's pattern are configured with the dynamic field's
/// indexing options.
/// </para>
///
/// <para>
/// Regular field names begin with a letter and can contain the following characters:
/// a-z (lowercase), 0-9, and _ (underscore). Dynamic field names must begin or end with
/// a wildcard (*). The wildcard can also be the only character in a dynamic field name.
/// Multiple wildcards, and wildcards embedded within a string are not supported.
/// </para>
///
/// <para>
/// The name <code>score</code> is reserved and cannot be used as a field name. To reference
/// a document's ID, you can use the name <code>_id</code>.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=1, Max=64)]
public string IndexFieldName
{
get { return this._indexFieldName; }
set { this._indexFieldName = value; }
}
// Check to see if IndexFieldName property is set
internal bool IsSetIndexFieldName()
{
return this._indexFieldName != null;
}
/// <summary>
/// Gets and sets the property IndexFieldType.
/// </summary>
[AWSProperty(Required=true)]
public IndexFieldType IndexFieldType
{
get { return this._indexFieldType; }
set { this._indexFieldType = value; }
}
// Check to see if IndexFieldType property is set
internal bool IsSetIndexFieldType()
{
return this._indexFieldType != null;
}
/// <summary>
/// Gets and sets the property IntArrayOptions.
/// </summary>
public IntArrayOptions IntArrayOptions
{
get { return this._intArrayOptions; }
set { this._intArrayOptions = value; }
}
// Check to see if IntArrayOptions property is set
internal bool IsSetIntArrayOptions()
{
return this._intArrayOptions != null;
}
/// <summary>
/// Gets and sets the property IntOptions.
/// </summary>
public IntOptions IntOptions
{
get { return this._intOptions; }
set { this._intOptions = value; }
}
// Check to see if IntOptions property is set
internal bool IsSetIntOptions()
{
return this._intOptions != null;
}
/// <summary>
/// Gets and sets the property LatLonOptions.
/// </summary>
public LatLonOptions LatLonOptions
{
get { return this._latLonOptions; }
set { this._latLonOptions = value; }
}
// Check to see if LatLonOptions property is set
internal bool IsSetLatLonOptions()
{
return this._latLonOptions != null;
}
/// <summary>
/// Gets and sets the property LiteralArrayOptions.
/// </summary>
public LiteralArrayOptions LiteralArrayOptions
{
get { return this._literalArrayOptions; }
set { this._literalArrayOptions = value; }
}
// Check to see if LiteralArrayOptions property is set
internal bool IsSetLiteralArrayOptions()
{
return this._literalArrayOptions != null;
}
/// <summary>
/// Gets and sets the property LiteralOptions.
/// </summary>
public LiteralOptions LiteralOptions
{
get { return this._literalOptions; }
set { this._literalOptions = value; }
}
// Check to see if LiteralOptions property is set
internal bool IsSetLiteralOptions()
{
return this._literalOptions != null;
}
/// <summary>
/// Gets and sets the property TextArrayOptions.
/// </summary>
public TextArrayOptions TextArrayOptions
{
get { return this._textArrayOptions; }
set { this._textArrayOptions = value; }
}
// Check to see if TextArrayOptions property is set
internal bool IsSetTextArrayOptions()
{
return this._textArrayOptions != null;
}
/// <summary>
/// Gets and sets the property TextOptions.
/// </summary>
public TextOptions TextOptions
{
get { return this._textOptions; }
set { this._textOptions = value; }
}
// Check to see if TextOptions property is set
internal bool IsSetTextOptions()
{
return this._textOptions != null;
}
}
} | 268 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The value of an <code>IndexField</code> and its current status.
/// </summary>
public partial class IndexFieldStatus
{
private IndexField _options;
private OptionStatus _status;
/// <summary>
/// Gets and sets the property Options.
/// </summary>
[AWSProperty(Required=true)]
public IndexField Options
{
get { return this._options; }
set { this._options = value; }
}
// Check to see if Options property is set
internal bool IsSetOptions()
{
return this._options != null;
}
/// <summary>
/// Gets and sets the property Status.
/// </summary>
[AWSProperty(Required=true)]
public OptionStatus Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for a field that contains an array of 64-bit signed integers. Present if <code>IndexFieldType</code>
/// specifies the field is of type <code>int-array</code>. All options are enabled by
/// default.
/// </summary>
public partial class IntArrayOptions
{
private long? _defaultValue;
private bool? _facetEnabled;
private bool? _returnEnabled;
private bool? _searchEnabled;
private string _sourceFields;
/// <summary>
/// Gets and sets the property DefaultValue. A value to use for the field if the field
/// isn't specified for a document.
/// </summary>
public long DefaultValue
{
get { return this._defaultValue.GetValueOrDefault(); }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue.HasValue;
}
/// <summary>
/// Gets and sets the property FacetEnabled.
/// <para>
/// Whether facet information can be returned for the field.
/// </para>
/// </summary>
public bool FacetEnabled
{
get { return this._facetEnabled.GetValueOrDefault(); }
set { this._facetEnabled = value; }
}
// Check to see if FacetEnabled property is set
internal bool IsSetFacetEnabled()
{
return this._facetEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SearchEnabled.
/// <para>
/// Whether the contents of the field are searchable.
/// </para>
/// </summary>
public bool SearchEnabled
{
get { return this._searchEnabled.GetValueOrDefault(); }
set { this._searchEnabled = value; }
}
// Check to see if SearchEnabled property is set
internal bool IsSetSearchEnabled()
{
return this._searchEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceFields.
/// <para>
/// A list of source fields to map to the field.
/// </para>
/// </summary>
public string SourceFields
{
get { return this._sourceFields; }
set { this._sourceFields = value; }
}
// Check to see if SourceFields property is set
internal bool IsSetSourceFields()
{
return this._sourceFields != null;
}
}
} | 133 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// An internal error occurred while processing the request. If this problem persists,
/// report an issue from the <a href="http://status.aws.amazon.com/" target="_blank">Service
/// Health Dashboard</a>.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class InternalException : AmazonCloudSearchException
{
/// <summary>
/// Constructs a new InternalException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public InternalException(string message)
: base(message) {}
/// <summary>
/// Construct instance of InternalException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public InternalException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of InternalException
/// </summary>
/// <param name="innerException"></param>
public InternalException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of InternalException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InternalException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of InternalException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InternalException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the InternalException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected InternalException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 126 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for a 64-bit signed integer field. Present if <code>IndexFieldType</code>
/// specifies the field is of type <code>int</code>. All options are enabled by default.
/// </summary>
public partial class IntOptions
{
private long? _defaultValue;
private bool? _facetEnabled;
private bool? _returnEnabled;
private bool? _searchEnabled;
private bool? _sortEnabled;
private string _sourceField;
/// <summary>
/// Gets and sets the property DefaultValue. A value to use for the field if the field
/// isn't specified for a document. This can be important if you are using the field in
/// an expression and that field is not present in every document.
/// </summary>
public long DefaultValue
{
get { return this._defaultValue.GetValueOrDefault(); }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue.HasValue;
}
/// <summary>
/// Gets and sets the property FacetEnabled.
/// <para>
/// Whether facet information can be returned for the field.
/// </para>
/// </summary>
public bool FacetEnabled
{
get { return this._facetEnabled.GetValueOrDefault(); }
set { this._facetEnabled = value; }
}
// Check to see if FacetEnabled property is set
internal bool IsSetFacetEnabled()
{
return this._facetEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SearchEnabled.
/// <para>
/// Whether the contents of the field are searchable.
/// </para>
/// </summary>
public bool SearchEnabled
{
get { return this._searchEnabled.GetValueOrDefault(); }
set { this._searchEnabled = value; }
}
// Check to see if SearchEnabled property is set
internal bool IsSetSearchEnabled()
{
return this._searchEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SortEnabled.
/// <para>
/// Whether the field can be used to sort the search results.
/// </para>
/// </summary>
public bool SortEnabled
{
get { return this._sortEnabled.GetValueOrDefault(); }
set { this._sortEnabled = value; }
}
// Check to see if SortEnabled property is set
internal bool IsSetSortEnabled()
{
return this._sortEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceField.
/// <para>
/// The name of the source field to map to the field.
/// </para>
/// </summary>
[AWSProperty(Min=1, Max=64)]
public string SourceField
{
get { return this._sourceField; }
set { this._sourceField = value; }
}
// Check to see if SourceField property is set
internal bool IsSetSourceField()
{
return this._sourceField != null;
}
}
} | 153 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The request was rejected because it specified an invalid type definition.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class InvalidTypeException : AmazonCloudSearchException
{
/// <summary>
/// Constructs a new InvalidTypeException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public InvalidTypeException(string message)
: base(message) {}
/// <summary>
/// Construct instance of InvalidTypeException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public InvalidTypeException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of InvalidTypeException
/// </summary>
/// <param name="innerException"></param>
public InvalidTypeException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of InvalidTypeException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InvalidTypeException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of InvalidTypeException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public InvalidTypeException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the InvalidTypeException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected InvalidTypeException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for a latlon field. A latlon field contains a location stored as a latitude
/// and longitude value pair. Present if <code>IndexFieldType</code> specifies the field
/// is of type <code>latlon</code>. All options are enabled by default.
/// </summary>
public partial class LatLonOptions
{
private string _defaultValue;
private bool? _facetEnabled;
private bool? _returnEnabled;
private bool? _searchEnabled;
private bool? _sortEnabled;
private string _sourceField;
/// <summary>
/// Gets and sets the property DefaultValue. A value to use for the field if the field
/// isn't specified for a document.
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string DefaultValue
{
get { return this._defaultValue; }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue != null;
}
/// <summary>
/// Gets and sets the property FacetEnabled.
/// <para>
/// Whether facet information can be returned for the field.
/// </para>
/// </summary>
public bool FacetEnabled
{
get { return this._facetEnabled.GetValueOrDefault(); }
set { this._facetEnabled = value; }
}
// Check to see if FacetEnabled property is set
internal bool IsSetFacetEnabled()
{
return this._facetEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SearchEnabled.
/// <para>
/// Whether the contents of the field are searchable.
/// </para>
/// </summary>
public bool SearchEnabled
{
get { return this._searchEnabled.GetValueOrDefault(); }
set { this._searchEnabled = value; }
}
// Check to see if SearchEnabled property is set
internal bool IsSetSearchEnabled()
{
return this._searchEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SortEnabled.
/// <para>
/// Whether the field can be used to sort the search results.
/// </para>
/// </summary>
public bool SortEnabled
{
get { return this._sortEnabled.GetValueOrDefault(); }
set { this._sortEnabled = value; }
}
// Check to see if SortEnabled property is set
internal bool IsSetSortEnabled()
{
return this._sortEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceField.
/// </summary>
[AWSProperty(Min=1, Max=64)]
public string SourceField
{
get { return this._sourceField; }
set { this._sourceField = value; }
}
// Check to see if SourceField property is set
internal bool IsSetSourceField()
{
return this._sourceField != null;
}
}
} | 151 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The request was rejected because a resource limit has already been met.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class LimitExceededException : AmazonCloudSearchException
{
/// <summary>
/// Constructs a new LimitExceededException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public LimitExceededException(string message)
: base(message) {}
/// <summary>
/// Construct instance of LimitExceededException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public LimitExceededException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of LimitExceededException
/// </summary>
/// <param name="innerException"></param>
public LimitExceededException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of LimitExceededException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public LimitExceededException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of LimitExceededException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public LimitExceededException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the LimitExceededException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected LimitExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
///
/// </summary>
public partial class Limits
{
private int? _maximumPartitionCount;
private int? _maximumReplicationCount;
/// <summary>
/// Gets and sets the property MaximumPartitionCount.
/// </summary>
[AWSProperty(Required=true, Min=1)]
public int MaximumPartitionCount
{
get { return this._maximumPartitionCount.GetValueOrDefault(); }
set { this._maximumPartitionCount = value; }
}
// Check to see if MaximumPartitionCount property is set
internal bool IsSetMaximumPartitionCount()
{
return this._maximumPartitionCount.HasValue;
}
/// <summary>
/// Gets and sets the property MaximumReplicationCount.
/// </summary>
[AWSProperty(Required=true, Min=1)]
public int MaximumReplicationCount
{
get { return this._maximumReplicationCount.GetValueOrDefault(); }
set { this._maximumReplicationCount = value; }
}
// Check to see if MaximumReplicationCount property is set
internal bool IsSetMaximumReplicationCount()
{
return this._maximumReplicationCount.HasValue;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Container for the parameters to the ListDomainNames operation.
/// Lists all search domains owned by an account.
/// </summary>
public partial class ListDomainNamesRequest : AmazonCloudSearchRequest
{
}
} | 39 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The result of a <code>ListDomainNames</code> request. Contains a list of the domains
/// owned by an account.
/// </summary>
public partial class ListDomainNamesResponse : AmazonWebServiceResponse
{
private Dictionary<string, string> _domainNames = new Dictionary<string, string>();
/// <summary>
/// Gets and sets the property DomainNames.
/// <para>
/// The names of the search domains owned by an account.
/// </para>
/// </summary>
public Dictionary<string, string> DomainNames
{
get { return this._domainNames; }
set { this._domainNames = value; }
}
// Check to see if DomainNames property is set
internal bool IsSetDomainNames()
{
return this._domainNames != null && this._domainNames.Count > 0;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for a field that contains an array of literal strings. Present if <code>IndexFieldType</code>
/// specifies the field is of type <code>literal-array</code>. All options are enabled
/// by default.
/// </summary>
public partial class LiteralArrayOptions
{
private string _defaultValue;
private bool? _facetEnabled;
private bool? _returnEnabled;
private bool? _searchEnabled;
private string _sourceFields;
/// <summary>
/// Gets and sets the property DefaultValue. A value to use for the field if the field
/// isn't specified for a document.
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string DefaultValue
{
get { return this._defaultValue; }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue != null;
}
/// <summary>
/// Gets and sets the property FacetEnabled.
/// <para>
/// Whether facet information can be returned for the field.
/// </para>
/// </summary>
public bool FacetEnabled
{
get { return this._facetEnabled.GetValueOrDefault(); }
set { this._facetEnabled = value; }
}
// Check to see if FacetEnabled property is set
internal bool IsSetFacetEnabled()
{
return this._facetEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SearchEnabled.
/// <para>
/// Whether the contents of the field are searchable.
/// </para>
/// </summary>
public bool SearchEnabled
{
get { return this._searchEnabled.GetValueOrDefault(); }
set { this._searchEnabled = value; }
}
// Check to see if SearchEnabled property is set
internal bool IsSetSearchEnabled()
{
return this._searchEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceFields.
/// <para>
/// A list of source fields to map to the field.
/// </para>
/// </summary>
public string SourceFields
{
get { return this._sourceFields; }
set { this._sourceFields = value; }
}
// Check to see if SourceFields property is set
internal bool IsSetSourceFields()
{
return this._sourceFields != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for literal field. Present if <code>IndexFieldType</code> specifies the field
/// is of type <code>literal</code>. All options are enabled by default.
/// </summary>
public partial class LiteralOptions
{
private string _defaultValue;
private bool? _facetEnabled;
private bool? _returnEnabled;
private bool? _searchEnabled;
private bool? _sortEnabled;
private string _sourceField;
/// <summary>
/// Gets and sets the property DefaultValue. A value to use for the field if the field
/// isn't specified for a document.
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string DefaultValue
{
get { return this._defaultValue; }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue != null;
}
/// <summary>
/// Gets and sets the property FacetEnabled.
/// <para>
/// Whether facet information can be returned for the field.
/// </para>
/// </summary>
public bool FacetEnabled
{
get { return this._facetEnabled.GetValueOrDefault(); }
set { this._facetEnabled = value; }
}
// Check to see if FacetEnabled property is set
internal bool IsSetFacetEnabled()
{
return this._facetEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SearchEnabled.
/// <para>
/// Whether the contents of the field are searchable.
/// </para>
/// </summary>
public bool SearchEnabled
{
get { return this._searchEnabled.GetValueOrDefault(); }
set { this._searchEnabled = value; }
}
// Check to see if SearchEnabled property is set
internal bool IsSetSearchEnabled()
{
return this._searchEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SortEnabled.
/// <para>
/// Whether the field can be used to sort the search results.
/// </para>
/// </summary>
public bool SortEnabled
{
get { return this._sortEnabled.GetValueOrDefault(); }
set { this._sortEnabled = value; }
}
// Check to see if SortEnabled property is set
internal bool IsSetSortEnabled()
{
return this._sortEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceField.
/// </summary>
[AWSProperty(Min=1, Max=64)]
public string SourceField
{
get { return this._sourceField; }
set { this._sourceField = value; }
}
// Check to see if SourceField property is set
internal bool IsSetSourceField()
{
return this._sourceField != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The status of domain configuration option.
/// </summary>
public partial class OptionStatus
{
private DateTime? _creationDate;
private bool? _pendingDeletion;
private OptionState _state;
private DateTime? _updateDate;
private int? _updateVersion;
/// <summary>
/// Gets and sets the property CreationDate.
/// <para>
/// A timestamp for when this option was created.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public DateTime CreationDate
{
get { return this._creationDate.GetValueOrDefault(); }
set { this._creationDate = value; }
}
// Check to see if CreationDate property is set
internal bool IsSetCreationDate()
{
return this._creationDate.HasValue;
}
/// <summary>
/// Gets and sets the property PendingDeletion.
/// <para>
/// Indicates that the option will be deleted once processing is complete.
/// </para>
/// </summary>
public bool PendingDeletion
{
get { return this._pendingDeletion.GetValueOrDefault(); }
set { this._pendingDeletion = value; }
}
// Check to see if PendingDeletion property is set
internal bool IsSetPendingDeletion()
{
return this._pendingDeletion.HasValue;
}
/// <summary>
/// Gets and sets the property State.
/// <para>
/// The state of processing a change to an option. Possible values:
/// </para>
/// <ul> <li><code>RequiresIndexDocuments</code>: the option's latest value will not be
/// deployed until <a>IndexDocuments</a> has been called and indexing is complete.</li>
/// <li><code>Processing</code>: the option's latest value is in the process of being
/// activated. </li> <li><code>Active</code>: the option's latest value is completely
/// deployed.</li> <li><code>FailedToValidate</code>: the option value is not compatible
/// with the domain's data and cannot be used to index the data. You must either modify
/// the option value or update or remove the incompatible documents.</li> </ul>
/// </summary>
[AWSProperty(Required=true)]
public OptionState 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 UpdateDate.
/// <para>
/// A timestamp for when this option was last updated.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public DateTime UpdateDate
{
get { return this._updateDate.GetValueOrDefault(); }
set { this._updateDate = value; }
}
// Check to see if UpdateDate property is set
internal bool IsSetUpdateDate()
{
return this._updateDate.HasValue;
}
/// <summary>
/// Gets and sets the property UpdateVersion.
/// <para>
/// A unique integer that indicates when this option was last updated.
/// </para>
/// </summary>
[AWSProperty(Min=0)]
public int UpdateVersion
{
get { return this._updateVersion.GetValueOrDefault(); }
set { this._updateVersion = value; }
}
// Check to see if UpdateVersion property is set
internal bool IsSetUpdateVersion()
{
return this._updateVersion.HasValue;
}
}
} | 144 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The request was rejected because it attempted to create a resource that already exists.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class ResourceAlreadyExistsException : AmazonCloudSearchException
{
/// <summary>
/// Constructs a new ResourceAlreadyExistsException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public ResourceAlreadyExistsException(string message)
: base(message) {}
/// <summary>
/// Construct instance of ResourceAlreadyExistsException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public ResourceAlreadyExistsException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of ResourceAlreadyExistsException
/// </summary>
/// <param name="innerException"></param>
public ResourceAlreadyExistsException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of ResourceAlreadyExistsException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ResourceAlreadyExistsException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of ResourceAlreadyExistsException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ResourceAlreadyExistsException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the ResourceAlreadyExistsException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected ResourceAlreadyExistsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The request was rejected because it attempted to reference a resource that does not
/// exist.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class ResourceNotFoundException : AmazonCloudSearchException
{
/// <summary>
/// Constructs a new ResourceNotFoundException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public ResourceNotFoundException(string message)
: base(message) {}
/// <summary>
/// Construct instance of ResourceNotFoundException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public ResourceNotFoundException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of ResourceNotFoundException
/// </summary>
/// <param name="innerException"></param>
public ResourceNotFoundException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of ResourceNotFoundException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ResourceNotFoundException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of ResourceNotFoundException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ResourceNotFoundException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the ResourceNotFoundException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected ResourceNotFoundException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 125 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The desired instance type and desired number of replicas of each index partition.
/// </summary>
public partial class ScalingParameters
{
private PartitionInstanceType _desiredInstanceType;
private int? _desiredPartitionCount;
private int? _desiredReplicationCount;
/// <summary>
/// Gets and sets the property DesiredInstanceType.
/// <para>
/// The instance type that you want to preconfigure for your domain. For example, <code>search.m1.small</code>.
/// </para>
/// </summary>
public PartitionInstanceType DesiredInstanceType
{
get { return this._desiredInstanceType; }
set { this._desiredInstanceType = value; }
}
// Check to see if DesiredInstanceType property is set
internal bool IsSetDesiredInstanceType()
{
return this._desiredInstanceType != null;
}
/// <summary>
/// Gets and sets the property DesiredPartitionCount.
/// <para>
/// The number of partitions you want to preconfigure for your domain. Only valid when
/// you select <code>m2.2xlarge</code> as the desired instance type.
/// </para>
/// </summary>
[AWSProperty(Min=0)]
public int DesiredPartitionCount
{
get { return this._desiredPartitionCount.GetValueOrDefault(); }
set { this._desiredPartitionCount = value; }
}
// Check to see if DesiredPartitionCount property is set
internal bool IsSetDesiredPartitionCount()
{
return this._desiredPartitionCount.HasValue;
}
/// <summary>
/// Gets and sets the property DesiredReplicationCount.
/// <para>
/// The number of replicas you want to preconfigure for each index partition.
/// </para>
/// </summary>
[AWSProperty(Min=0)]
public int DesiredReplicationCount
{
get { return this._desiredReplicationCount.GetValueOrDefault(); }
set { this._desiredReplicationCount = value; }
}
// Check to see if DesiredReplicationCount property is set
internal bool IsSetDesiredReplicationCount()
{
return this._desiredReplicationCount.HasValue;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The status and configuration of a search domain's scaling parameters.
/// </summary>
public partial class ScalingParametersStatus
{
private ScalingParameters _options;
private OptionStatus _status;
/// <summary>
/// Gets and sets the property Options.
/// </summary>
[AWSProperty(Required=true)]
public ScalingParameters Options
{
get { return this._options; }
set { this._options = value; }
}
// Check to see if Options property is set
internal bool IsSetOptions()
{
return this._options != null;
}
/// <summary>
/// Gets and sets the property Status.
/// </summary>
[AWSProperty(Required=true)]
public OptionStatus Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The endpoint to which service requests can be submitted.
/// </summary>
public partial class ServiceEndpoint
{
private string _endpoint;
/// <summary>
/// Gets and sets the property Endpoint.
/// </summary>
public string Endpoint
{
get { return this._endpoint; }
set { this._endpoint = value; }
}
// Check to see if Endpoint property is set
internal bool IsSetEndpoint()
{
return this._endpoint != null;
}
}
} | 54 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Configuration information for a search suggester. Each suggester has a unique name
/// and specifies the text field you want to use for suggestions. The following options
/// can be configured for a suggester: <code>FuzzyMatching</code>, <code>SortExpression</code>.
/// </summary>
public partial class Suggester
{
private DocumentSuggesterOptions _documentSuggesterOptions;
private string _suggesterName;
/// <summary>
/// Gets and sets the property DocumentSuggesterOptions.
/// </summary>
[AWSProperty(Required=true)]
public DocumentSuggesterOptions DocumentSuggesterOptions
{
get { return this._documentSuggesterOptions; }
set { this._documentSuggesterOptions = value; }
}
// Check to see if DocumentSuggesterOptions property is set
internal bool IsSetDocumentSuggesterOptions()
{
return this._documentSuggesterOptions != null;
}
/// <summary>
/// Gets and sets the property SuggesterName.
/// </summary>
[AWSProperty(Required=true, Min=1, Max=64)]
public string SuggesterName
{
get { return this._suggesterName; }
set { this._suggesterName = value; }
}
// Check to see if SuggesterName property is set
internal bool IsSetSuggesterName()
{
return this._suggesterName != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The value of a <code>Suggester</code> and its current status.
/// </summary>
public partial class SuggesterStatus
{
private Suggester _options;
private OptionStatus _status;
/// <summary>
/// Gets and sets the property Options.
/// </summary>
[AWSProperty(Required=true)]
public Suggester Options
{
get { return this._options; }
set { this._options = value; }
}
// Check to see if Options property is set
internal bool IsSetOptions()
{
return this._options != null;
}
/// <summary>
/// Gets and sets the property Status.
/// </summary>
[AWSProperty(Required=true)]
public OptionStatus Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for a field that contains an array of text strings. Present if <code>IndexFieldType</code>
/// specifies the field is of type <code>text-array</code>. A <code>text-array</code>
/// field is always searchable. All options are enabled by default.
/// </summary>
public partial class TextArrayOptions
{
private string _analysisScheme;
private string _defaultValue;
private bool? _highlightEnabled;
private bool? _returnEnabled;
private string _sourceFields;
/// <summary>
/// Gets and sets the property AnalysisScheme.
/// <para>
/// The name of an analysis scheme for a <code>text-array</code> field.
/// </para>
/// </summary>
public string AnalysisScheme
{
get { return this._analysisScheme; }
set { this._analysisScheme = value; }
}
// Check to see if AnalysisScheme property is set
internal bool IsSetAnalysisScheme()
{
return this._analysisScheme != null;
}
/// <summary>
/// Gets and sets the property DefaultValue. A value to use for the field if the field
/// isn't specified for a document.
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string DefaultValue
{
get { return this._defaultValue; }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue != null;
}
/// <summary>
/// Gets and sets the property HighlightEnabled.
/// <para>
/// Whether highlights can be returned for the field.
/// </para>
/// </summary>
public bool HighlightEnabled
{
get { return this._highlightEnabled.GetValueOrDefault(); }
set { this._highlightEnabled = value; }
}
// Check to see if HighlightEnabled property is set
internal bool IsSetHighlightEnabled()
{
return this._highlightEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceFields.
/// <para>
/// A list of source fields to map to the field.
/// </para>
/// </summary>
public string SourceFields
{
get { return this._sourceFields; }
set { this._sourceFields = value; }
}
// Check to see if SourceFields property is set
internal bool IsSetSourceFields()
{
return this._sourceFields != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Options for text field. Present if <code>IndexFieldType</code> specifies the field
/// is of type <code>text</code>. A <code>text</code> field is always searchable. All
/// options are enabled by default.
/// </summary>
public partial class TextOptions
{
private string _analysisScheme;
private string _defaultValue;
private bool? _highlightEnabled;
private bool? _returnEnabled;
private bool? _sortEnabled;
private string _sourceField;
/// <summary>
/// Gets and sets the property AnalysisScheme.
/// <para>
/// The name of an analysis scheme for a <code>text</code> field.
/// </para>
/// </summary>
public string AnalysisScheme
{
get { return this._analysisScheme; }
set { this._analysisScheme = value; }
}
// Check to see if AnalysisScheme property is set
internal bool IsSetAnalysisScheme()
{
return this._analysisScheme != null;
}
/// <summary>
/// Gets and sets the property DefaultValue. A value to use for the field if the field
/// isn't specified for a document.
/// </summary>
[AWSProperty(Min=0, Max=1024)]
public string DefaultValue
{
get { return this._defaultValue; }
set { this._defaultValue = value; }
}
// Check to see if DefaultValue property is set
internal bool IsSetDefaultValue()
{
return this._defaultValue != null;
}
/// <summary>
/// Gets and sets the property HighlightEnabled.
/// <para>
/// Whether highlights can be returned for the field.
/// </para>
/// </summary>
public bool HighlightEnabled
{
get { return this._highlightEnabled.GetValueOrDefault(); }
set { this._highlightEnabled = value; }
}
// Check to see if HighlightEnabled property is set
internal bool IsSetHighlightEnabled()
{
return this._highlightEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property ReturnEnabled.
/// <para>
/// Whether the contents of the field can be returned in the search results.
/// </para>
/// </summary>
public bool ReturnEnabled
{
get { return this._returnEnabled.GetValueOrDefault(); }
set { this._returnEnabled = value; }
}
// Check to see if ReturnEnabled property is set
internal bool IsSetReturnEnabled()
{
return this._returnEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SortEnabled.
/// <para>
/// Whether the field can be used to sort the search results.
/// </para>
/// </summary>
public bool SortEnabled
{
get { return this._sortEnabled.GetValueOrDefault(); }
set { this._sortEnabled = value; }
}
// Check to see if SortEnabled property is set
internal bool IsSetSortEnabled()
{
return this._sortEnabled.HasValue;
}
/// <summary>
/// Gets and sets the property SourceField.
/// </summary>
[AWSProperty(Min=1, Max=64)]
public string SourceField
{
get { return this._sourceField; }
set { this._sourceField = value; }
}
// Check to see if SourceField property is set
internal bool IsSetSourceField()
{
return this._sourceField != null;
}
}
} | 151 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Container for the parameters to the UpdateAvailabilityOptions operation.
/// Configures the availability options for a domain. Enabling the Multi-AZ option expands
/// an Amazon CloudSearch domain to an additional Availability Zone in the same Region
/// to increase fault tolerance in the event of a service disruption. Changes to the Multi-AZ
/// option can take about half an hour to become active. For more information, see <a
/// href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-availability-options.html"
/// target="_blank">Configuring Availability Options</a> in the <i>Amazon CloudSearch
/// Developer Guide</i>.
/// </summary>
public partial class UpdateAvailabilityOptionsRequest : AmazonCloudSearchRequest
{
private string _domainName;
private bool? _multiAZ;
/// <summary>
/// Gets and sets the property DomainName.
/// </summary>
[AWSProperty(Required=true, Min=3, Max=28)]
public string DomainName
{
get { return this._domainName; }
set { this._domainName = value; }
}
// Check to see if DomainName property is set
internal bool IsSetDomainName()
{
return this._domainName != null;
}
/// <summary>
/// Gets and sets the property MultiAZ.
/// <para>
/// You expand an existing search domain to a second Availability Zone by setting the
/// Multi-AZ option to true. Similarly, you can turn off the Multi-AZ option to downgrade
/// the domain to a single Availability Zone by setting the Multi-AZ option to <code>false</code>.
///
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public bool MultiAZ
{
get { return this._multiAZ.GetValueOrDefault(); }
set { this._multiAZ = value; }
}
// Check to see if MultiAZ property is set
internal bool IsSetMultiAZ()
{
return this._multiAZ.HasValue;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The result of a <code>UpdateAvailabilityOptions</code> request. Contains the status
/// of the domain's availability options.
/// </summary>
public partial class UpdateAvailabilityOptionsResponse : AmazonWebServiceResponse
{
private AvailabilityOptionsStatus _availabilityOptions;
/// <summary>
/// Gets and sets the property AvailabilityOptions.
/// <para>
/// The newly-configured availability options. Indicates whether Multi-AZ is enabled for
/// the domain.
/// </para>
/// </summary>
public AvailabilityOptionsStatus AvailabilityOptions
{
get { return this._availabilityOptions; }
set { this._availabilityOptions = value; }
}
// Check to see if AvailabilityOptions property is set
internal bool IsSetAvailabilityOptions()
{
return this._availabilityOptions != null;
}
}
} | 59 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Container for the parameters to the UpdateDomainEndpointOptions operation.
/// Updates the domain's endpoint options, specifically whether all requests to the domain
/// must arrive over HTTPS. For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-domain-endpoint-options.html"
/// target="_blank">Configuring Domain Endpoint Options</a> in the <i>Amazon CloudSearch
/// Developer Guide</i>.
/// </summary>
public partial class UpdateDomainEndpointOptionsRequest : AmazonCloudSearchRequest
{
private DomainEndpointOptions _domainEndpointOptions;
private string _domainName;
/// <summary>
/// Gets and sets the property DomainEndpointOptions.
/// <para>
/// Whether to require that all requests to the domain arrive over HTTPS. We recommend
/// Policy-Min-TLS-1-2-2019-07 for TLSSecurityPolicy. For compatibility with older clients,
/// the default is Policy-Min-TLS-1-0-2019-07.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public DomainEndpointOptions DomainEndpointOptions
{
get { return this._domainEndpointOptions; }
set { this._domainEndpointOptions = value; }
}
// Check to see if DomainEndpointOptions property is set
internal bool IsSetDomainEndpointOptions()
{
return this._domainEndpointOptions != null;
}
/// <summary>
/// Gets and sets the property DomainName.
/// <para>
/// A string that represents the name of a domain.
/// </para>
/// </summary>
[AWSProperty(Required=true, Min=3, Max=28)]
public string DomainName
{
get { return this._domainName; }
set { this._domainName = value; }
}
// Check to see if DomainName property is set
internal bool IsSetDomainName()
{
return this._domainName != null;
}
}
} | 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The result of a <code>UpdateDomainEndpointOptions</code> request. Contains the configuration
/// and status of the domain's endpoint options.
/// </summary>
public partial class UpdateDomainEndpointOptionsResponse : AmazonWebServiceResponse
{
private DomainEndpointOptionsStatus _domainEndpointOptions;
/// <summary>
/// Gets and sets the property DomainEndpointOptions.
/// <para>
/// The newly-configured domain endpoint options.
/// </para>
/// </summary>
public DomainEndpointOptionsStatus DomainEndpointOptions
{
get { return this._domainEndpointOptions; }
set { this._domainEndpointOptions = value; }
}
// Check to see if DomainEndpointOptions property is set
internal bool IsSetDomainEndpointOptions()
{
return this._domainEndpointOptions != 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Container for the parameters to the UpdateScalingParameters operation.
/// Configures scaling parameters for a domain. A domain's scaling parameters specify
/// the desired search instance type and replication count. Amazon CloudSearch will still
/// automatically scale your domain based on the volume of data and traffic, but not below
/// the desired instance type and replication count. If the Multi-AZ option is enabled,
/// these values control the resources used per Availability Zone. For more information,
/// see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-scaling-options.html"
/// target="_blank">Configuring Scaling Options</a> in the <i>Amazon CloudSearch Developer
/// Guide</i>.
/// </summary>
public partial class UpdateScalingParametersRequest : AmazonCloudSearchRequest
{
private string _domainName;
private ScalingParameters _scalingParameters;
/// <summary>
/// Gets and sets the property DomainName.
/// </summary>
[AWSProperty(Required=true, Min=3, Max=28)]
public string DomainName
{
get { return this._domainName; }
set { this._domainName = value; }
}
// Check to see if DomainName property is set
internal bool IsSetDomainName()
{
return this._domainName != null;
}
/// <summary>
/// Gets and sets the property ScalingParameters.
/// </summary>
[AWSProperty(Required=true)]
public ScalingParameters ScalingParameters
{
get { return this._scalingParameters; }
set { this._scalingParameters = value; }
}
// Check to see if ScalingParameters property is set
internal bool IsSetScalingParameters()
{
return this._scalingParameters != null;
}
}
} | 80 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The result of a <code>UpdateScalingParameters</code> request. Contains the status
/// of the newly-configured scaling parameters.
/// </summary>
public partial class UpdateScalingParametersResponse : AmazonWebServiceResponse
{
private ScalingParametersStatus _scalingParameters;
/// <summary>
/// Gets and sets the property ScalingParameters.
/// </summary>
[AWSProperty(Required=true)]
public ScalingParametersStatus ScalingParameters
{
get { return this._scalingParameters; }
set { this._scalingParameters = value; }
}
// Check to see if ScalingParameters property is set
internal bool IsSetScalingParameters()
{
return this._scalingParameters != null;
}
}
} | 56 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// Container for the parameters to the UpdateServiceAccessPolicies operation.
/// Configures the access rules that control access to the domain's document and search
/// endpoints. For more information, see <a href="http://docs.aws.amazon.com/cloudsearch/latest/developerguide/configuring-access.html"
/// target="_blank"> Configuring Access for an Amazon CloudSearch Domain</a>.
/// </summary>
public partial class UpdateServiceAccessPoliciesRequest : AmazonCloudSearchRequest
{
private string _accessPolicies;
private string _domainName;
/// <summary>
/// Gets and sets the property AccessPolicies.
/// <para>
/// The access rules you want to configure. These rules replace any existing rules.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string AccessPolicies
{
get { return this._accessPolicies; }
set { this._accessPolicies = value; }
}
// Check to see if AccessPolicies property is set
internal bool IsSetAccessPolicies()
{
return this._accessPolicies != null;
}
/// <summary>
/// Gets and sets the property DomainName.
/// </summary>
[AWSProperty(Required=true, Min=3, Max=28)]
public string DomainName
{
get { return this._domainName; }
set { this._domainName = value; }
}
// Check to see if DomainName property is set
internal bool IsSetDomainName()
{
return this._domainName != null;
}
}
} | 78 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The result of an <code>UpdateServiceAccessPolicies</code> request. Contains the new
/// access policies.
/// </summary>
public partial class UpdateServiceAccessPoliciesResponse : AmazonWebServiceResponse
{
private AccessPoliciesStatus _accessPolicies;
/// <summary>
/// Gets and sets the property AccessPolicies.
/// <para>
/// The access rules configured for the domain.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public AccessPoliciesStatus AccessPolicies
{
get { return this._accessPolicies; }
set { this._accessPolicies = value; }
}
// Check to see if AccessPolicies property is set
internal bool IsSetAccessPolicies()
{
return this._accessPolicies != null;
}
}
} | 59 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.CloudSearch.Model
{
/// <summary>
/// The request was rejected because it has invalid parameters.
/// </summary>
#if !NETSTANDARD
[Serializable]
#endif
public partial class ValidationException : AmazonCloudSearchException
{
/// <summary>
/// Constructs a new ValidationException with the specified error
/// message.
/// </summary>
/// <param name="message">
/// Describes the error encountered.
/// </param>
public ValidationException(string message)
: base(message) {}
/// <summary>
/// Construct instance of ValidationException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
public ValidationException(string message, Exception innerException)
: base(message, innerException) {}
/// <summary>
/// Construct instance of ValidationException
/// </summary>
/// <param name="innerException"></param>
public ValidationException(Exception innerException)
: base(innerException) {}
/// <summary>
/// Construct instance of ValidationException
/// </summary>
/// <param name="message"></param>
/// <param name="innerException"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ValidationException(string message, Exception innerException, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, innerException, errorType, errorCode, requestId, statusCode) {}
/// <summary>
/// Construct instance of ValidationException
/// </summary>
/// <param name="message"></param>
/// <param name="errorType"></param>
/// <param name="errorCode"></param>
/// <param name="requestId"></param>
/// <param name="statusCode"></param>
public ValidationException(string message, ErrorType errorType, string errorCode, string requestId, HttpStatusCode statusCode)
: base(message, errorType, errorCode, requestId, statusCode) {}
#if !NETSTANDARD
/// <summary>
/// Constructs a new instance of the ValidationException class with serialized data.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception>
/// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception>
protected ValidationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
}
/// <summary>
/// Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is a null reference (Nothing in Visual Basic). </exception>
#if BCL35
[System.Security.Permissions.SecurityPermission(
System.Security.Permissions.SecurityAction.LinkDemand,
Flags = System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)]
#endif
[System.Security.SecurityCritical]
// These FxCop rules are giving false-positives for this method
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2123:OverrideLinkDemandsShouldBeIdenticalToBase")]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2134:MethodsMustOverrideWithConsistentTransparencyFxCopRule")]
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
{
base.GetObjectData(info, context);
}
#endif
}
} | 124 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AccessPoliciesStatus Object
/// </summary>
public class AccessPoliciesStatusUnmarshaller : IUnmarshaller<AccessPoliciesStatus, XmlUnmarshallerContext>, IUnmarshaller<AccessPoliciesStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AccessPoliciesStatus Unmarshall(XmlUnmarshallerContext context)
{
AccessPoliciesStatus unmarshalledObject = new AccessPoliciesStatus();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Options", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Options = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = OptionStatusUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AccessPoliciesStatus Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static AccessPoliciesStatusUnmarshaller _instance = new AccessPoliciesStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AccessPoliciesStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AnalysisOptions Object
/// </summary>
public class AnalysisOptionsUnmarshaller : IUnmarshaller<AnalysisOptions, XmlUnmarshallerContext>, IUnmarshaller<AnalysisOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AnalysisOptions Unmarshall(XmlUnmarshallerContext context)
{
AnalysisOptions unmarshalledObject = new AnalysisOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("AlgorithmicStemming", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AlgorithmicStemming = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("JapaneseTokenizationDictionary", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.JapaneseTokenizationDictionary = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("StemmingDictionary", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.StemmingDictionary = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Stopwords", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Stopwords = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Synonyms", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Synonyms = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AnalysisOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static AnalysisOptionsUnmarshaller _instance = new AnalysisOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AnalysisOptionsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 121 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AnalysisSchemeStatus Object
/// </summary>
public class AnalysisSchemeStatusUnmarshaller : IUnmarshaller<AnalysisSchemeStatus, XmlUnmarshallerContext>, IUnmarshaller<AnalysisSchemeStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AnalysisSchemeStatus Unmarshall(XmlUnmarshallerContext context)
{
AnalysisSchemeStatus unmarshalledObject = new AnalysisSchemeStatus();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Options", targetDepth))
{
var unmarshaller = AnalysisSchemeUnmarshaller.Instance;
unmarshalledObject.Options = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = OptionStatusUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AnalysisSchemeStatus Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static AnalysisSchemeStatusUnmarshaller _instance = new AnalysisSchemeStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AnalysisSchemeStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AnalysisScheme Object
/// </summary>
public class AnalysisSchemeUnmarshaller : IUnmarshaller<AnalysisScheme, XmlUnmarshallerContext>, IUnmarshaller<AnalysisScheme, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AnalysisScheme Unmarshall(XmlUnmarshallerContext context)
{
AnalysisScheme unmarshalledObject = new AnalysisScheme();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("AnalysisOptions", targetDepth))
{
var unmarshaller = AnalysisOptionsUnmarshaller.Instance;
unmarshalledObject.AnalysisOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("AnalysisSchemeLanguage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AnalysisSchemeLanguage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("AnalysisSchemeName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AnalysisSchemeName = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AnalysisScheme Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static AnalysisSchemeUnmarshaller _instance = new AnalysisSchemeUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AnalysisSchemeUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 109 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for AvailabilityOptionsStatus Object
/// </summary>
public class AvailabilityOptionsStatusUnmarshaller : IUnmarshaller<AvailabilityOptionsStatus, XmlUnmarshallerContext>, IUnmarshaller<AvailabilityOptionsStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AvailabilityOptionsStatus Unmarshall(XmlUnmarshallerContext context)
{
AvailabilityOptionsStatus unmarshalledObject = new AvailabilityOptionsStatus();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Options", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Options = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = OptionStatusUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public AvailabilityOptionsStatus Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static AvailabilityOptionsStatusUnmarshaller _instance = new AvailabilityOptionsStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static AvailabilityOptionsStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BaseException operation
/// </summary>
public class BaseExceptionUnmarshaller : IErrorResponseUnmarshaller<BaseException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BaseException Unmarshall(XmlUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public BaseException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
BaseException response = new BaseException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Code", targetDepth))
{
response.Code = StringUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static BaseExceptionUnmarshaller _instance = new BaseExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BaseExceptionUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// BuildSuggesters Request Marshaller
/// </summary>
public class BuildSuggestersRequestMarshaller : IMarshaller<IRequest, BuildSuggestersRequest> , 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((BuildSuggestersRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(BuildSuggestersRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "BuildSuggesters");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static BuildSuggestersRequestMarshaller _instance = new BuildSuggestersRequestMarshaller();
internal static BuildSuggestersRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BuildSuggestersRequestMarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BuildSuggesters operation
/// </summary>
public class BuildSuggestersResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
BuildSuggestersResponse response = new BuildSuggestersResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("BuildSuggestersResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, BuildSuggestersResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("FieldNames/member", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.FieldNames.Add(item);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static BuildSuggestersResponseUnmarshaller _instance = new BuildSuggestersResponseUnmarshaller();
internal static BuildSuggestersResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static BuildSuggestersResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 154 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateDomain Request Marshaller
/// </summary>
public class CreateDomainRequestMarshaller : IMarshaller<IRequest, CreateDomainRequest> , 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((CreateDomainRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateDomainRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "CreateDomain");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static CreateDomainRequestMarshaller _instance = new CreateDomainRequestMarshaller();
internal static CreateDomainRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateDomainRequestMarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateDomain operation
/// </summary>
public class CreateDomainResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
CreateDomainResponse response = new CreateDomainResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("CreateDomainResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, CreateDomainResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DomainStatus", targetDepth))
{
var unmarshaller = DomainStatusUnmarshaller.Instance;
response.DomainStatus = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceAlreadyExists"))
{
return ResourceAlreadyExistsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static CreateDomainResponseUnmarshaller _instance = new CreateDomainResponseUnmarshaller();
internal static CreateDomainResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateDomainResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 157 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DateArrayOptions Object
/// </summary>
public class DateArrayOptionsUnmarshaller : IUnmarshaller<DateArrayOptions, XmlUnmarshallerContext>, IUnmarshaller<DateArrayOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DateArrayOptions Unmarshall(XmlUnmarshallerContext context)
{
DateArrayOptions unmarshalledObject = new DateArrayOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DefaultValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FacetEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.FacetEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ReturnEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReturnEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SearchEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SourceFields", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceFields = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DateArrayOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DateArrayOptionsUnmarshaller _instance = new DateArrayOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DateArrayOptionsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 121 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DateOptions Object
/// </summary>
public class DateOptionsUnmarshaller : IUnmarshaller<DateOptions, XmlUnmarshallerContext>, IUnmarshaller<DateOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DateOptions Unmarshall(XmlUnmarshallerContext context)
{
DateOptions unmarshalledObject = new DateOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DefaultValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FacetEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.FacetEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ReturnEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReturnEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SearchEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SortEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SortEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SourceField", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceField = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DateOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DateOptionsUnmarshaller _instance = new DateOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DateOptionsUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DefineAnalysisScheme Request Marshaller
/// </summary>
public class DefineAnalysisSchemeRequestMarshaller : IMarshaller<IRequest, DefineAnalysisSchemeRequest> , 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((DefineAnalysisSchemeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DefineAnalysisSchemeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DefineAnalysisScheme");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAnalysisScheme())
{
if(publicRequest.AnalysisScheme.IsSetAnalysisOptions())
{
if(publicRequest.AnalysisScheme.AnalysisOptions.IsSetAlgorithmicStemming())
{
request.Parameters.Add("AnalysisScheme" + "." + "AnalysisOptions" + "." + "AlgorithmicStemming", StringUtils.FromString(publicRequest.AnalysisScheme.AnalysisOptions.AlgorithmicStemming));
}
if(publicRequest.AnalysisScheme.AnalysisOptions.IsSetJapaneseTokenizationDictionary())
{
request.Parameters.Add("AnalysisScheme" + "." + "AnalysisOptions" + "." + "JapaneseTokenizationDictionary", StringUtils.FromString(publicRequest.AnalysisScheme.AnalysisOptions.JapaneseTokenizationDictionary));
}
if(publicRequest.AnalysisScheme.AnalysisOptions.IsSetStemmingDictionary())
{
request.Parameters.Add("AnalysisScheme" + "." + "AnalysisOptions" + "." + "StemmingDictionary", StringUtils.FromString(publicRequest.AnalysisScheme.AnalysisOptions.StemmingDictionary));
}
if(publicRequest.AnalysisScheme.AnalysisOptions.IsSetStopwords())
{
request.Parameters.Add("AnalysisScheme" + "." + "AnalysisOptions" + "." + "Stopwords", StringUtils.FromString(publicRequest.AnalysisScheme.AnalysisOptions.Stopwords));
}
if(publicRequest.AnalysisScheme.AnalysisOptions.IsSetSynonyms())
{
request.Parameters.Add("AnalysisScheme" + "." + "AnalysisOptions" + "." + "Synonyms", StringUtils.FromString(publicRequest.AnalysisScheme.AnalysisOptions.Synonyms));
}
}
if(publicRequest.AnalysisScheme.IsSetAnalysisSchemeLanguage())
{
request.Parameters.Add("AnalysisScheme" + "." + "AnalysisSchemeLanguage", StringUtils.FromString(publicRequest.AnalysisScheme.AnalysisSchemeLanguage));
}
if(publicRequest.AnalysisScheme.IsSetAnalysisSchemeName())
{
request.Parameters.Add("AnalysisScheme" + "." + "AnalysisSchemeName", StringUtils.FromString(publicRequest.AnalysisScheme.AnalysisSchemeName));
}
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DefineAnalysisSchemeRequestMarshaller _instance = new DefineAnalysisSchemeRequestMarshaller();
internal static DefineAnalysisSchemeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineAnalysisSchemeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 121 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DefineAnalysisScheme operation
/// </summary>
public class DefineAnalysisSchemeResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DefineAnalysisSchemeResponse response = new DefineAnalysisSchemeResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DefineAnalysisSchemeResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DefineAnalysisSchemeResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("AnalysisScheme", targetDepth))
{
var unmarshaller = AnalysisSchemeStatusUnmarshaller.Instance;
response.AnalysisScheme = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DefineAnalysisSchemeResponseUnmarshaller _instance = new DefineAnalysisSchemeResponseUnmarshaller();
internal static DefineAnalysisSchemeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineAnalysisSchemeResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 161 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DefineExpression Request Marshaller
/// </summary>
public class DefineExpressionRequestMarshaller : IMarshaller<IRequest, DefineExpressionRequest> , 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((DefineExpressionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DefineExpressionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DefineExpression");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetExpression())
{
if(publicRequest.Expression.IsSetExpressionName())
{
request.Parameters.Add("Expression" + "." + "ExpressionName", StringUtils.FromString(publicRequest.Expression.ExpressionName));
}
if(publicRequest.Expression.IsSetExpressionValue())
{
request.Parameters.Add("Expression" + "." + "ExpressionValue", StringUtils.FromString(publicRequest.Expression.ExpressionValue));
}
}
}
return request;
}
private static DefineExpressionRequestMarshaller _instance = new DefineExpressionRequestMarshaller();
internal static DefineExpressionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineExpressionRequestMarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DefineExpression operation
/// </summary>
public class DefineExpressionResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DefineExpressionResponse response = new DefineExpressionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DefineExpressionResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DefineExpressionResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Expression", targetDepth))
{
var unmarshaller = ExpressionStatusUnmarshaller.Instance;
response.Expression = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DefineExpressionResponseUnmarshaller _instance = new DefineExpressionResponseUnmarshaller();
internal static DefineExpressionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineExpressionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 161 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DefineIndexField Request Marshaller
/// </summary>
public class DefineIndexFieldRequestMarshaller : IMarshaller<IRequest, DefineIndexFieldRequest> , 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((DefineIndexFieldRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DefineIndexFieldRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DefineIndexField");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetIndexField())
{
if(publicRequest.IndexField.IsSetDateArrayOptions())
{
if(publicRequest.IndexField.DateArrayOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "DateArrayOptions" + "." + "DefaultValue", StringUtils.FromString(publicRequest.IndexField.DateArrayOptions.DefaultValue));
}
if(publicRequest.IndexField.DateArrayOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "DateArrayOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.DateArrayOptions.FacetEnabled));
}
if(publicRequest.IndexField.DateArrayOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "DateArrayOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.DateArrayOptions.ReturnEnabled));
}
if(publicRequest.IndexField.DateArrayOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "DateArrayOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.DateArrayOptions.SearchEnabled));
}
if(publicRequest.IndexField.DateArrayOptions.IsSetSourceFields())
{
request.Parameters.Add("IndexField" + "." + "DateArrayOptions" + "." + "SourceFields", StringUtils.FromString(publicRequest.IndexField.DateArrayOptions.SourceFields));
}
}
if(publicRequest.IndexField.IsSetDateOptions())
{
if(publicRequest.IndexField.DateOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "DateOptions" + "." + "DefaultValue", StringUtils.FromString(publicRequest.IndexField.DateOptions.DefaultValue));
}
if(publicRequest.IndexField.DateOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "DateOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.DateOptions.FacetEnabled));
}
if(publicRequest.IndexField.DateOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "DateOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.DateOptions.ReturnEnabled));
}
if(publicRequest.IndexField.DateOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "DateOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.DateOptions.SearchEnabled));
}
if(publicRequest.IndexField.DateOptions.IsSetSortEnabled())
{
request.Parameters.Add("IndexField" + "." + "DateOptions" + "." + "SortEnabled", StringUtils.FromBool(publicRequest.IndexField.DateOptions.SortEnabled));
}
if(publicRequest.IndexField.DateOptions.IsSetSourceField())
{
request.Parameters.Add("IndexField" + "." + "DateOptions" + "." + "SourceField", StringUtils.FromString(publicRequest.IndexField.DateOptions.SourceField));
}
}
if(publicRequest.IndexField.IsSetDoubleArrayOptions())
{
if(publicRequest.IndexField.DoubleArrayOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "DoubleArrayOptions" + "." + "DefaultValue", StringUtils.FromDouble(publicRequest.IndexField.DoubleArrayOptions.DefaultValue));
}
if(publicRequest.IndexField.DoubleArrayOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "DoubleArrayOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.DoubleArrayOptions.FacetEnabled));
}
if(publicRequest.IndexField.DoubleArrayOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "DoubleArrayOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.DoubleArrayOptions.ReturnEnabled));
}
if(publicRequest.IndexField.DoubleArrayOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "DoubleArrayOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.DoubleArrayOptions.SearchEnabled));
}
if(publicRequest.IndexField.DoubleArrayOptions.IsSetSourceFields())
{
request.Parameters.Add("IndexField" + "." + "DoubleArrayOptions" + "." + "SourceFields", StringUtils.FromString(publicRequest.IndexField.DoubleArrayOptions.SourceFields));
}
}
if(publicRequest.IndexField.IsSetDoubleOptions())
{
if(publicRequest.IndexField.DoubleOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "DoubleOptions" + "." + "DefaultValue", StringUtils.FromDouble(publicRequest.IndexField.DoubleOptions.DefaultValue));
}
if(publicRequest.IndexField.DoubleOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "DoubleOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.DoubleOptions.FacetEnabled));
}
if(publicRequest.IndexField.DoubleOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "DoubleOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.DoubleOptions.ReturnEnabled));
}
if(publicRequest.IndexField.DoubleOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "DoubleOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.DoubleOptions.SearchEnabled));
}
if(publicRequest.IndexField.DoubleOptions.IsSetSortEnabled())
{
request.Parameters.Add("IndexField" + "." + "DoubleOptions" + "." + "SortEnabled", StringUtils.FromBool(publicRequest.IndexField.DoubleOptions.SortEnabled));
}
if(publicRequest.IndexField.DoubleOptions.IsSetSourceField())
{
request.Parameters.Add("IndexField" + "." + "DoubleOptions" + "." + "SourceField", StringUtils.FromString(publicRequest.IndexField.DoubleOptions.SourceField));
}
}
if(publicRequest.IndexField.IsSetIndexFieldName())
{
request.Parameters.Add("IndexField" + "." + "IndexFieldName", StringUtils.FromString(publicRequest.IndexField.IndexFieldName));
}
if(publicRequest.IndexField.IsSetIndexFieldType())
{
request.Parameters.Add("IndexField" + "." + "IndexFieldType", StringUtils.FromString(publicRequest.IndexField.IndexFieldType));
}
if(publicRequest.IndexField.IsSetIntArrayOptions())
{
if(publicRequest.IndexField.IntArrayOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "IntArrayOptions" + "." + "DefaultValue", StringUtils.FromLong(publicRequest.IndexField.IntArrayOptions.DefaultValue));
}
if(publicRequest.IndexField.IntArrayOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "IntArrayOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.IntArrayOptions.FacetEnabled));
}
if(publicRequest.IndexField.IntArrayOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "IntArrayOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.IntArrayOptions.ReturnEnabled));
}
if(publicRequest.IndexField.IntArrayOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "IntArrayOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.IntArrayOptions.SearchEnabled));
}
if(publicRequest.IndexField.IntArrayOptions.IsSetSourceFields())
{
request.Parameters.Add("IndexField" + "." + "IntArrayOptions" + "." + "SourceFields", StringUtils.FromString(publicRequest.IndexField.IntArrayOptions.SourceFields));
}
}
if(publicRequest.IndexField.IsSetIntOptions())
{
if(publicRequest.IndexField.IntOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "IntOptions" + "." + "DefaultValue", StringUtils.FromLong(publicRequest.IndexField.IntOptions.DefaultValue));
}
if(publicRequest.IndexField.IntOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "IntOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.IntOptions.FacetEnabled));
}
if(publicRequest.IndexField.IntOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "IntOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.IntOptions.ReturnEnabled));
}
if(publicRequest.IndexField.IntOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "IntOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.IntOptions.SearchEnabled));
}
if(publicRequest.IndexField.IntOptions.IsSetSortEnabled())
{
request.Parameters.Add("IndexField" + "." + "IntOptions" + "." + "SortEnabled", StringUtils.FromBool(publicRequest.IndexField.IntOptions.SortEnabled));
}
if(publicRequest.IndexField.IntOptions.IsSetSourceField())
{
request.Parameters.Add("IndexField" + "." + "IntOptions" + "." + "SourceField", StringUtils.FromString(publicRequest.IndexField.IntOptions.SourceField));
}
}
if(publicRequest.IndexField.IsSetLatLonOptions())
{
if(publicRequest.IndexField.LatLonOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "LatLonOptions" + "." + "DefaultValue", StringUtils.FromString(publicRequest.IndexField.LatLonOptions.DefaultValue));
}
if(publicRequest.IndexField.LatLonOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "LatLonOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.LatLonOptions.FacetEnabled));
}
if(publicRequest.IndexField.LatLonOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "LatLonOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.LatLonOptions.ReturnEnabled));
}
if(publicRequest.IndexField.LatLonOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "LatLonOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.LatLonOptions.SearchEnabled));
}
if(publicRequest.IndexField.LatLonOptions.IsSetSortEnabled())
{
request.Parameters.Add("IndexField" + "." + "LatLonOptions" + "." + "SortEnabled", StringUtils.FromBool(publicRequest.IndexField.LatLonOptions.SortEnabled));
}
if(publicRequest.IndexField.LatLonOptions.IsSetSourceField())
{
request.Parameters.Add("IndexField" + "." + "LatLonOptions" + "." + "SourceField", StringUtils.FromString(publicRequest.IndexField.LatLonOptions.SourceField));
}
}
if(publicRequest.IndexField.IsSetLiteralArrayOptions())
{
if(publicRequest.IndexField.LiteralArrayOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "LiteralArrayOptions" + "." + "DefaultValue", StringUtils.FromString(publicRequest.IndexField.LiteralArrayOptions.DefaultValue));
}
if(publicRequest.IndexField.LiteralArrayOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "LiteralArrayOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.LiteralArrayOptions.FacetEnabled));
}
if(publicRequest.IndexField.LiteralArrayOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "LiteralArrayOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.LiteralArrayOptions.ReturnEnabled));
}
if(publicRequest.IndexField.LiteralArrayOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "LiteralArrayOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.LiteralArrayOptions.SearchEnabled));
}
if(publicRequest.IndexField.LiteralArrayOptions.IsSetSourceFields())
{
request.Parameters.Add("IndexField" + "." + "LiteralArrayOptions" + "." + "SourceFields", StringUtils.FromString(publicRequest.IndexField.LiteralArrayOptions.SourceFields));
}
}
if(publicRequest.IndexField.IsSetLiteralOptions())
{
if(publicRequest.IndexField.LiteralOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "LiteralOptions" + "." + "DefaultValue", StringUtils.FromString(publicRequest.IndexField.LiteralOptions.DefaultValue));
}
if(publicRequest.IndexField.LiteralOptions.IsSetFacetEnabled())
{
request.Parameters.Add("IndexField" + "." + "LiteralOptions" + "." + "FacetEnabled", StringUtils.FromBool(publicRequest.IndexField.LiteralOptions.FacetEnabled));
}
if(publicRequest.IndexField.LiteralOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "LiteralOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.LiteralOptions.ReturnEnabled));
}
if(publicRequest.IndexField.LiteralOptions.IsSetSearchEnabled())
{
request.Parameters.Add("IndexField" + "." + "LiteralOptions" + "." + "SearchEnabled", StringUtils.FromBool(publicRequest.IndexField.LiteralOptions.SearchEnabled));
}
if(publicRequest.IndexField.LiteralOptions.IsSetSortEnabled())
{
request.Parameters.Add("IndexField" + "." + "LiteralOptions" + "." + "SortEnabled", StringUtils.FromBool(publicRequest.IndexField.LiteralOptions.SortEnabled));
}
if(publicRequest.IndexField.LiteralOptions.IsSetSourceField())
{
request.Parameters.Add("IndexField" + "." + "LiteralOptions" + "." + "SourceField", StringUtils.FromString(publicRequest.IndexField.LiteralOptions.SourceField));
}
}
if(publicRequest.IndexField.IsSetTextArrayOptions())
{
if(publicRequest.IndexField.TextArrayOptions.IsSetAnalysisScheme())
{
request.Parameters.Add("IndexField" + "." + "TextArrayOptions" + "." + "AnalysisScheme", StringUtils.FromString(publicRequest.IndexField.TextArrayOptions.AnalysisScheme));
}
if(publicRequest.IndexField.TextArrayOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "TextArrayOptions" + "." + "DefaultValue", StringUtils.FromString(publicRequest.IndexField.TextArrayOptions.DefaultValue));
}
if(publicRequest.IndexField.TextArrayOptions.IsSetHighlightEnabled())
{
request.Parameters.Add("IndexField" + "." + "TextArrayOptions" + "." + "HighlightEnabled", StringUtils.FromBool(publicRequest.IndexField.TextArrayOptions.HighlightEnabled));
}
if(publicRequest.IndexField.TextArrayOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "TextArrayOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.TextArrayOptions.ReturnEnabled));
}
if(publicRequest.IndexField.TextArrayOptions.IsSetSourceFields())
{
request.Parameters.Add("IndexField" + "." + "TextArrayOptions" + "." + "SourceFields", StringUtils.FromString(publicRequest.IndexField.TextArrayOptions.SourceFields));
}
}
if(publicRequest.IndexField.IsSetTextOptions())
{
if(publicRequest.IndexField.TextOptions.IsSetAnalysisScheme())
{
request.Parameters.Add("IndexField" + "." + "TextOptions" + "." + "AnalysisScheme", StringUtils.FromString(publicRequest.IndexField.TextOptions.AnalysisScheme));
}
if(publicRequest.IndexField.TextOptions.IsSetDefaultValue())
{
request.Parameters.Add("IndexField" + "." + "TextOptions" + "." + "DefaultValue", StringUtils.FromString(publicRequest.IndexField.TextOptions.DefaultValue));
}
if(publicRequest.IndexField.TextOptions.IsSetHighlightEnabled())
{
request.Parameters.Add("IndexField" + "." + "TextOptions" + "." + "HighlightEnabled", StringUtils.FromBool(publicRequest.IndexField.TextOptions.HighlightEnabled));
}
if(publicRequest.IndexField.TextOptions.IsSetReturnEnabled())
{
request.Parameters.Add("IndexField" + "." + "TextOptions" + "." + "ReturnEnabled", StringUtils.FromBool(publicRequest.IndexField.TextOptions.ReturnEnabled));
}
if(publicRequest.IndexField.TextOptions.IsSetSortEnabled())
{
request.Parameters.Add("IndexField" + "." + "TextOptions" + "." + "SortEnabled", StringUtils.FromBool(publicRequest.IndexField.TextOptions.SortEnabled));
}
if(publicRequest.IndexField.TextOptions.IsSetSourceField())
{
request.Parameters.Add("IndexField" + "." + "TextOptions" + "." + "SourceField", StringUtils.FromString(publicRequest.IndexField.TextOptions.SourceField));
}
}
}
}
return request;
}
private static DefineIndexFieldRequestMarshaller _instance = new DefineIndexFieldRequestMarshaller();
internal static DefineIndexFieldRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineIndexFieldRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 375 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DefineIndexField operation
/// </summary>
public class DefineIndexFieldResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DefineIndexFieldResponse response = new DefineIndexFieldResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DefineIndexFieldResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DefineIndexFieldResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("IndexField", targetDepth))
{
var unmarshaller = IndexFieldStatusUnmarshaller.Instance;
response.IndexField = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DefineIndexFieldResponseUnmarshaller _instance = new DefineIndexFieldResponseUnmarshaller();
internal static DefineIndexFieldResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineIndexFieldResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 161 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DefineSuggester Request Marshaller
/// </summary>
public class DefineSuggesterRequestMarshaller : IMarshaller<IRequest, DefineSuggesterRequest> , 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((DefineSuggesterRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DefineSuggesterRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DefineSuggester");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetSuggester())
{
if(publicRequest.Suggester.IsSetDocumentSuggesterOptions())
{
if(publicRequest.Suggester.DocumentSuggesterOptions.IsSetFuzzyMatching())
{
request.Parameters.Add("Suggester" + "." + "DocumentSuggesterOptions" + "." + "FuzzyMatching", StringUtils.FromString(publicRequest.Suggester.DocumentSuggesterOptions.FuzzyMatching));
}
if(publicRequest.Suggester.DocumentSuggesterOptions.IsSetSortExpression())
{
request.Parameters.Add("Suggester" + "." + "DocumentSuggesterOptions" + "." + "SortExpression", StringUtils.FromString(publicRequest.Suggester.DocumentSuggesterOptions.SortExpression));
}
if(publicRequest.Suggester.DocumentSuggesterOptions.IsSetSourceField())
{
request.Parameters.Add("Suggester" + "." + "DocumentSuggesterOptions" + "." + "SourceField", StringUtils.FromString(publicRequest.Suggester.DocumentSuggesterOptions.SourceField));
}
}
if(publicRequest.Suggester.IsSetSuggesterName())
{
request.Parameters.Add("Suggester" + "." + "SuggesterName", StringUtils.FromString(publicRequest.Suggester.SuggesterName));
}
}
}
return request;
}
private static DefineSuggesterRequestMarshaller _instance = new DefineSuggesterRequestMarshaller();
internal static DefineSuggesterRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineSuggesterRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 109 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DefineSuggester operation
/// </summary>
public class DefineSuggesterResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DefineSuggesterResponse response = new DefineSuggesterResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DefineSuggesterResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DefineSuggesterResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Suggester", targetDepth))
{
var unmarshaller = SuggesterStatusUnmarshaller.Instance;
response.Suggester = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DefineSuggesterResponseUnmarshaller _instance = new DefineSuggesterResponseUnmarshaller();
internal static DefineSuggesterResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DefineSuggesterResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 161 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteAnalysisScheme Request Marshaller
/// </summary>
public class DeleteAnalysisSchemeRequestMarshaller : IMarshaller<IRequest, DeleteAnalysisSchemeRequest> , 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((DeleteAnalysisSchemeRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteAnalysisSchemeRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DeleteAnalysisScheme");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAnalysisSchemeName())
{
request.Parameters.Add("AnalysisSchemeName", StringUtils.FromString(publicRequest.AnalysisSchemeName));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DeleteAnalysisSchemeRequestMarshaller _instance = new DeleteAnalysisSchemeRequestMarshaller();
internal static DeleteAnalysisSchemeRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteAnalysisSchemeRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 91 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteAnalysisScheme operation
/// </summary>
public class DeleteAnalysisSchemeResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DeleteAnalysisSchemeResponse response = new DeleteAnalysisSchemeResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DeleteAnalysisSchemeResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteAnalysisSchemeResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("AnalysisScheme", targetDepth))
{
var unmarshaller = AnalysisSchemeStatusUnmarshaller.Instance;
response.AnalysisScheme = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DeleteAnalysisSchemeResponseUnmarshaller _instance = new DeleteAnalysisSchemeResponseUnmarshaller();
internal static DeleteAnalysisSchemeResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteAnalysisSchemeResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 157 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteDomain Request Marshaller
/// </summary>
public class DeleteDomainRequestMarshaller : IMarshaller<IRequest, DeleteDomainRequest> , 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((DeleteDomainRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteDomainRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DeleteDomain");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DeleteDomainRequestMarshaller _instance = new DeleteDomainRequestMarshaller();
internal static DeleteDomainRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteDomainRequestMarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteDomain operation
/// </summary>
public class DeleteDomainResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DeleteDomainResponse response = new DeleteDomainResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DeleteDomainResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteDomainResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DomainStatus", targetDepth))
{
var unmarshaller = DomainStatusUnmarshaller.Instance;
response.DomainStatus = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DeleteDomainResponseUnmarshaller _instance = new DeleteDomainResponseUnmarshaller();
internal static DeleteDomainResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteDomainResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 145 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteExpression Request Marshaller
/// </summary>
public class DeleteExpressionRequestMarshaller : IMarshaller<IRequest, DeleteExpressionRequest> , 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((DeleteExpressionRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteExpressionRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DeleteExpression");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetExpressionName())
{
request.Parameters.Add("ExpressionName", StringUtils.FromString(publicRequest.ExpressionName));
}
}
return request;
}
private static DeleteExpressionRequestMarshaller _instance = new DeleteExpressionRequestMarshaller();
internal static DeleteExpressionRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteExpressionRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 91 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteExpression operation
/// </summary>
public class DeleteExpressionResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DeleteExpressionResponse response = new DeleteExpressionResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DeleteExpressionResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteExpressionResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Expression", targetDepth))
{
var unmarshaller = ExpressionStatusUnmarshaller.Instance;
response.Expression = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DeleteExpressionResponseUnmarshaller _instance = new DeleteExpressionResponseUnmarshaller();
internal static DeleteExpressionResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteExpressionResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 157 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteIndexField Request Marshaller
/// </summary>
public class DeleteIndexFieldRequestMarshaller : IMarshaller<IRequest, DeleteIndexFieldRequest> , 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((DeleteIndexFieldRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteIndexFieldRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DeleteIndexField");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetIndexFieldName())
{
request.Parameters.Add("IndexFieldName", StringUtils.FromString(publicRequest.IndexFieldName));
}
}
return request;
}
private static DeleteIndexFieldRequestMarshaller _instance = new DeleteIndexFieldRequestMarshaller();
internal static DeleteIndexFieldRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteIndexFieldRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 91 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteIndexField operation
/// </summary>
public class DeleteIndexFieldResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DeleteIndexFieldResponse response = new DeleteIndexFieldResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DeleteIndexFieldResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteIndexFieldResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("IndexField", targetDepth))
{
var unmarshaller = IndexFieldStatusUnmarshaller.Instance;
response.IndexField = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DeleteIndexFieldResponseUnmarshaller _instance = new DeleteIndexFieldResponseUnmarshaller();
internal static DeleteIndexFieldResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteIndexFieldResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 157 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteSuggester Request Marshaller
/// </summary>
public class DeleteSuggesterRequestMarshaller : IMarshaller<IRequest, DeleteSuggesterRequest> , 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((DeleteSuggesterRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteSuggesterRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DeleteSuggester");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetSuggesterName())
{
request.Parameters.Add("SuggesterName", StringUtils.FromString(publicRequest.SuggesterName));
}
}
return request;
}
private static DeleteSuggesterRequestMarshaller _instance = new DeleteSuggesterRequestMarshaller();
internal static DeleteSuggesterRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteSuggesterRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 91 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteSuggester operation
/// </summary>
public class DeleteSuggesterResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DeleteSuggesterResponse response = new DeleteSuggesterResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DeleteSuggesterResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DeleteSuggesterResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Suggester", targetDepth))
{
var unmarshaller = SuggesterStatusUnmarshaller.Instance;
response.Suggester = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DeleteSuggesterResponseUnmarshaller _instance = new DeleteSuggesterResponseUnmarshaller();
internal static DeleteSuggesterResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteSuggesterResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 157 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeAnalysisSchemes Request Marshaller
/// </summary>
public class DescribeAnalysisSchemesRequestMarshaller : IMarshaller<IRequest, DescribeAnalysisSchemesRequest> , 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((DescribeAnalysisSchemesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeAnalysisSchemesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeAnalysisSchemes");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetAnalysisSchemeNames())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.AnalysisSchemeNames)
{
request.Parameters.Add("AnalysisSchemeNames" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
if(publicRequest.IsSetDeployed())
{
request.Parameters.Add("Deployed", StringUtils.FromBool(publicRequest.Deployed));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DescribeAnalysisSchemesRequestMarshaller _instance = new DescribeAnalysisSchemesRequestMarshaller();
internal static DescribeAnalysisSchemesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeAnalysisSchemesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 100 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeAnalysisSchemes operation
/// </summary>
public class DescribeAnalysisSchemesResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeAnalysisSchemesResponse response = new DescribeAnalysisSchemesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeAnalysisSchemesResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeAnalysisSchemesResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("AnalysisSchemes/member", targetDepth))
{
var unmarshaller = AnalysisSchemeStatusUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.AnalysisSchemes.Add(item);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeAnalysisSchemesResponseUnmarshaller _instance = new DescribeAnalysisSchemesResponseUnmarshaller();
internal static DescribeAnalysisSchemesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeAnalysisSchemesResponseUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeAvailabilityOptions Request Marshaller
/// </summary>
public class DescribeAvailabilityOptionsRequestMarshaller : IMarshaller<IRequest, DescribeAvailabilityOptionsRequest> , 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((DescribeAvailabilityOptionsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeAvailabilityOptionsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeAvailabilityOptions");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDeployed())
{
request.Parameters.Add("Deployed", StringUtils.FromBool(publicRequest.Deployed));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DescribeAvailabilityOptionsRequestMarshaller _instance = new DescribeAvailabilityOptionsRequestMarshaller();
internal static DescribeAvailabilityOptionsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeAvailabilityOptionsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 91 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeAvailabilityOptions operation
/// </summary>
public class DescribeAvailabilityOptionsResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeAvailabilityOptionsResponse response = new DescribeAvailabilityOptionsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeAvailabilityOptionsResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeAvailabilityOptionsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("AvailabilityOptions", targetDepth))
{
var unmarshaller = AvailabilityOptionsStatusUnmarshaller.Instance;
response.AvailabilityOptions = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("DisabledAction"))
{
return DisabledOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InvalidType"))
{
return InvalidTypeExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeAvailabilityOptionsResponseUnmarshaller _instance = new DescribeAvailabilityOptionsResponseUnmarshaller();
internal static DescribeAvailabilityOptionsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeAvailabilityOptionsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 161 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeDomainEndpointOptions Request Marshaller
/// </summary>
public class DescribeDomainEndpointOptionsRequestMarshaller : IMarshaller<IRequest, DescribeDomainEndpointOptionsRequest> , 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((DescribeDomainEndpointOptionsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeDomainEndpointOptionsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeDomainEndpointOptions");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDeployed())
{
request.Parameters.Add("Deployed", StringUtils.FromBool(publicRequest.Deployed));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DescribeDomainEndpointOptionsRequestMarshaller _instance = new DescribeDomainEndpointOptionsRequestMarshaller();
internal static DescribeDomainEndpointOptionsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeDomainEndpointOptionsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 91 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeDomainEndpointOptions operation
/// </summary>
public class DescribeDomainEndpointOptionsResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeDomainEndpointOptionsResponse response = new DescribeDomainEndpointOptionsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeDomainEndpointOptionsResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeDomainEndpointOptionsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DomainEndpointOptions", targetDepth))
{
var unmarshaller = DomainEndpointOptionsStatusUnmarshaller.Instance;
response.DomainEndpointOptions = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("DisabledAction"))
{
return DisabledOperationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("LimitExceeded"))
{
return LimitExceededExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeDomainEndpointOptionsResponseUnmarshaller _instance = new DescribeDomainEndpointOptionsResponseUnmarshaller();
internal static DescribeDomainEndpointOptionsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeDomainEndpointOptionsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 157 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeDomains Request Marshaller
/// </summary>
public class DescribeDomainsRequestMarshaller : IMarshaller<IRequest, DescribeDomainsRequest> , 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((DescribeDomainsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeDomainsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeDomains");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainNames())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.DomainNames)
{
request.Parameters.Add("DomainNames" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
}
return request;
}
private static DescribeDomainsRequestMarshaller _instance = new DescribeDomainsRequestMarshaller();
internal static DescribeDomainsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeDomainsRequestMarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeDomains operation
/// </summary>
public class DescribeDomainsResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeDomainsResponse response = new DescribeDomainsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeDomainsResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeDomainsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DomainStatusList/member", targetDepth))
{
var unmarshaller = DomainStatusUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.DomainStatusList.Add(item);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeDomainsResponseUnmarshaller _instance = new DescribeDomainsResponseUnmarshaller();
internal static DescribeDomainsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeDomainsResponseUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeExpressions Request Marshaller
/// </summary>
public class DescribeExpressionsRequestMarshaller : IMarshaller<IRequest, DescribeExpressionsRequest> , 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((DescribeExpressionsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeExpressionsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeExpressions");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDeployed())
{
request.Parameters.Add("Deployed", StringUtils.FromBool(publicRequest.Deployed));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetExpressionNames())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.ExpressionNames)
{
request.Parameters.Add("ExpressionNames" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
}
return request;
}
private static DescribeExpressionsRequestMarshaller _instance = new DescribeExpressionsRequestMarshaller();
internal static DescribeExpressionsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeExpressionsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 100 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeExpressions operation
/// </summary>
public class DescribeExpressionsResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeExpressionsResponse response = new DescribeExpressionsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeExpressionsResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeExpressionsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Expressions/member", targetDepth))
{
var unmarshaller = ExpressionStatusUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.Expressions.Add(item);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeExpressionsResponseUnmarshaller _instance = new DescribeExpressionsResponseUnmarshaller();
internal static DescribeExpressionsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeExpressionsResponseUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeIndexFields Request Marshaller
/// </summary>
public class DescribeIndexFieldsRequestMarshaller : IMarshaller<IRequest, DescribeIndexFieldsRequest> , 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((DescribeIndexFieldsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeIndexFieldsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeIndexFields");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDeployed())
{
request.Parameters.Add("Deployed", StringUtils.FromBool(publicRequest.Deployed));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetFieldNames())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.FieldNames)
{
request.Parameters.Add("FieldNames" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
}
return request;
}
private static DescribeIndexFieldsRequestMarshaller _instance = new DescribeIndexFieldsRequestMarshaller();
internal static DescribeIndexFieldsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeIndexFieldsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 100 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeIndexFields operation
/// </summary>
public class DescribeIndexFieldsResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeIndexFieldsResponse response = new DescribeIndexFieldsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeIndexFieldsResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeIndexFieldsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("IndexFields/member", targetDepth))
{
var unmarshaller = IndexFieldStatusUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.IndexFields.Add(item);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeIndexFieldsResponseUnmarshaller _instance = new DescribeIndexFieldsResponseUnmarshaller();
internal static DescribeIndexFieldsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeIndexFieldsResponseUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeScalingParameters Request Marshaller
/// </summary>
public class DescribeScalingParametersRequestMarshaller : IMarshaller<IRequest, DescribeScalingParametersRequest> , 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((DescribeScalingParametersRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeScalingParametersRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeScalingParameters");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DescribeScalingParametersRequestMarshaller _instance = new DescribeScalingParametersRequestMarshaller();
internal static DescribeScalingParametersRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeScalingParametersRequestMarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeScalingParameters operation
/// </summary>
public class DescribeScalingParametersResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeScalingParametersResponse response = new DescribeScalingParametersResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeScalingParametersResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeScalingParametersResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("ScalingParameters", targetDepth))
{
var unmarshaller = ScalingParametersStatusUnmarshaller.Instance;
response.ScalingParameters = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeScalingParametersResponseUnmarshaller _instance = new DescribeScalingParametersResponseUnmarshaller();
internal static DescribeScalingParametersResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeScalingParametersResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 149 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeServiceAccessPolicies Request Marshaller
/// </summary>
public class DescribeServiceAccessPoliciesRequestMarshaller : IMarshaller<IRequest, DescribeServiceAccessPoliciesRequest> , 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((DescribeServiceAccessPoliciesRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeServiceAccessPoliciesRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeServiceAccessPolicies");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDeployed())
{
request.Parameters.Add("Deployed", StringUtils.FromBool(publicRequest.Deployed));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static DescribeServiceAccessPoliciesRequestMarshaller _instance = new DescribeServiceAccessPoliciesRequestMarshaller();
internal static DescribeServiceAccessPoliciesRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeServiceAccessPoliciesRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 91 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeServiceAccessPolicies operation
/// </summary>
public class DescribeServiceAccessPoliciesResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeServiceAccessPoliciesResponse response = new DescribeServiceAccessPoliciesResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeServiceAccessPoliciesResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeServiceAccessPoliciesResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("AccessPolicies", targetDepth))
{
var unmarshaller = AccessPoliciesStatusUnmarshaller.Instance;
response.AccessPolicies = unmarshaller.Unmarshall(context);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeServiceAccessPoliciesResponseUnmarshaller _instance = new DescribeServiceAccessPoliciesResponseUnmarshaller();
internal static DescribeServiceAccessPoliciesResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeServiceAccessPoliciesResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 149 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// DescribeSuggesters Request Marshaller
/// </summary>
public class DescribeSuggestersRequestMarshaller : IMarshaller<IRequest, DescribeSuggestersRequest> , 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((DescribeSuggestersRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DescribeSuggestersRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "DescribeSuggesters");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDeployed())
{
request.Parameters.Add("Deployed", StringUtils.FromBool(publicRequest.Deployed));
}
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
if(publicRequest.IsSetSuggesterNames())
{
int publicRequestlistValueIndex = 1;
foreach(var publicRequestlistValue in publicRequest.SuggesterNames)
{
request.Parameters.Add("SuggesterNames" + "." + "member" + "." + publicRequestlistValueIndex, StringUtils.FromString(publicRequestlistValue));
publicRequestlistValueIndex++;
}
}
}
return request;
}
private static DescribeSuggestersRequestMarshaller _instance = new DescribeSuggestersRequestMarshaller();
internal static DescribeSuggestersRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeSuggestersRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 100 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DescribeSuggesters operation
/// </summary>
public class DescribeSuggestersResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
DescribeSuggestersResponse response = new DescribeSuggestersResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("DescribeSuggestersResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeSuggestersResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Suggesters/member", targetDepth))
{
var unmarshaller = SuggesterStatusUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.Suggesters.Add(item);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static DescribeSuggestersResponseUnmarshaller _instance = new DescribeSuggestersResponseUnmarshaller();
internal static DescribeSuggestersResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DescribeSuggestersResponseUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DisabledOperationException operation
/// </summary>
public class DisabledOperationExceptionUnmarshaller : IErrorResponseUnmarshaller<DisabledOperationException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DisabledOperationException Unmarshall(XmlUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public DisabledOperationException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
DisabledOperationException response = new DisabledOperationException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static DisabledOperationExceptionUnmarshaller _instance = new DisabledOperationExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DisabledOperationExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 88 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DocumentSuggesterOptions Object
/// </summary>
public class DocumentSuggesterOptionsUnmarshaller : IUnmarshaller<DocumentSuggesterOptions, XmlUnmarshallerContext>, IUnmarshaller<DocumentSuggesterOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DocumentSuggesterOptions Unmarshall(XmlUnmarshallerContext context)
{
DocumentSuggesterOptions unmarshalledObject = new DocumentSuggesterOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("FuzzyMatching", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.FuzzyMatching = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SortExpression", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SortExpression = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SourceField", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceField = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DocumentSuggesterOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DocumentSuggesterOptionsUnmarshaller _instance = new DocumentSuggesterOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DocumentSuggesterOptionsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 109 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DomainEndpointOptionsStatus Object
/// </summary>
public class DomainEndpointOptionsStatusUnmarshaller : IUnmarshaller<DomainEndpointOptionsStatus, XmlUnmarshallerContext>, IUnmarshaller<DomainEndpointOptionsStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DomainEndpointOptionsStatus Unmarshall(XmlUnmarshallerContext context)
{
DomainEndpointOptionsStatus unmarshalledObject = new DomainEndpointOptionsStatus();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Options", targetDepth))
{
var unmarshaller = DomainEndpointOptionsUnmarshaller.Instance;
unmarshalledObject.Options = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = OptionStatusUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DomainEndpointOptionsStatus Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DomainEndpointOptionsStatusUnmarshaller _instance = new DomainEndpointOptionsStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DomainEndpointOptionsStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DomainEndpointOptions Object
/// </summary>
public class DomainEndpointOptionsUnmarshaller : IUnmarshaller<DomainEndpointOptions, XmlUnmarshallerContext>, IUnmarshaller<DomainEndpointOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DomainEndpointOptions Unmarshall(XmlUnmarshallerContext context)
{
DomainEndpointOptions unmarshalledObject = new DomainEndpointOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("EnforceHTTPS", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.EnforceHTTPS = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TLSSecurityPolicy", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TLSSecurityPolicy = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DomainEndpointOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DomainEndpointOptionsUnmarshaller _instance = new DomainEndpointOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DomainEndpointOptionsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DomainStatus Object
/// </summary>
public class DomainStatusUnmarshaller : IUnmarshaller<DomainStatus, XmlUnmarshallerContext>, IUnmarshaller<DomainStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DomainStatus Unmarshall(XmlUnmarshallerContext context)
{
DomainStatus unmarshalledObject = new DomainStatus();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("ARN", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ARN = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Created", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Created = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Deleted", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Deleted = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DocService", targetDepth))
{
var unmarshaller = ServiceEndpointUnmarshaller.Instance;
unmarshalledObject.DocService = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DomainId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DomainId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DomainName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DomainName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Limits", targetDepth))
{
var unmarshaller = LimitsUnmarshaller.Instance;
unmarshalledObject.Limits = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Processing", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Processing = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("RequiresIndexDocuments", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.RequiresIndexDocuments = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchInstanceCount", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.SearchInstanceCount = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchInstanceType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SearchInstanceType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchPartitionCount", targetDepth))
{
var unmarshaller = IntUnmarshaller.Instance;
unmarshalledObject.SearchPartitionCount = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchService", targetDepth))
{
var unmarshaller = ServiceEndpointUnmarshaller.Instance;
unmarshalledObject.SearchService = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DomainStatus Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DomainStatusUnmarshaller _instance = new DomainStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DomainStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 169 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DoubleArrayOptions Object
/// </summary>
public class DoubleArrayOptionsUnmarshaller : IUnmarshaller<DoubleArrayOptions, XmlUnmarshallerContext>, IUnmarshaller<DoubleArrayOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DoubleArrayOptions Unmarshall(XmlUnmarshallerContext context)
{
DoubleArrayOptions unmarshalledObject = new DoubleArrayOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DefaultValue", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FacetEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.FacetEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ReturnEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReturnEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SearchEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SourceFields", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceFields = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DoubleArrayOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DoubleArrayOptionsUnmarshaller _instance = new DoubleArrayOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DoubleArrayOptionsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 121 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DoubleOptions Object
/// </summary>
public class DoubleOptionsUnmarshaller : IUnmarshaller<DoubleOptions, XmlUnmarshallerContext>, IUnmarshaller<DoubleOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DoubleOptions Unmarshall(XmlUnmarshallerContext context)
{
DoubleOptions unmarshalledObject = new DoubleOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DefaultValue", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FacetEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.FacetEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ReturnEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReturnEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SearchEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SortEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SortEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SourceField", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceField = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public DoubleOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static DoubleOptionsUnmarshaller _instance = new DoubleOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static DoubleOptionsUnmarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ExpressionStatus Object
/// </summary>
public class ExpressionStatusUnmarshaller : IUnmarshaller<ExpressionStatus, XmlUnmarshallerContext>, IUnmarshaller<ExpressionStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ExpressionStatus Unmarshall(XmlUnmarshallerContext context)
{
ExpressionStatus unmarshalledObject = new ExpressionStatus();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Options", targetDepth))
{
var unmarshaller = ExpressionUnmarshaller.Instance;
unmarshalledObject.Options = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = OptionStatusUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public ExpressionStatus Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static ExpressionStatusUnmarshaller _instance = new ExpressionStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExpressionStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for Expression Object
/// </summary>
public class ExpressionUnmarshaller : IUnmarshaller<Expression, XmlUnmarshallerContext>, IUnmarshaller<Expression, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Expression Unmarshall(XmlUnmarshallerContext context)
{
Expression unmarshalledObject = new Expression();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("ExpressionName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ExpressionName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ExpressionValue", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ExpressionValue = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public Expression Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static ExpressionUnmarshaller _instance = new ExpressionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static ExpressionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// IndexDocuments Request Marshaller
/// </summary>
public class IndexDocumentsRequestMarshaller : IMarshaller<IRequest, IndexDocumentsRequest> , 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((IndexDocumentsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(IndexDocumentsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.CloudSearch");
request.Parameters.Add("Action", "IndexDocuments");
request.Parameters.Add("Version", "2013-01-01");
if(publicRequest != null)
{
if(publicRequest.IsSetDomainName())
{
request.Parameters.Add("DomainName", StringUtils.FromString(publicRequest.DomainName));
}
}
return request;
}
private static IndexDocumentsRequestMarshaller _instance = new IndexDocumentsRequestMarshaller();
internal static IndexDocumentsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static IndexDocumentsRequestMarshaller 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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for IndexDocuments operation
/// </summary>
public class IndexDocumentsResponseUnmarshaller : XmlResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context)
{
IndexDocumentsResponse response = new IndexDocumentsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.IsStartElement)
{
if(context.TestExpression("IndexDocumentsResult", 2))
{
UnmarshallResult(context, response);
continue;
}
if (context.TestExpression("ResponseMetadata", 2))
{
response.ResponseMetadata = ResponseMetadataUnmarshaller.Instance.Unmarshall(context);
}
}
}
return response;
}
private static void UnmarshallResult(XmlUnmarshallerContext context, IndexDocumentsResponse response)
{
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("FieldNames/member", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
var item = unmarshaller.Unmarshall(context);
response.FieldNames.Add(item);
continue;
}
}
}
return;
}
/// <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(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
ErrorResponse errorResponse = ErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BaseException"))
{
return BaseExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("InternalException"))
{
return InternalExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ResourceNotFound"))
{
return ResourceNotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("ValidationException"))
{
return ValidationExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonCloudSearchException(errorResponse.Message, innerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, statusCode);
}
private static IndexDocumentsResponseUnmarshaller _instance = new IndexDocumentsResponseUnmarshaller();
internal static IndexDocumentsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static IndexDocumentsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 154 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for IndexFieldStatus Object
/// </summary>
public class IndexFieldStatusUnmarshaller : IUnmarshaller<IndexFieldStatus, XmlUnmarshallerContext>, IUnmarshaller<IndexFieldStatus, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public IndexFieldStatus Unmarshall(XmlUnmarshallerContext context)
{
IndexFieldStatus unmarshalledObject = new IndexFieldStatus();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("Options", targetDepth))
{
var unmarshaller = IndexFieldUnmarshaller.Instance;
unmarshalledObject.Options = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("Status", targetDepth))
{
var unmarshaller = OptionStatusUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public IndexFieldStatus Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static IndexFieldStatusUnmarshaller _instance = new IndexFieldStatusUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static IndexFieldStatusUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 103 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for IndexField Object
/// </summary>
public class IndexFieldUnmarshaller : IUnmarshaller<IndexField, XmlUnmarshallerContext>, IUnmarshaller<IndexField, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public IndexField Unmarshall(XmlUnmarshallerContext context)
{
IndexField unmarshalledObject = new IndexField();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DateArrayOptions", targetDepth))
{
var unmarshaller = DateArrayOptionsUnmarshaller.Instance;
unmarshalledObject.DateArrayOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DateOptions", targetDepth))
{
var unmarshaller = DateOptionsUnmarshaller.Instance;
unmarshalledObject.DateOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DoubleArrayOptions", targetDepth))
{
var unmarshaller = DoubleArrayOptionsUnmarshaller.Instance;
unmarshalledObject.DoubleArrayOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("DoubleOptions", targetDepth))
{
var unmarshaller = DoubleOptionsUnmarshaller.Instance;
unmarshalledObject.DoubleOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IndexFieldName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.IndexFieldName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IndexFieldType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.IndexFieldType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IntArrayOptions", targetDepth))
{
var unmarshaller = IntArrayOptionsUnmarshaller.Instance;
unmarshalledObject.IntArrayOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("IntOptions", targetDepth))
{
var unmarshaller = IntOptionsUnmarshaller.Instance;
unmarshalledObject.IntOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LatLonOptions", targetDepth))
{
var unmarshaller = LatLonOptionsUnmarshaller.Instance;
unmarshalledObject.LatLonOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LiteralArrayOptions", targetDepth))
{
var unmarshaller = LiteralArrayOptionsUnmarshaller.Instance;
unmarshalledObject.LiteralArrayOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("LiteralOptions", targetDepth))
{
var unmarshaller = LiteralOptionsUnmarshaller.Instance;
unmarshalledObject.LiteralOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TextArrayOptions", targetDepth))
{
var unmarshaller = TextArrayOptionsUnmarshaller.Instance;
unmarshalledObject.TextArrayOptions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("TextOptions", targetDepth))
{
var unmarshaller = TextOptionsUnmarshaller.Instance;
unmarshalledObject.TextOptions = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public IndexField Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static IndexFieldUnmarshaller _instance = new IndexFieldUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static IndexFieldUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 169 |
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 cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for IntArrayOptions Object
/// </summary>
public class IntArrayOptionsUnmarshaller : IUnmarshaller<IntArrayOptions, XmlUnmarshallerContext>, IUnmarshaller<IntArrayOptions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public IntArrayOptions Unmarshall(XmlUnmarshallerContext context)
{
IntArrayOptions unmarshalledObject = new IntArrayOptions();
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
if (context.TestExpression("DefaultValue", targetDepth))
{
var unmarshaller = LongUnmarshaller.Instance;
unmarshalledObject.DefaultValue = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("FacetEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.FacetEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ReturnEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.ReturnEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SearchEnabled", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.SearchEnabled = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("SourceFields", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SourceFields = unmarshaller.Unmarshall(context);
continue;
}
}
else if (context.IsEndElement && context.CurrentDepth < originalDepth)
{
return unmarshalledObject;
}
}
return unmarshalledObject;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public IntArrayOptions Unmarshall(JsonUnmarshallerContext context)
{
return null;
}
private static IntArrayOptionsUnmarshaller _instance = new IntArrayOptionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static IntArrayOptionsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 121 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the cloudsearch-2013-01-01.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Net;
using System.Text;
using System.Xml.Serialization;
using Amazon.CloudSearch.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
namespace Amazon.CloudSearch.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for InternalException operation
/// </summary>
public class InternalExceptionUnmarshaller : IErrorResponseUnmarshaller<InternalException, XmlUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public InternalException Unmarshall(XmlUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public InternalException Unmarshall(XmlUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
InternalException response = new InternalException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int originalDepth = context.CurrentDepth;
int targetDepth = originalDepth + 1;
if (context.IsStartOfDocument)
targetDepth += 2;
while (context.ReadAtDepth(originalDepth))
{
if (context.IsStartElement || context.IsAttribute)
{
}
}
return response;
}
private static InternalExceptionUnmarshaller _instance = new InternalExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static InternalExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.