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 amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// <b>(DEPRECATED)</b> Describes the forgot password policy for authenticating into the
/// Amplify app.
/// </summary>
public partial class UpdateBackendAuthForgotPasswordConfig
{
private DeliveryMethod _deliveryMethod;
private EmailSettings _emailSettings;
private SmsSettings _smsSettings;
/// <summary>
/// Gets and sets the property DeliveryMethod.
/// <para>
/// <b>(DEPRECATED)</b> Describes which mode to use (either SMS or email) to deliver messages
/// to app users that want to recover their password.
/// </para>
/// </summary>
public DeliveryMethod DeliveryMethod
{
get { return this._deliveryMethod; }
set { this._deliveryMethod = value; }
}
// Check to see if DeliveryMethod property is set
internal bool IsSetDeliveryMethod()
{
return this._deliveryMethod != null;
}
/// <summary>
/// Gets and sets the property EmailSettings.
/// <para>
/// <b>(DEPRECATED)</b> The configuration for the email sent when an app user forgets
/// their password.
/// </para>
/// </summary>
public EmailSettings EmailSettings
{
get { return this._emailSettings; }
set { this._emailSettings = value; }
}
// Check to see if EmailSettings property is set
internal bool IsSetEmailSettings()
{
return this._emailSettings != null;
}
/// <summary>
/// Gets and sets the property SmsSettings.
/// <para>
/// <b>(DEPRECATED)</b> The configuration for the SMS message sent when an Amplify app
/// user forgets their password.
/// </para>
/// </summary>
public SmsSettings SmsSettings
{
get { return this._smsSettings; }
set { this._smsSettings = value; }
}
// Check to see if SmsSettings property is set
internal bool IsSetSmsSettings()
{
return this._smsSettings != null;
}
}
} | 99 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Describes the authorization configuration for the Amazon Cognito identity pool, provisioned
/// as a part of your auth resource in the Amplify project.
/// </summary>
public partial class UpdateBackendAuthIdentityPoolConfig
{
private bool? _unauthenticatedLogin;
/// <summary>
/// Gets and sets the property UnauthenticatedLogin.
/// <para>
/// A boolean value that can be set to allow or disallow guest-level authorization into
/// your Amplify app.
/// </para>
/// </summary>
public bool UnauthenticatedLogin
{
get { return this._unauthenticatedLogin.GetValueOrDefault(); }
set { this._unauthenticatedLogin = value; }
}
// Check to see if UnauthenticatedLogin property is set
internal bool IsSetUnauthenticatedLogin()
{
return this._unauthenticatedLogin.HasValue;
}
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Updates the multi-factor authentication (MFA) configuration for the backend of your
/// Amplify project.
/// </summary>
public partial class UpdateBackendAuthMFAConfig
{
private MFAMode _mfaMode;
private Settings _settings;
/// <summary>
/// Gets and sets the property MFAMode.
/// <para>
/// The MFA mode for the backend of your Amplify project.
/// </para>
/// </summary>
public MFAMode MFAMode
{
get { return this._mfaMode; }
set { this._mfaMode = value; }
}
// Check to see if MFAMode property is set
internal bool IsSetMFAMode()
{
return this._mfaMode != null;
}
/// <summary>
/// Gets and sets the property Settings.
/// <para>
/// The settings of your MFA configuration for the backend of your Amplify project.
/// </para>
/// </summary>
public Settings Settings
{
get { return this._settings; }
set { this._settings = value; }
}
// Check to see if Settings property is set
internal bool IsSetSettings()
{
return this._settings != null;
}
}
} | 77 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// The OAuth configurations for authenticating users into your Amplify app.
/// </summary>
public partial class UpdateBackendAuthOAuthConfig
{
private string _domainPrefix;
private OAuthGrantType _oAuthGrantType;
private List<string> _oAuthScopes = new List<string>();
private List<string> _redirectSignInURIs = new List<string>();
private List<string> _redirectSignOutURIs = new List<string>();
private SocialProviderSettings _socialProviderSettings;
/// <summary>
/// Gets and sets the property DomainPrefix.
/// <para>
/// The Amazon Cognito domain prefix used to create a hosted UI for authentication.
/// </para>
/// </summary>
public string DomainPrefix
{
get { return this._domainPrefix; }
set { this._domainPrefix = value; }
}
// Check to see if DomainPrefix property is set
internal bool IsSetDomainPrefix()
{
return this._domainPrefix != null;
}
/// <summary>
/// Gets and sets the property OAuthGrantType.
/// <para>
/// The OAuth grant type to allow app users to authenticate from your Amplify app.
/// </para>
/// </summary>
public OAuthGrantType OAuthGrantType
{
get { return this._oAuthGrantType; }
set { this._oAuthGrantType = value; }
}
// Check to see if OAuthGrantType property is set
internal bool IsSetOAuthGrantType()
{
return this._oAuthGrantType != null;
}
/// <summary>
/// Gets and sets the property OAuthScopes.
/// <para>
/// The list of OAuth-related flows that can allow users to authenticate from your Amplify
/// app.
/// </para>
/// </summary>
public List<string> OAuthScopes
{
get { return this._oAuthScopes; }
set { this._oAuthScopes = value; }
}
// Check to see if OAuthScopes property is set
internal bool IsSetOAuthScopes()
{
return this._oAuthScopes != null && this._oAuthScopes.Count > 0;
}
/// <summary>
/// Gets and sets the property RedirectSignInURIs.
/// <para>
/// Redirect URLs that OAuth uses when a user signs in to an Amplify app.
/// </para>
/// </summary>
public List<string> RedirectSignInURIs
{
get { return this._redirectSignInURIs; }
set { this._redirectSignInURIs = value; }
}
// Check to see if RedirectSignInURIs property is set
internal bool IsSetRedirectSignInURIs()
{
return this._redirectSignInURIs != null && this._redirectSignInURIs.Count > 0;
}
/// <summary>
/// Gets and sets the property RedirectSignOutURIs.
/// <para>
/// Redirect URLs that OAuth uses when a user signs out of an Amplify app.
/// </para>
/// </summary>
public List<string> RedirectSignOutURIs
{
get { return this._redirectSignOutURIs; }
set { this._redirectSignOutURIs = value; }
}
// Check to see if RedirectSignOutURIs property is set
internal bool IsSetRedirectSignOutURIs()
{
return this._redirectSignOutURIs != null && this._redirectSignOutURIs.Count > 0;
}
/// <summary>
/// Gets and sets the property SocialProviderSettings.
/// <para>
/// Describes third-party social federation configurations for allowing your users to
/// sign in with OAuth.
/// </para>
/// </summary>
public SocialProviderSettings SocialProviderSettings
{
get { return this._socialProviderSettings; }
set { this._socialProviderSettings = value; }
}
// Check to see if SocialProviderSettings property is set
internal bool IsSetSocialProviderSettings()
{
return this._socialProviderSettings != null;
}
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Describes the password policy for your Amazon Cognito user pool configured as a part
/// of your Amplify project.
/// </summary>
public partial class UpdateBackendAuthPasswordPolicyConfig
{
private List<string> _additionalConstraints = new List<string>();
private double? _minimumLength;
/// <summary>
/// Gets and sets the property AdditionalConstraints.
/// <para>
/// Describes additional constraints on password requirements to sign in to the auth resource,
/// configured as a part of your Amplify project.
/// </para>
/// </summary>
public List<string> AdditionalConstraints
{
get { return this._additionalConstraints; }
set { this._additionalConstraints = value; }
}
// Check to see if AdditionalConstraints property is set
internal bool IsSetAdditionalConstraints()
{
return this._additionalConstraints != null && this._additionalConstraints.Count > 0;
}
/// <summary>
/// Gets and sets the property MinimumLength.
/// <para>
/// Describes the minimum length of the password required to sign in to the auth resource,
/// configured as a part of your Amplify project.
/// </para>
/// </summary>
public double MinimumLength
{
get { return this._minimumLength.GetValueOrDefault(); }
set { this._minimumLength = value; }
}
// Check to see if MinimumLength property is set
internal bool IsSetMinimumLength()
{
return this._minimumLength.HasValue;
}
}
} | 79 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Container for the parameters to the UpdateBackendAuth operation.
/// Updates an existing backend authentication resource.
/// </summary>
public partial class UpdateBackendAuthRequest : AmazonAmplifyBackendRequest
{
private string _appId;
private string _backendEnvironmentName;
private UpdateBackendAuthResourceConfig _resourceConfig;
private string _resourceName;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property BackendEnvironmentName.
/// <para>
/// The name of the backend environment.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string BackendEnvironmentName
{
get { return this._backendEnvironmentName; }
set { this._backendEnvironmentName = value; }
}
// Check to see if BackendEnvironmentName property is set
internal bool IsSetBackendEnvironmentName()
{
return this._backendEnvironmentName != null;
}
/// <summary>
/// Gets and sets the property ResourceConfig.
/// <para>
/// The resource configuration for this request object.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public UpdateBackendAuthResourceConfig ResourceConfig
{
get { return this._resourceConfig; }
set { this._resourceConfig = value; }
}
// Check to see if ResourceConfig property is set
internal bool IsSetResourceConfig()
{
return this._resourceConfig != null;
}
/// <summary>
/// Gets and sets the property ResourceName.
/// <para>
/// The name of this resource.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string ResourceName
{
get { return this._resourceName; }
set { this._resourceName = value; }
}
// Check to see if ResourceName property is set
internal bool IsSetResourceName()
{
return this._resourceName != null;
}
}
} | 119 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Defines the resource configuration when updating an authentication resource in your
/// Amplify project.
/// </summary>
public partial class UpdateBackendAuthResourceConfig
{
private AuthResources _authResources;
private UpdateBackendAuthIdentityPoolConfig _identityPoolConfigs;
private Service _service;
private UpdateBackendAuthUserPoolConfig _userPoolConfigs;
/// <summary>
/// Gets and sets the property AuthResources.
/// <para>
/// Defines the service name to use when configuring an authentication resource in your
/// Amplify project.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public AuthResources AuthResources
{
get { return this._authResources; }
set { this._authResources = value; }
}
// Check to see if AuthResources property is set
internal bool IsSetAuthResources()
{
return this._authResources != null;
}
/// <summary>
/// Gets and sets the property IdentityPoolConfigs.
/// <para>
/// Describes the authorization configuration for the Amazon Cognito identity pool, provisioned
/// as a part of your auth resource in the Amplify project.
/// </para>
/// </summary>
public UpdateBackendAuthIdentityPoolConfig IdentityPoolConfigs
{
get { return this._identityPoolConfigs; }
set { this._identityPoolConfigs = value; }
}
// Check to see if IdentityPoolConfigs property is set
internal bool IsSetIdentityPoolConfigs()
{
return this._identityPoolConfigs != null;
}
/// <summary>
/// Gets and sets the property Service.
/// <para>
/// Defines the service name to use when configuring an authentication resource in your
/// Amplify project.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public Service Service
{
get { return this._service; }
set { this._service = value; }
}
// Check to see if Service property is set
internal bool IsSetService()
{
return this._service != null;
}
/// <summary>
/// Gets and sets the property UserPoolConfigs.
/// <para>
/// Describes the authentication configuration for the Amazon Cognito user pool, provisioned
/// as a part of your auth resource in the Amplify project.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public UpdateBackendAuthUserPoolConfig UserPoolConfigs
{
get { return this._userPoolConfigs; }
set { this._userPoolConfigs = value; }
}
// Check to see if UserPoolConfigs property is set
internal bool IsSetUserPoolConfigs()
{
return this._userPoolConfigs != null;
}
}
} | 122 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// This is the response object from the UpdateBackendAuth operation.
/// </summary>
public partial class UpdateBackendAuthResponse : AmazonWebServiceResponse
{
private string _appId;
private string _backendEnvironmentName;
private string _error;
private string _jobId;
private string _operation;
private string _status;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property BackendEnvironmentName.
/// <para>
/// The name of the backend environment.
/// </para>
/// </summary>
public string BackendEnvironmentName
{
get { return this._backendEnvironmentName; }
set { this._backendEnvironmentName = value; }
}
// Check to see if BackendEnvironmentName property is set
internal bool IsSetBackendEnvironmentName()
{
return this._backendEnvironmentName != null;
}
/// <summary>
/// Gets and sets the property Error.
/// <para>
/// If the request fails, this error is returned.
/// </para>
/// </summary>
public string Error
{
get { return this._error; }
set { this._error = value; }
}
// Check to see if Error property is set
internal bool IsSetError()
{
return this._error != null;
}
/// <summary>
/// Gets and sets the property JobId.
/// <para>
/// The ID for the job.
/// </para>
/// </summary>
public string JobId
{
get { return this._jobId; }
set { this._jobId = value; }
}
// Check to see if JobId property is set
internal bool IsSetJobId()
{
return this._jobId != null;
}
/// <summary>
/// Gets and sets the property Operation.
/// <para>
/// The name of the operation.
/// </para>
/// </summary>
public string Operation
{
get { return this._operation; }
set { this._operation = value; }
}
// Check to see if Operation property is set
internal bool IsSetOperation()
{
return this._operation != null;
}
/// <summary>
/// Gets and sets the property Status.
/// <para>
/// The current status of the request.
/// </para>
/// </summary>
public string Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Describes the Amazon Cognito user pool configuration for the authorization resource
/// to be configured for your Amplify project on an update.
/// </summary>
public partial class UpdateBackendAuthUserPoolConfig
{
private UpdateBackendAuthForgotPasswordConfig _forgotPassword;
private UpdateBackendAuthMFAConfig _mfa;
private UpdateBackendAuthOAuthConfig _oAuth;
private UpdateBackendAuthPasswordPolicyConfig _passwordPolicy;
private UpdateBackendAuthVerificationMessageConfig _verificationMessage;
/// <summary>
/// Gets and sets the property ForgotPassword.
/// <para>
/// <b>(DEPRECATED)</b> Describes the forgot password policy for your Amazon Cognito user
/// pool, configured as a part of your Amplify project.
/// </para>
/// </summary>
public UpdateBackendAuthForgotPasswordConfig ForgotPassword
{
get { return this._forgotPassword; }
set { this._forgotPassword = value; }
}
// Check to see if ForgotPassword property is set
internal bool IsSetForgotPassword()
{
return this._forgotPassword != null;
}
/// <summary>
/// Gets and sets the property Mfa.
/// <para>
/// Describes whether to apply multi-factor authentication policies for your Amazon Cognito
/// user pool configured as a part of your Amplify project.
/// </para>
/// </summary>
public UpdateBackendAuthMFAConfig Mfa
{
get { return this._mfa; }
set { this._mfa = value; }
}
// Check to see if Mfa property is set
internal bool IsSetMfa()
{
return this._mfa != null;
}
/// <summary>
/// Gets and sets the property OAuth.
/// <para>
/// Describes the OAuth policy and rules for your Amazon Cognito user pool, configured
/// as a part of your Amplify project.
/// </para>
/// </summary>
public UpdateBackendAuthOAuthConfig OAuth
{
get { return this._oAuth; }
set { this._oAuth = value; }
}
// Check to see if OAuth property is set
internal bool IsSetOAuth()
{
return this._oAuth != null;
}
/// <summary>
/// Gets and sets the property PasswordPolicy.
/// <para>
/// Describes the password policy for your Amazon Cognito user pool, configured as a part
/// of your Amplify project.
/// </para>
/// </summary>
public UpdateBackendAuthPasswordPolicyConfig PasswordPolicy
{
get { return this._passwordPolicy; }
set { this._passwordPolicy = value; }
}
// Check to see if PasswordPolicy property is set
internal bool IsSetPasswordPolicy()
{
return this._passwordPolicy != null;
}
/// <summary>
/// Gets and sets the property VerificationMessage.
/// <para>
/// Describes the email or SMS verification message for your Amazon Cognito user pool,
/// configured as a part of your Amplify project.
/// </para>
/// </summary>
public UpdateBackendAuthVerificationMessageConfig VerificationMessage
{
get { return this._verificationMessage; }
set { this._verificationMessage = value; }
}
// Check to see if VerificationMessage property is set
internal bool IsSetVerificationMessage()
{
return this._verificationMessage != null;
}
}
} | 139 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Updates the configuration of the email or SMS message for the auth resource configured
/// for your Amplify project.
/// </summary>
public partial class UpdateBackendAuthVerificationMessageConfig
{
private DeliveryMethod _deliveryMethod;
private EmailSettings _emailSettings;
private SmsSettings _smsSettings;
/// <summary>
/// Gets and sets the property DeliveryMethod.
/// <para>
/// The type of verification message to send.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public DeliveryMethod DeliveryMethod
{
get { return this._deliveryMethod; }
set { this._deliveryMethod = value; }
}
// Check to see if DeliveryMethod property is set
internal bool IsSetDeliveryMethod()
{
return this._deliveryMethod != null;
}
/// <summary>
/// Gets and sets the property EmailSettings.
/// <para>
/// The settings for the email message.
/// </para>
/// </summary>
public EmailSettings EmailSettings
{
get { return this._emailSettings; }
set { this._emailSettings = value; }
}
// Check to see if EmailSettings property is set
internal bool IsSetEmailSettings()
{
return this._emailSettings != null;
}
/// <summary>
/// Gets and sets the property SmsSettings.
/// <para>
/// The settings for the SMS message.
/// </para>
/// </summary>
public SmsSettings SmsSettings
{
get { return this._smsSettings; }
set { this._smsSettings = value; }
}
// Check to see if SmsSettings property is set
internal bool IsSetSmsSettings()
{
return this._smsSettings != null;
}
}
} | 97 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Container for the parameters to the UpdateBackendConfig operation.
/// Updates the AWS resources required to access the Amplify Admin UI.
/// </summary>
public partial class UpdateBackendConfigRequest : AmazonAmplifyBackendRequest
{
private string _appId;
private LoginAuthConfigReqObj _loginAuthConfig;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property LoginAuthConfig.
/// <para>
/// Describes the Amazon Cognito configuration for Admin UI access.
/// </para>
/// </summary>
public LoginAuthConfigReqObj LoginAuthConfig
{
get { return this._loginAuthConfig; }
set { this._loginAuthConfig = value; }
}
// Check to see if LoginAuthConfig property is set
internal bool IsSetLoginAuthConfig()
{
return this._loginAuthConfig != 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// This is the response object from the UpdateBackendConfig operation.
/// </summary>
public partial class UpdateBackendConfigResponse : AmazonWebServiceResponse
{
private string _appId;
private string _backendManagerAppId;
private string _error;
private LoginAuthConfigReqObj _loginAuthConfig;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property BackendManagerAppId.
/// <para>
/// The app ID for the backend manager.
/// </para>
/// </summary>
public string BackendManagerAppId
{
get { return this._backendManagerAppId; }
set { this._backendManagerAppId = value; }
}
// Check to see if BackendManagerAppId property is set
internal bool IsSetBackendManagerAppId()
{
return this._backendManagerAppId != null;
}
/// <summary>
/// Gets and sets the property Error.
/// <para>
/// If the request fails, this error is returned.
/// </para>
/// </summary>
public string Error
{
get { return this._error; }
set { this._error = value; }
}
// Check to see if Error property is set
internal bool IsSetError()
{
return this._error != null;
}
/// <summary>
/// Gets and sets the property LoginAuthConfig.
/// <para>
/// Describes the Amazon Cognito configurations for the Admin UI auth resource to log
/// in with.
/// </para>
/// </summary>
public LoginAuthConfigReqObj LoginAuthConfig
{
get { return this._loginAuthConfig; }
set { this._loginAuthConfig = value; }
}
// Check to see if LoginAuthConfig property is set
internal bool IsSetLoginAuthConfig()
{
return this._loginAuthConfig != null;
}
}
} | 115 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Container for the parameters to the UpdateBackendJob operation.
/// Updates a specific job.
/// </summary>
public partial class UpdateBackendJobRequest : AmazonAmplifyBackendRequest
{
private string _appId;
private string _backendEnvironmentName;
private string _jobId;
private string _operation;
private string _status;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property BackendEnvironmentName.
/// <para>
/// The name of the backend environment.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string BackendEnvironmentName
{
get { return this._backendEnvironmentName; }
set { this._backendEnvironmentName = value; }
}
// Check to see if BackendEnvironmentName property is set
internal bool IsSetBackendEnvironmentName()
{
return this._backendEnvironmentName != null;
}
/// <summary>
/// Gets and sets the property JobId.
/// <para>
/// The ID for the job.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string JobId
{
get { return this._jobId; }
set { this._jobId = value; }
}
// Check to see if JobId property is set
internal bool IsSetJobId()
{
return this._jobId != null;
}
/// <summary>
/// Gets and sets the property Operation.
/// <para>
/// Filters the list of response objects to include only those with the specified operation
/// name.
/// </para>
/// </summary>
public string Operation
{
get { return this._operation; }
set { this._operation = value; }
}
// Check to see if Operation property is set
internal bool IsSetOperation()
{
return this._operation != null;
}
/// <summary>
/// Gets and sets the property Status.
/// <para>
/// Filters the list of response objects to include only those with the specified status.
/// </para>
/// </summary>
public string Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
}
} | 138 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// This is the response object from the UpdateBackendJob operation.
/// </summary>
public partial class UpdateBackendJobResponse : AmazonWebServiceResponse
{
private string _appId;
private string _backendEnvironmentName;
private string _createTime;
private string _error;
private string _jobId;
private string _operation;
private string _status;
private string _updateTime;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property BackendEnvironmentName.
/// <para>
/// The name of the backend environment.
/// </para>
/// </summary>
public string BackendEnvironmentName
{
get { return this._backendEnvironmentName; }
set { this._backendEnvironmentName = value; }
}
// Check to see if BackendEnvironmentName property is set
internal bool IsSetBackendEnvironmentName()
{
return this._backendEnvironmentName != null;
}
/// <summary>
/// Gets and sets the property CreateTime.
/// <para>
/// The time when the job was created.
/// </para>
/// </summary>
public string CreateTime
{
get { return this._createTime; }
set { this._createTime = value; }
}
// Check to see if CreateTime property is set
internal bool IsSetCreateTime()
{
return this._createTime != null;
}
/// <summary>
/// Gets and sets the property Error.
/// <para>
/// If the request fails, this error is returned.
/// </para>
/// </summary>
public string Error
{
get { return this._error; }
set { this._error = value; }
}
// Check to see if Error property is set
internal bool IsSetError()
{
return this._error != null;
}
/// <summary>
/// Gets and sets the property JobId.
/// <para>
/// The ID for the job.
/// </para>
/// </summary>
public string JobId
{
get { return this._jobId; }
set { this._jobId = value; }
}
// Check to see if JobId property is set
internal bool IsSetJobId()
{
return this._jobId != null;
}
/// <summary>
/// Gets and sets the property Operation.
/// <para>
/// The name of the operation.
/// </para>
/// </summary>
public string Operation
{
get { return this._operation; }
set { this._operation = value; }
}
// Check to see if Operation property is set
internal bool IsSetOperation()
{
return this._operation != null;
}
/// <summary>
/// Gets and sets the property Status.
/// <para>
/// The current status of the request.
/// </para>
/// </summary>
public string Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
/// <summary>
/// Gets and sets the property UpdateTime.
/// <para>
/// The time when the job was last updated.
/// </para>
/// </summary>
public string UpdateTime
{
get { return this._updateTime; }
set { this._updateTime = value; }
}
// Check to see if UpdateTime property is set
internal bool IsSetUpdateTime()
{
return this._updateTime != null;
}
}
} | 190 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// Container for the parameters to the UpdateBackendStorage operation.
/// Updates an existing backend storage resource.
/// </summary>
public partial class UpdateBackendStorageRequest : AmazonAmplifyBackendRequest
{
private string _appId;
private string _backendEnvironmentName;
private UpdateBackendStorageResourceConfig _resourceConfig;
private string _resourceName;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property BackendEnvironmentName.
/// <para>
/// The name of the backend environment.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string BackendEnvironmentName
{
get { return this._backendEnvironmentName; }
set { this._backendEnvironmentName = value; }
}
// Check to see if BackendEnvironmentName property is set
internal bool IsSetBackendEnvironmentName()
{
return this._backendEnvironmentName != null;
}
/// <summary>
/// Gets and sets the property ResourceConfig.
/// <para>
/// The resource configuration for updating backend storage.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public UpdateBackendStorageResourceConfig ResourceConfig
{
get { return this._resourceConfig; }
set { this._resourceConfig = value; }
}
// Check to see if ResourceConfig property is set
internal bool IsSetResourceConfig()
{
return this._resourceConfig != null;
}
/// <summary>
/// Gets and sets the property ResourceName.
/// <para>
/// The name of the storage resource.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public string ResourceName
{
get { return this._resourceName; }
set { this._resourceName = value; }
}
// Check to see if ResourceName property is set
internal bool IsSetResourceName()
{
return this._resourceName != null;
}
}
} | 119 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// The resource configuration for updating backend storage.
/// </summary>
public partial class UpdateBackendStorageResourceConfig
{
private BackendStoragePermissions _permissions;
private ServiceName _serviceName;
/// <summary>
/// Gets and sets the property Permissions.
/// <para>
/// The authorization configuration for the storage S3 bucket.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public BackendStoragePermissions Permissions
{
get { return this._permissions; }
set { this._permissions = value; }
}
// Check to see if Permissions property is set
internal bool IsSetPermissions()
{
return this._permissions != null;
}
/// <summary>
/// Gets and sets the property ServiceName.
/// <para>
/// The name of the storage service.
/// </para>
/// </summary>
[AWSProperty(Required=true)]
public ServiceName ServiceName
{
get { return this._serviceName; }
set { this._serviceName = value; }
}
// Check to see if ServiceName property is set
internal bool IsSetServiceName()
{
return this._serviceName != 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model
{
/// <summary>
/// This is the response object from the UpdateBackendStorage operation.
/// </summary>
public partial class UpdateBackendStorageResponse : AmazonWebServiceResponse
{
private string _appId;
private string _backendEnvironmentName;
private string _jobId;
private string _status;
/// <summary>
/// Gets and sets the property AppId.
/// <para>
/// The app ID.
/// </para>
/// </summary>
public string AppId
{
get { return this._appId; }
set { this._appId = value; }
}
// Check to see if AppId property is set
internal bool IsSetAppId()
{
return this._appId != null;
}
/// <summary>
/// Gets and sets the property BackendEnvironmentName.
/// <para>
/// The name of the backend environment.
/// </para>
/// </summary>
public string BackendEnvironmentName
{
get { return this._backendEnvironmentName; }
set { this._backendEnvironmentName = value; }
}
// Check to see if BackendEnvironmentName property is set
internal bool IsSetBackendEnvironmentName()
{
return this._backendEnvironmentName != null;
}
/// <summary>
/// Gets and sets the property JobId.
/// <para>
/// The ID for the job.
/// </para>
/// </summary>
public string JobId
{
get { return this._jobId; }
set { this._jobId = value; }
}
// Check to see if JobId property is set
internal bool IsSetJobId()
{
return this._jobId != null;
}
/// <summary>
/// Gets and sets the property Status.
/// <para>
/// The current status of the request.
/// </para>
/// </summary>
public string Status
{
get { return this._status; }
set { this._status = value; }
}
// Check to see if Status property is set
internal bool IsSetStatus()
{
return this._status != null;
}
}
} | 114 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendAPIAppSyncAuthSettings Marshaller
/// </summary>
public class BackendAPIAppSyncAuthSettingsMarshaller : IRequestMarshaller<BackendAPIAppSyncAuthSettings, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendAPIAppSyncAuthSettings requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetCognitoUserPoolId())
{
context.Writer.WritePropertyName("cognitoUserPoolId");
context.Writer.Write(requestObject.CognitoUserPoolId);
}
if(requestObject.IsSetDescription())
{
context.Writer.WritePropertyName("description");
context.Writer.Write(requestObject.Description);
}
if(requestObject.IsSetExpirationTime())
{
context.Writer.WritePropertyName("expirationTime");
context.Writer.Write(requestObject.ExpirationTime);
}
if(requestObject.IsSetOpenIDAuthTTL())
{
context.Writer.WritePropertyName("openIDAuthTTL");
context.Writer.Write(requestObject.OpenIDAuthTTL);
}
if(requestObject.IsSetOpenIDClientId())
{
context.Writer.WritePropertyName("openIDClientId");
context.Writer.Write(requestObject.OpenIDClientId);
}
if(requestObject.IsSetOpenIDIatTTL())
{
context.Writer.WritePropertyName("openIDIatTTL");
context.Writer.Write(requestObject.OpenIDIatTTL);
}
if(requestObject.IsSetOpenIDIssueURL())
{
context.Writer.WritePropertyName("openIDIssueURL");
context.Writer.Write(requestObject.OpenIDIssueURL);
}
if(requestObject.IsSetOpenIDProviderName())
{
context.Writer.WritePropertyName("openIDProviderName");
context.Writer.Write(requestObject.OpenIDProviderName);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendAPIAppSyncAuthSettingsMarshaller Instance = new BackendAPIAppSyncAuthSettingsMarshaller();
}
} | 104 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendAPIAppSyncAuthSettings Object
/// </summary>
public class BackendAPIAppSyncAuthSettingsUnmarshaller : IUnmarshaller<BackendAPIAppSyncAuthSettings, XmlUnmarshallerContext>, IUnmarshaller<BackendAPIAppSyncAuthSettings, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendAPIAppSyncAuthSettings IUnmarshaller<BackendAPIAppSyncAuthSettings, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendAPIAppSyncAuthSettings Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendAPIAppSyncAuthSettings unmarshalledObject = new BackendAPIAppSyncAuthSettings();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("cognitoUserPoolId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CognitoUserPoolId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("description", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Description = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("expirationTime", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.ExpirationTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("openIDAuthTTL", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OpenIDAuthTTL = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("openIDClientId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OpenIDClientId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("openIDIatTTL", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OpenIDIatTTL = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("openIDIssueURL", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OpenIDIssueURL = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("openIDProviderName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OpenIDProviderName = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendAPIAppSyncAuthSettingsUnmarshaller _instance = new BackendAPIAppSyncAuthSettingsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendAPIAppSyncAuthSettingsUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendAPIAuthType Marshaller
/// </summary>
public class BackendAPIAuthTypeMarshaller : IRequestMarshaller<BackendAPIAuthType, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendAPIAuthType requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetMode())
{
context.Writer.WritePropertyName("mode");
context.Writer.Write(requestObject.Mode);
}
if(requestObject.IsSetSettings())
{
context.Writer.WritePropertyName("settings");
context.Writer.WriteObjectStart();
var marshaller = BackendAPIAppSyncAuthSettingsMarshaller.Instance;
marshaller.Marshall(requestObject.Settings, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendAPIAuthTypeMarshaller Instance = new BackendAPIAuthTypeMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendAPIAuthType Object
/// </summary>
public class BackendAPIAuthTypeUnmarshaller : IUnmarshaller<BackendAPIAuthType, XmlUnmarshallerContext>, IUnmarshaller<BackendAPIAuthType, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendAPIAuthType IUnmarshaller<BackendAPIAuthType, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendAPIAuthType Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendAPIAuthType unmarshalledObject = new BackendAPIAuthType();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("mode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Mode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("settings", targetDepth))
{
var unmarshaller = BackendAPIAppSyncAuthSettingsUnmarshaller.Instance;
unmarshalledObject.Settings = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendAPIAuthTypeUnmarshaller _instance = new BackendAPIAuthTypeUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendAPIAuthTypeUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendAPIConflictResolution Marshaller
/// </summary>
public class BackendAPIConflictResolutionMarshaller : IRequestMarshaller<BackendAPIConflictResolution, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendAPIConflictResolution requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetResolutionStrategy())
{
context.Writer.WritePropertyName("resolutionStrategy");
context.Writer.Write(requestObject.ResolutionStrategy);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendAPIConflictResolutionMarshaller Instance = new BackendAPIConflictResolutionMarshaller();
}
} | 62 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendAPIConflictResolution Object
/// </summary>
public class BackendAPIConflictResolutionUnmarshaller : IUnmarshaller<BackendAPIConflictResolution, XmlUnmarshallerContext>, IUnmarshaller<BackendAPIConflictResolution, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendAPIConflictResolution IUnmarshaller<BackendAPIConflictResolution, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendAPIConflictResolution Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendAPIConflictResolution unmarshalledObject = new BackendAPIConflictResolution();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("resolutionStrategy", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ResolutionStrategy = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendAPIConflictResolutionUnmarshaller _instance = new BackendAPIConflictResolutionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendAPIConflictResolutionUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendAPIResourceConfig Marshaller
/// </summary>
public class BackendAPIResourceConfigMarshaller : IRequestMarshaller<BackendAPIResourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendAPIResourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAdditionalAuthTypes())
{
context.Writer.WritePropertyName("additionalAuthTypes");
context.Writer.WriteArrayStart();
foreach(var requestObjectAdditionalAuthTypesListValue in requestObject.AdditionalAuthTypes)
{
context.Writer.WriteObjectStart();
var marshaller = BackendAPIAuthTypeMarshaller.Instance;
marshaller.Marshall(requestObjectAdditionalAuthTypesListValue, context);
context.Writer.WriteObjectEnd();
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetApiName())
{
context.Writer.WritePropertyName("apiName");
context.Writer.Write(requestObject.ApiName);
}
if(requestObject.IsSetConflictResolution())
{
context.Writer.WritePropertyName("conflictResolution");
context.Writer.WriteObjectStart();
var marshaller = BackendAPIConflictResolutionMarshaller.Instance;
marshaller.Marshall(requestObject.ConflictResolution, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetDefaultAuthType())
{
context.Writer.WritePropertyName("defaultAuthType");
context.Writer.WriteObjectStart();
var marshaller = BackendAPIAuthTypeMarshaller.Instance;
marshaller.Marshall(requestObject.DefaultAuthType, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetService())
{
context.Writer.WritePropertyName("service");
context.Writer.Write(requestObject.Service);
}
if(requestObject.IsSetTransformSchema())
{
context.Writer.WritePropertyName("transformSchema");
context.Writer.Write(requestObject.TransformSchema);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendAPIResourceConfigMarshaller Instance = new BackendAPIResourceConfigMarshaller();
}
} | 112 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendAPIResourceConfig Object
/// </summary>
public class BackendAPIResourceConfigUnmarshaller : IUnmarshaller<BackendAPIResourceConfig, XmlUnmarshallerContext>, IUnmarshaller<BackendAPIResourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendAPIResourceConfig IUnmarshaller<BackendAPIResourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendAPIResourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendAPIResourceConfig unmarshalledObject = new BackendAPIResourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("additionalAuthTypes", targetDepth))
{
var unmarshaller = new ListUnmarshaller<BackendAPIAuthType, BackendAPIAuthTypeUnmarshaller>(BackendAPIAuthTypeUnmarshaller.Instance);
unmarshalledObject.AdditionalAuthTypes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("apiName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ApiName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("conflictResolution", targetDepth))
{
var unmarshaller = BackendAPIConflictResolutionUnmarshaller.Instance;
unmarshalledObject.ConflictResolution = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("defaultAuthType", targetDepth))
{
var unmarshaller = BackendAPIAuthTypeUnmarshaller.Instance;
unmarshalledObject.DefaultAuthType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("service", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Service = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("transformSchema", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TransformSchema = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendAPIResourceConfigUnmarshaller _instance = new BackendAPIResourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendAPIResourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 122 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendAuthAppleProviderConfig Marshaller
/// </summary>
public class BackendAuthAppleProviderConfigMarshaller : IRequestMarshaller<BackendAuthAppleProviderConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendAuthAppleProviderConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetClientId())
{
context.Writer.WritePropertyName("client_id");
context.Writer.Write(requestObject.ClientId);
}
if(requestObject.IsSetKeyId())
{
context.Writer.WritePropertyName("key_id");
context.Writer.Write(requestObject.KeyId);
}
if(requestObject.IsSetPrivateKey())
{
context.Writer.WritePropertyName("private_key");
context.Writer.Write(requestObject.PrivateKey);
}
if(requestObject.IsSetTeamId())
{
context.Writer.WritePropertyName("team_id");
context.Writer.Write(requestObject.TeamId);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendAuthAppleProviderConfigMarshaller Instance = new BackendAuthAppleProviderConfigMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendAuthAppleProviderConfig Object
/// </summary>
public class BackendAuthAppleProviderConfigUnmarshaller : IUnmarshaller<BackendAuthAppleProviderConfig, XmlUnmarshallerContext>, IUnmarshaller<BackendAuthAppleProviderConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendAuthAppleProviderConfig IUnmarshaller<BackendAuthAppleProviderConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendAuthAppleProviderConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendAuthAppleProviderConfig unmarshalledObject = new BackendAuthAppleProviderConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("client_id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClientId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("key_id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.KeyId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("private_key", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.PrivateKey = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("team_id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.TeamId = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendAuthAppleProviderConfigUnmarshaller _instance = new BackendAuthAppleProviderConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendAuthAppleProviderConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 110 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendAuthSocialProviderConfig Marshaller
/// </summary>
public class BackendAuthSocialProviderConfigMarshaller : IRequestMarshaller<BackendAuthSocialProviderConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendAuthSocialProviderConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetClientId())
{
context.Writer.WritePropertyName("client_id");
context.Writer.Write(requestObject.ClientId);
}
if(requestObject.IsSetClientSecret())
{
context.Writer.WritePropertyName("client_secret");
context.Writer.Write(requestObject.ClientSecret);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendAuthSocialProviderConfigMarshaller Instance = new BackendAuthSocialProviderConfigMarshaller();
}
} | 68 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendAuthSocialProviderConfig Object
/// </summary>
public class BackendAuthSocialProviderConfigUnmarshaller : IUnmarshaller<BackendAuthSocialProviderConfig, XmlUnmarshallerContext>, IUnmarshaller<BackendAuthSocialProviderConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendAuthSocialProviderConfig IUnmarshaller<BackendAuthSocialProviderConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendAuthSocialProviderConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendAuthSocialProviderConfig unmarshalledObject = new BackendAuthSocialProviderConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("client_id", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClientId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("client_secret", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ClientSecret = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendAuthSocialProviderConfigUnmarshaller _instance = new BackendAuthSocialProviderConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendAuthSocialProviderConfigUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendJobRespObj Object
/// </summary>
public class BackendJobRespObjUnmarshaller : IUnmarshaller<BackendJobRespObj, XmlUnmarshallerContext>, IUnmarshaller<BackendJobRespObj, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendJobRespObj IUnmarshaller<BackendJobRespObj, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendJobRespObj Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendJobRespObj unmarshalledObject = new BackendJobRespObj();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("createTime", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.CreateTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("updateTime", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.UpdateTime = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendJobRespObjUnmarshaller _instance = new BackendJobRespObjUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendJobRespObjUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// BackendStoragePermissions Marshaller
/// </summary>
public class BackendStoragePermissionsMarshaller : IRequestMarshaller<BackendStoragePermissions, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(BackendStoragePermissions requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAuthenticated())
{
context.Writer.WritePropertyName("authenticated");
context.Writer.WriteArrayStart();
foreach(var requestObjectAuthenticatedListValue in requestObject.Authenticated)
{
context.Writer.Write(requestObjectAuthenticatedListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetUnAuthenticated())
{
context.Writer.WritePropertyName("unAuthenticated");
context.Writer.WriteArrayStart();
foreach(var requestObjectUnAuthenticatedListValue in requestObject.UnAuthenticated)
{
context.Writer.Write(requestObjectUnAuthenticatedListValue);
}
context.Writer.WriteArrayEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static BackendStoragePermissionsMarshaller Instance = new BackendStoragePermissionsMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BackendStoragePermissions Object
/// </summary>
public class BackendStoragePermissionsUnmarshaller : IUnmarshaller<BackendStoragePermissions, XmlUnmarshallerContext>, IUnmarshaller<BackendStoragePermissions, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
BackendStoragePermissions IUnmarshaller<BackendStoragePermissions, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BackendStoragePermissions Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
BackendStoragePermissions unmarshalledObject = new BackendStoragePermissions();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("authenticated", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.Authenticated = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("unAuthenticated", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.UnAuthenticated = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static BackendStoragePermissionsUnmarshaller _instance = new BackendStoragePermissionsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BackendStoragePermissionsUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for BadRequestException Object
/// </summary>
public class BadRequestExceptionUnmarshaller : IErrorResponseUnmarshaller<BadRequestException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public BadRequestException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public BadRequestException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
BadRequestException unmarshalledObject = new BadRequestException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static BadRequestExceptionUnmarshaller _instance = new BadRequestExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static BadRequestExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CloneBackend Request Marshaller
/// </summary>
public class CloneBackendRequestMarshaller : IMarshaller<IRequest, CloneBackendRequest> , 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((CloneBackendRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CloneBackendRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/environments/{backendEnvironmentName}/clone";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetTargetEnvironmentName())
{
context.Writer.WritePropertyName("targetEnvironmentName");
context.Writer.Write(publicRequest.TargetEnvironmentName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CloneBackendRequestMarshaller _instance = new CloneBackendRequestMarshaller();
internal static CloneBackendRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CloneBackendRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CloneBackend operation
/// </summary>
public class CloneBackendResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CloneBackendResponse response = new CloneBackendResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CloneBackendResponseUnmarshaller _instance = new CloneBackendResponseUnmarshaller();
internal static CloneBackendResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CloneBackendResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAPI Request Marshaller
/// </summary>
public class CreateBackendAPIRequestMarshaller : IMarshaller<IRequest, CreateBackendAPIRequest> , 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((CreateBackendAPIRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateBackendAPIRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
request.ResourcePath = "/backend/{appId}/api";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetBackendEnvironmentName())
{
context.Writer.WritePropertyName("backendEnvironmentName");
context.Writer.Write(publicRequest.BackendEnvironmentName);
}
if(publicRequest.IsSetResourceConfig())
{
context.Writer.WritePropertyName("resourceConfig");
context.Writer.WriteObjectStart();
var marshaller = BackendAPIResourceConfigMarshaller.Instance;
marshaller.Marshall(publicRequest.ResourceConfig, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateBackendAPIRequestMarshaller _instance = new CreateBackendAPIRequestMarshaller();
internal static CreateBackendAPIRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAPIRequestMarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAPI operation
/// </summary>
public class CreateBackendAPIResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateBackendAPIResponse response = new CreateBackendAPIResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateBackendAPIResponseUnmarshaller _instance = new CreateBackendAPIResponseUnmarshaller();
internal static CreateBackendAPIResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAPIResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthForgotPasswordConfig Marshaller
/// </summary>
public class CreateBackendAuthForgotPasswordConfigMarshaller : IRequestMarshaller<CreateBackendAuthForgotPasswordConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthForgotPasswordConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetDeliveryMethod())
{
context.Writer.WritePropertyName("deliveryMethod");
context.Writer.Write(requestObject.DeliveryMethod);
}
if(requestObject.IsSetEmailSettings())
{
context.Writer.WritePropertyName("emailSettings");
context.Writer.WriteObjectStart();
var marshaller = EmailSettingsMarshaller.Instance;
marshaller.Marshall(requestObject.EmailSettings, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetSmsSettings())
{
context.Writer.WritePropertyName("smsSettings");
context.Writer.WriteObjectStart();
var marshaller = SmsSettingsMarshaller.Instance;
marshaller.Marshall(requestObject.SmsSettings, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthForgotPasswordConfigMarshaller Instance = new CreateBackendAuthForgotPasswordConfigMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthForgotPasswordConfig Object
/// </summary>
public class CreateBackendAuthForgotPasswordConfigUnmarshaller : IUnmarshaller<CreateBackendAuthForgotPasswordConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthForgotPasswordConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthForgotPasswordConfig IUnmarshaller<CreateBackendAuthForgotPasswordConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthForgotPasswordConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthForgotPasswordConfig unmarshalledObject = new CreateBackendAuthForgotPasswordConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("deliveryMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DeliveryMethod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("emailSettings", targetDepth))
{
var unmarshaller = EmailSettingsUnmarshaller.Instance;
unmarshalledObject.EmailSettings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("smsSettings", targetDepth))
{
var unmarshaller = SmsSettingsUnmarshaller.Instance;
unmarshalledObject.SmsSettings = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthForgotPasswordConfigUnmarshaller _instance = new CreateBackendAuthForgotPasswordConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthForgotPasswordConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 104 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthIdentityPoolConfig Marshaller
/// </summary>
public class CreateBackendAuthIdentityPoolConfigMarshaller : IRequestMarshaller<CreateBackendAuthIdentityPoolConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthIdentityPoolConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetIdentityPoolName())
{
context.Writer.WritePropertyName("identityPoolName");
context.Writer.Write(requestObject.IdentityPoolName);
}
if(requestObject.IsSetUnauthenticatedLogin())
{
context.Writer.WritePropertyName("unauthenticatedLogin");
context.Writer.Write(requestObject.UnauthenticatedLogin);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthIdentityPoolConfigMarshaller Instance = new CreateBackendAuthIdentityPoolConfigMarshaller();
}
} | 68 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthIdentityPoolConfig Object
/// </summary>
public class CreateBackendAuthIdentityPoolConfigUnmarshaller : IUnmarshaller<CreateBackendAuthIdentityPoolConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthIdentityPoolConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthIdentityPoolConfig IUnmarshaller<CreateBackendAuthIdentityPoolConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthIdentityPoolConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthIdentityPoolConfig unmarshalledObject = new CreateBackendAuthIdentityPoolConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("identityPoolName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.IdentityPoolName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("unauthenticatedLogin", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.UnauthenticatedLogin = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthIdentityPoolConfigUnmarshaller _instance = new CreateBackendAuthIdentityPoolConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthIdentityPoolConfigUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthMFAConfig Marshaller
/// </summary>
public class CreateBackendAuthMFAConfigMarshaller : IRequestMarshaller<CreateBackendAuthMFAConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthMFAConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetMFAMode())
{
context.Writer.WritePropertyName("MFAMode");
context.Writer.Write(requestObject.MFAMode);
}
if(requestObject.IsSetSettings())
{
context.Writer.WritePropertyName("settings");
context.Writer.WriteObjectStart();
var marshaller = SettingsMarshaller.Instance;
marshaller.Marshall(requestObject.Settings, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthMFAConfigMarshaller Instance = new CreateBackendAuthMFAConfigMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthMFAConfig Object
/// </summary>
public class CreateBackendAuthMFAConfigUnmarshaller : IUnmarshaller<CreateBackendAuthMFAConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthMFAConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthMFAConfig IUnmarshaller<CreateBackendAuthMFAConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthMFAConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthMFAConfig unmarshalledObject = new CreateBackendAuthMFAConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("MFAMode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.MFAMode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("settings", targetDepth))
{
var unmarshaller = SettingsUnmarshaller.Instance;
unmarshalledObject.Settings = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthMFAConfigUnmarshaller _instance = new CreateBackendAuthMFAConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthMFAConfigUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthOAuthConfig Marshaller
/// </summary>
public class CreateBackendAuthOAuthConfigMarshaller : IRequestMarshaller<CreateBackendAuthOAuthConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthOAuthConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetDomainPrefix())
{
context.Writer.WritePropertyName("domainPrefix");
context.Writer.Write(requestObject.DomainPrefix);
}
if(requestObject.IsSetOAuthGrantType())
{
context.Writer.WritePropertyName("oAuthGrantType");
context.Writer.Write(requestObject.OAuthGrantType);
}
if(requestObject.IsSetOAuthScopes())
{
context.Writer.WritePropertyName("oAuthScopes");
context.Writer.WriteArrayStart();
foreach(var requestObjectOAuthScopesListValue in requestObject.OAuthScopes)
{
context.Writer.Write(requestObjectOAuthScopesListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetRedirectSignInURIs())
{
context.Writer.WritePropertyName("redirectSignInURIs");
context.Writer.WriteArrayStart();
foreach(var requestObjectRedirectSignInURIsListValue in requestObject.RedirectSignInURIs)
{
context.Writer.Write(requestObjectRedirectSignInURIsListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetRedirectSignOutURIs())
{
context.Writer.WritePropertyName("redirectSignOutURIs");
context.Writer.WriteArrayStart();
foreach(var requestObjectRedirectSignOutURIsListValue in requestObject.RedirectSignOutURIs)
{
context.Writer.Write(requestObjectRedirectSignOutURIsListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetSocialProviderSettings())
{
context.Writer.WritePropertyName("socialProviderSettings");
context.Writer.WriteObjectStart();
var marshaller = SocialProviderSettingsMarshaller.Instance;
marshaller.Marshall(requestObject.SocialProviderSettings, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthOAuthConfigMarshaller Instance = new CreateBackendAuthOAuthConfigMarshaller();
}
} | 112 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthOAuthConfig Object
/// </summary>
public class CreateBackendAuthOAuthConfigUnmarshaller : IUnmarshaller<CreateBackendAuthOAuthConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthOAuthConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthOAuthConfig IUnmarshaller<CreateBackendAuthOAuthConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthOAuthConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthOAuthConfig unmarshalledObject = new CreateBackendAuthOAuthConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("domainPrefix", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DomainPrefix = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("oAuthGrantType", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.OAuthGrantType = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("oAuthScopes", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.OAuthScopes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("redirectSignInURIs", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.RedirectSignInURIs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("redirectSignOutURIs", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.RedirectSignOutURIs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("socialProviderSettings", targetDepth))
{
var unmarshaller = SocialProviderSettingsUnmarshaller.Instance;
unmarshalledObject.SocialProviderSettings = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthOAuthConfigUnmarshaller _instance = new CreateBackendAuthOAuthConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthOAuthConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 122 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthPasswordPolicyConfig Marshaller
/// </summary>
public class CreateBackendAuthPasswordPolicyConfigMarshaller : IRequestMarshaller<CreateBackendAuthPasswordPolicyConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthPasswordPolicyConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAdditionalConstraints())
{
context.Writer.WritePropertyName("additionalConstraints");
context.Writer.WriteArrayStart();
foreach(var requestObjectAdditionalConstraintsListValue in requestObject.AdditionalConstraints)
{
context.Writer.Write(requestObjectAdditionalConstraintsListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetMinimumLength())
{
context.Writer.WritePropertyName("minimumLength");
context.Writer.Write(requestObject.MinimumLength);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthPasswordPolicyConfigMarshaller Instance = new CreateBackendAuthPasswordPolicyConfigMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthPasswordPolicyConfig Object
/// </summary>
public class CreateBackendAuthPasswordPolicyConfigUnmarshaller : IUnmarshaller<CreateBackendAuthPasswordPolicyConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthPasswordPolicyConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthPasswordPolicyConfig IUnmarshaller<CreateBackendAuthPasswordPolicyConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthPasswordPolicyConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthPasswordPolicyConfig unmarshalledObject = new CreateBackendAuthPasswordPolicyConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("additionalConstraints", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.AdditionalConstraints = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("minimumLength", targetDepth))
{
var unmarshaller = DoubleUnmarshaller.Instance;
unmarshalledObject.MinimumLength = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthPasswordPolicyConfigUnmarshaller _instance = new CreateBackendAuthPasswordPolicyConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthPasswordPolicyConfigUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuth Request Marshaller
/// </summary>
public class CreateBackendAuthRequestMarshaller : IMarshaller<IRequest, CreateBackendAuthRequest> , 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((CreateBackendAuthRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateBackendAuthRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
request.ResourcePath = "/backend/{appId}/auth";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetBackendEnvironmentName())
{
context.Writer.WritePropertyName("backendEnvironmentName");
context.Writer.Write(publicRequest.BackendEnvironmentName);
}
if(publicRequest.IsSetResourceConfig())
{
context.Writer.WritePropertyName("resourceConfig");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthResourceConfigMarshaller.Instance;
marshaller.Marshall(publicRequest.ResourceConfig, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateBackendAuthRequestMarshaller _instance = new CreateBackendAuthRequestMarshaller();
internal static CreateBackendAuthRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthRequestMarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthResourceConfig Marshaller
/// </summary>
public class CreateBackendAuthResourceConfigMarshaller : IRequestMarshaller<CreateBackendAuthResourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthResourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetAuthResources())
{
context.Writer.WritePropertyName("authResources");
context.Writer.Write(requestObject.AuthResources);
}
if(requestObject.IsSetIdentityPoolConfigs())
{
context.Writer.WritePropertyName("identityPoolConfigs");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthIdentityPoolConfigMarshaller.Instance;
marshaller.Marshall(requestObject.IdentityPoolConfigs, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetService())
{
context.Writer.WritePropertyName("service");
context.Writer.Write(requestObject.Service);
}
if(requestObject.IsSetUserPoolConfigs())
{
context.Writer.WritePropertyName("userPoolConfigs");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthUserPoolConfigMarshaller.Instance;
marshaller.Marshall(requestObject.UserPoolConfigs, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthResourceConfigMarshaller Instance = new CreateBackendAuthResourceConfigMarshaller();
}
} | 90 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthResourceConfig Object
/// </summary>
public class CreateBackendAuthResourceConfigUnmarshaller : IUnmarshaller<CreateBackendAuthResourceConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthResourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthResourceConfig IUnmarshaller<CreateBackendAuthResourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthResourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthResourceConfig unmarshalledObject = new CreateBackendAuthResourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("authResources", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.AuthResources = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("identityPoolConfigs", targetDepth))
{
var unmarshaller = CreateBackendAuthIdentityPoolConfigUnmarshaller.Instance;
unmarshalledObject.IdentityPoolConfigs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("service", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.Service = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("userPoolConfigs", targetDepth))
{
var unmarshaller = CreateBackendAuthUserPoolConfigUnmarshaller.Instance;
unmarshalledObject.UserPoolConfigs = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthResourceConfigUnmarshaller _instance = new CreateBackendAuthResourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthResourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 110 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuth operation
/// </summary>
public class CreateBackendAuthResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateBackendAuthResponse response = new CreateBackendAuthResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateBackendAuthResponseUnmarshaller _instance = new CreateBackendAuthResponseUnmarshaller();
internal static CreateBackendAuthResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthUserPoolConfig Marshaller
/// </summary>
public class CreateBackendAuthUserPoolConfigMarshaller : IRequestMarshaller<CreateBackendAuthUserPoolConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthUserPoolConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetForgotPassword())
{
context.Writer.WritePropertyName("forgotPassword");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthForgotPasswordConfigMarshaller.Instance;
marshaller.Marshall(requestObject.ForgotPassword, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetMfa())
{
context.Writer.WritePropertyName("mfa");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthMFAConfigMarshaller.Instance;
marshaller.Marshall(requestObject.Mfa, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetOAuth())
{
context.Writer.WritePropertyName("oAuth");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthOAuthConfigMarshaller.Instance;
marshaller.Marshall(requestObject.OAuth, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetPasswordPolicy())
{
context.Writer.WritePropertyName("passwordPolicy");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthPasswordPolicyConfigMarshaller.Instance;
marshaller.Marshall(requestObject.PasswordPolicy, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetRequiredSignUpAttributes())
{
context.Writer.WritePropertyName("requiredSignUpAttributes");
context.Writer.WriteArrayStart();
foreach(var requestObjectRequiredSignUpAttributesListValue in requestObject.RequiredSignUpAttributes)
{
context.Writer.Write(requestObjectRequiredSignUpAttributesListValue);
}
context.Writer.WriteArrayEnd();
}
if(requestObject.IsSetSignInMethod())
{
context.Writer.WritePropertyName("signInMethod");
context.Writer.Write(requestObject.SignInMethod);
}
if(requestObject.IsSetUserPoolName())
{
context.Writer.WritePropertyName("userPoolName");
context.Writer.Write(requestObject.UserPoolName);
}
if(requestObject.IsSetVerificationMessage())
{
context.Writer.WritePropertyName("verificationMessage");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendAuthVerificationMessageConfigMarshaller.Instance;
marshaller.Marshall(requestObject.VerificationMessage, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthUserPoolConfigMarshaller Instance = new CreateBackendAuthUserPoolConfigMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthUserPoolConfig Object
/// </summary>
public class CreateBackendAuthUserPoolConfigUnmarshaller : IUnmarshaller<CreateBackendAuthUserPoolConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthUserPoolConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthUserPoolConfig IUnmarshaller<CreateBackendAuthUserPoolConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthUserPoolConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthUserPoolConfig unmarshalledObject = new CreateBackendAuthUserPoolConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("forgotPassword", targetDepth))
{
var unmarshaller = CreateBackendAuthForgotPasswordConfigUnmarshaller.Instance;
unmarshalledObject.ForgotPassword = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("mfa", targetDepth))
{
var unmarshaller = CreateBackendAuthMFAConfigUnmarshaller.Instance;
unmarshalledObject.Mfa = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("oAuth", targetDepth))
{
var unmarshaller = CreateBackendAuthOAuthConfigUnmarshaller.Instance;
unmarshalledObject.OAuth = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("passwordPolicy", targetDepth))
{
var unmarshaller = CreateBackendAuthPasswordPolicyConfigUnmarshaller.Instance;
unmarshalledObject.PasswordPolicy = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("requiredSignUpAttributes", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
unmarshalledObject.RequiredSignUpAttributes = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("signInMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.SignInMethod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("userPoolName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.UserPoolName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("verificationMessage", targetDepth))
{
var unmarshaller = CreateBackendAuthVerificationMessageConfigUnmarshaller.Instance;
unmarshalledObject.VerificationMessage = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthUserPoolConfigUnmarshaller _instance = new CreateBackendAuthUserPoolConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthUserPoolConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendAuthVerificationMessageConfig Marshaller
/// </summary>
public class CreateBackendAuthVerificationMessageConfigMarshaller : IRequestMarshaller<CreateBackendAuthVerificationMessageConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendAuthVerificationMessageConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetDeliveryMethod())
{
context.Writer.WritePropertyName("deliveryMethod");
context.Writer.Write(requestObject.DeliveryMethod);
}
if(requestObject.IsSetEmailSettings())
{
context.Writer.WritePropertyName("emailSettings");
context.Writer.WriteObjectStart();
var marshaller = EmailSettingsMarshaller.Instance;
marshaller.Marshall(requestObject.EmailSettings, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetSmsSettings())
{
context.Writer.WritePropertyName("smsSettings");
context.Writer.WriteObjectStart();
var marshaller = SmsSettingsMarshaller.Instance;
marshaller.Marshall(requestObject.SmsSettings, context);
context.Writer.WriteObjectEnd();
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendAuthVerificationMessageConfigMarshaller Instance = new CreateBackendAuthVerificationMessageConfigMarshaller();
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendAuthVerificationMessageConfig Object
/// </summary>
public class CreateBackendAuthVerificationMessageConfigUnmarshaller : IUnmarshaller<CreateBackendAuthVerificationMessageConfig, XmlUnmarshallerContext>, IUnmarshaller<CreateBackendAuthVerificationMessageConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
CreateBackendAuthVerificationMessageConfig IUnmarshaller<CreateBackendAuthVerificationMessageConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public CreateBackendAuthVerificationMessageConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
CreateBackendAuthVerificationMessageConfig unmarshalledObject = new CreateBackendAuthVerificationMessageConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("deliveryMethod", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.DeliveryMethod = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("emailSettings", targetDepth))
{
var unmarshaller = EmailSettingsUnmarshaller.Instance;
unmarshalledObject.EmailSettings = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("smsSettings", targetDepth))
{
var unmarshaller = SmsSettingsUnmarshaller.Instance;
unmarshalledObject.SmsSettings = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static CreateBackendAuthVerificationMessageConfigUnmarshaller _instance = new CreateBackendAuthVerificationMessageConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendAuthVerificationMessageConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 104 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendConfig Request Marshaller
/// </summary>
public class CreateBackendConfigRequestMarshaller : IMarshaller<IRequest, CreateBackendConfigRequest> , 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((CreateBackendConfigRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateBackendConfigRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
request.ResourcePath = "/backend/{appId}/config";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetBackendManagerAppId())
{
context.Writer.WritePropertyName("backendManagerAppId");
context.Writer.Write(publicRequest.BackendManagerAppId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateBackendConfigRequestMarshaller _instance = new CreateBackendConfigRequestMarshaller();
internal static CreateBackendConfigRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendConfigRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 104 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendConfig operation
/// </summary>
public class CreateBackendConfigResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateBackendConfigResponse response = new CreateBackendConfigResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateBackendConfigResponseUnmarshaller _instance = new CreateBackendConfigResponseUnmarshaller();
internal static CreateBackendConfigResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendConfigResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackend Request Marshaller
/// </summary>
public class CreateBackendRequestMarshaller : IMarshaller<IRequest, CreateBackendRequest> , 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((CreateBackendRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateBackendRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
request.ResourcePath = "/backend";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetAppId())
{
context.Writer.WritePropertyName("appId");
context.Writer.Write(publicRequest.AppId);
}
if(publicRequest.IsSetAppName())
{
context.Writer.WritePropertyName("appName");
context.Writer.Write(publicRequest.AppName);
}
if(publicRequest.IsSetBackendEnvironmentName())
{
context.Writer.WritePropertyName("backendEnvironmentName");
context.Writer.Write(publicRequest.BackendEnvironmentName);
}
if(publicRequest.IsSetResourceConfig())
{
context.Writer.WritePropertyName("resourceConfig");
context.Writer.WriteObjectStart();
var marshaller = ResourceConfigMarshaller.Instance;
marshaller.Marshall(publicRequest.ResourceConfig, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateBackendRequestMarshaller _instance = new CreateBackendRequestMarshaller();
internal static CreateBackendRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 130 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackend operation
/// </summary>
public class CreateBackendResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateBackendResponse response = new CreateBackendResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateBackendResponseUnmarshaller _instance = new CreateBackendResponseUnmarshaller();
internal static CreateBackendResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendStorage Request Marshaller
/// </summary>
public class CreateBackendStorageRequestMarshaller : IMarshaller<IRequest, CreateBackendStorageRequest> , 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((CreateBackendStorageRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateBackendStorageRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
request.ResourcePath = "/backend/{appId}/storage";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetBackendEnvironmentName())
{
context.Writer.WritePropertyName("backendEnvironmentName");
context.Writer.Write(publicRequest.BackendEnvironmentName);
}
if(publicRequest.IsSetResourceConfig())
{
context.Writer.WritePropertyName("resourceConfig");
context.Writer.WriteObjectStart();
var marshaller = CreateBackendStorageResourceConfigMarshaller.Instance;
marshaller.Marshall(publicRequest.ResourceConfig, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static CreateBackendStorageRequestMarshaller _instance = new CreateBackendStorageRequestMarshaller();
internal static CreateBackendStorageRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendStorageRequestMarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateBackendStorageResourceConfig Marshaller
/// </summary>
public class CreateBackendStorageResourceConfigMarshaller : IRequestMarshaller<CreateBackendStorageResourceConfig, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(CreateBackendStorageResourceConfig requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetBucketName())
{
context.Writer.WritePropertyName("bucketName");
context.Writer.Write(requestObject.BucketName);
}
if(requestObject.IsSetPermissions())
{
context.Writer.WritePropertyName("permissions");
context.Writer.WriteObjectStart();
var marshaller = BackendStoragePermissionsMarshaller.Instance;
marshaller.Marshall(requestObject.Permissions, context);
context.Writer.WriteObjectEnd();
}
if(requestObject.IsSetServiceName())
{
context.Writer.WritePropertyName("serviceName");
context.Writer.Write(requestObject.ServiceName);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static CreateBackendStorageResourceConfigMarshaller Instance = new CreateBackendStorageResourceConfigMarshaller();
}
} | 79 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateBackendStorage operation
/// </summary>
public class CreateBackendStorageResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateBackendStorageResponse response = new CreateBackendStorageResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateBackendStorageResponseUnmarshaller _instance = new CreateBackendStorageResponseUnmarshaller();
internal static CreateBackendStorageResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateBackendStorageResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// CreateToken Request Marshaller
/// </summary>
public class CreateTokenRequestMarshaller : IMarshaller<IRequest, CreateTokenRequest> , 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((CreateTokenRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(CreateTokenRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
request.ResourcePath = "/backend/{appId}/challenge";
return request;
}
private static CreateTokenRequestMarshaller _instance = new CreateTokenRequestMarshaller();
internal static CreateTokenRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateTokenRequestMarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for CreateToken operation
/// </summary>
public class CreateTokenResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
CreateTokenResponse response = new CreateTokenResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("challengeCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ChallengeCode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sessionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SessionId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ttl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Ttl = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static CreateTokenResponseUnmarshaller _instance = new CreateTokenResponseUnmarshaller();
internal static CreateTokenResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static CreateTokenResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteBackendAPI Request Marshaller
/// </summary>
public class DeleteBackendAPIRequestMarshaller : IMarshaller<IRequest, DeleteBackendAPIRequest> , 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((DeleteBackendAPIRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteBackendAPIRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/api/{backendEnvironmentName}/remove";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceConfig())
{
context.Writer.WritePropertyName("resourceConfig");
context.Writer.WriteObjectStart();
var marshaller = BackendAPIResourceConfigMarshaller.Instance;
marshaller.Marshall(publicRequest.ResourceConfig, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteBackendAPIRequestMarshaller _instance = new DeleteBackendAPIRequestMarshaller();
internal static DeleteBackendAPIRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendAPIRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 118 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteBackendAPI operation
/// </summary>
public class DeleteBackendAPIResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteBackendAPIResponse response = new DeleteBackendAPIResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteBackendAPIResponseUnmarshaller _instance = new DeleteBackendAPIResponseUnmarshaller();
internal static DeleteBackendAPIResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendAPIResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteBackendAuth Request Marshaller
/// </summary>
public class DeleteBackendAuthRequestMarshaller : IMarshaller<IRequest, DeleteBackendAuthRequest> , 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((DeleteBackendAuthRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteBackendAuthRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/auth/{backendEnvironmentName}/remove";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteBackendAuthRequestMarshaller _instance = new DeleteBackendAuthRequestMarshaller();
internal static DeleteBackendAuthRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendAuthRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteBackendAuth operation
/// </summary>
public class DeleteBackendAuthResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteBackendAuthResponse response = new DeleteBackendAuthResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteBackendAuthResponseUnmarshaller _instance = new DeleteBackendAuthResponseUnmarshaller();
internal static DeleteBackendAuthResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendAuthResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteBackend Request Marshaller
/// </summary>
public class DeleteBackendRequestMarshaller : IMarshaller<IRequest, DeleteBackendRequest> , 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((DeleteBackendRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteBackendRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/environments/{backendEnvironmentName}/remove";
return request;
}
private static DeleteBackendRequestMarshaller _instance = new DeleteBackendRequestMarshaller();
internal static DeleteBackendRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendRequestMarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteBackend operation
/// </summary>
public class DeleteBackendResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteBackendResponse response = new DeleteBackendResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteBackendResponseUnmarshaller _instance = new DeleteBackendResponseUnmarshaller();
internal static DeleteBackendResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteBackendStorage Request Marshaller
/// </summary>
public class DeleteBackendStorageRequestMarshaller : IMarshaller<IRequest, DeleteBackendStorageRequest> , 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((DeleteBackendStorageRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteBackendStorageRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/storage/{backendEnvironmentName}/remove";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
if(publicRequest.IsSetServiceName())
{
context.Writer.WritePropertyName("serviceName");
context.Writer.Write(publicRequest.ServiceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static DeleteBackendStorageRequestMarshaller _instance = new DeleteBackendStorageRequestMarshaller();
internal static DeleteBackendStorageRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendStorageRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 113 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteBackendStorage operation
/// </summary>
public class DeleteBackendStorageResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteBackendStorageResponse response = new DeleteBackendStorageResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteBackendStorageResponseUnmarshaller _instance = new DeleteBackendStorageResponseUnmarshaller();
internal static DeleteBackendStorageResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteBackendStorageResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// DeleteToken Request Marshaller
/// </summary>
public class DeleteTokenRequestMarshaller : IMarshaller<IRequest, DeleteTokenRequest> , 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((DeleteTokenRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(DeleteTokenRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetSessionId())
throw new AmazonAmplifyBackendException("Request object does not have required field SessionId set");
request.AddPathResource("{sessionId}", StringUtils.FromString(publicRequest.SessionId));
request.ResourcePath = "/backend/{appId}/challenge/{sessionId}/remove";
return request;
}
private static DeleteTokenRequestMarshaller _instance = new DeleteTokenRequestMarshaller();
internal static DeleteTokenRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteTokenRequestMarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for DeleteToken operation
/// </summary>
public class DeleteTokenResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
DeleteTokenResponse response = new DeleteTokenResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("isSuccess", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
response.IsSuccess = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static DeleteTokenResponseUnmarshaller _instance = new DeleteTokenResponseUnmarshaller();
internal static DeleteTokenResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static DeleteTokenResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 122 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// EmailSettings Marshaller
/// </summary>
public class EmailSettingsMarshaller : IRequestMarshaller<EmailSettings, JsonMarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="requestObject"></param>
/// <param name="context"></param>
/// <returns></returns>
public void Marshall(EmailSettings requestObject, JsonMarshallerContext context)
{
if(requestObject.IsSetEmailMessage())
{
context.Writer.WritePropertyName("emailMessage");
context.Writer.Write(requestObject.EmailMessage);
}
if(requestObject.IsSetEmailSubject())
{
context.Writer.WritePropertyName("emailSubject");
context.Writer.Write(requestObject.EmailSubject);
}
}
/// <summary>
/// Singleton Marshaller.
/// </summary>
public readonly static EmailSettingsMarshaller Instance = new EmailSettingsMarshaller();
}
} | 68 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for EmailSettings Object
/// </summary>
public class EmailSettingsUnmarshaller : IUnmarshaller<EmailSettings, XmlUnmarshallerContext>, IUnmarshaller<EmailSettings, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
EmailSettings IUnmarshaller<EmailSettings, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public EmailSettings Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
EmailSettings unmarshalledObject = new EmailSettings();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("emailMessage", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EmailMessage = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("emailSubject", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.EmailSubject = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static EmailSettingsUnmarshaller _instance = new EmailSettingsUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static EmailSettingsUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GatewayTimeoutException Object
/// </summary>
public class GatewayTimeoutExceptionUnmarshaller : IErrorResponseUnmarshaller<GatewayTimeoutException, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public GatewayTimeoutException Unmarshall(JsonUnmarshallerContext context)
{
return this.Unmarshall(context, new Amazon.Runtime.Internal.ErrorResponse());
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <param name="errorResponse"></param>
/// <returns></returns>
public GatewayTimeoutException Unmarshall(JsonUnmarshallerContext context, Amazon.Runtime.Internal.ErrorResponse errorResponse)
{
context.Read();
GatewayTimeoutException unmarshalledObject = new GatewayTimeoutException(errorResponse.Message, errorResponse.InnerException,
errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
}
return unmarshalledObject;
}
private static GatewayTimeoutExceptionUnmarshaller _instance = new GatewayTimeoutExceptionUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static GatewayTimeoutExceptionUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 85 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GenerateBackendAPIModels Request Marshaller
/// </summary>
public class GenerateBackendAPIModelsRequestMarshaller : IMarshaller<IRequest, GenerateBackendAPIModelsRequest> , 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((GenerateBackendAPIModelsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GenerateBackendAPIModelsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/api/{backendEnvironmentName}/generateModels";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GenerateBackendAPIModelsRequestMarshaller _instance = new GenerateBackendAPIModelsRequestMarshaller();
internal static GenerateBackendAPIModelsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GenerateBackendAPIModelsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GenerateBackendAPIModels operation
/// </summary>
public class GenerateBackendAPIModelsResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GenerateBackendAPIModelsResponse response = new GenerateBackendAPIModelsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GenerateBackendAPIModelsResponseUnmarshaller _instance = new GenerateBackendAPIModelsResponseUnmarshaller();
internal static GenerateBackendAPIModelsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GenerateBackendAPIModelsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetBackendAPIModels Request Marshaller
/// </summary>
public class GetBackendAPIModelsRequestMarshaller : IMarshaller<IRequest, GetBackendAPIModelsRequest> , 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((GetBackendAPIModelsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetBackendAPIModelsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/api/{backendEnvironmentName}/getModels";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetBackendAPIModelsRequestMarshaller _instance = new GetBackendAPIModelsRequestMarshaller();
internal static GetBackendAPIModelsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendAPIModelsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetBackendAPIModels operation
/// </summary>
public class GetBackendAPIModelsResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetBackendAPIModelsResponse response = new GetBackendAPIModelsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("modelIntrospectionSchema", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ModelIntrospectionSchema = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("models", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Models = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetBackendAPIModelsResponseUnmarshaller _instance = new GetBackendAPIModelsResponseUnmarshaller();
internal static GetBackendAPIModelsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendAPIModelsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 134 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetBackendAPI Request Marshaller
/// </summary>
public class GetBackendAPIRequestMarshaller : IMarshaller<IRequest, GetBackendAPIRequest> , 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((GetBackendAPIRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetBackendAPIRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/api/{backendEnvironmentName}/details";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceConfig())
{
context.Writer.WritePropertyName("resourceConfig");
context.Writer.WriteObjectStart();
var marshaller = BackendAPIResourceConfigMarshaller.Instance;
marshaller.Marshall(publicRequest.ResourceConfig, context);
context.Writer.WriteObjectEnd();
}
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetBackendAPIRequestMarshaller _instance = new GetBackendAPIRequestMarshaller();
internal static GetBackendAPIRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendAPIRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 118 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetBackendAPI operation
/// </summary>
public class GetBackendAPIResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetBackendAPIResponse response = new GetBackendAPIResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resourceConfig", targetDepth))
{
var unmarshaller = BackendAPIResourceConfigUnmarshaller.Instance;
response.ResourceConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resourceName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ResourceName = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetBackendAPIResponseUnmarshaller _instance = new GetBackendAPIResponseUnmarshaller();
internal static GetBackendAPIResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendAPIResponseUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetBackendAuth Request Marshaller
/// </summary>
public class GetBackendAuthRequestMarshaller : IMarshaller<IRequest, GetBackendAuthRequest> , 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((GetBackendAuthRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetBackendAuthRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/auth/{backendEnvironmentName}/details";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetBackendAuthRequestMarshaller _instance = new GetBackendAuthRequestMarshaller();
internal static GetBackendAuthRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendAuthRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetBackendAuth operation
/// </summary>
public class GetBackendAuthResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetBackendAuthResponse response = new GetBackendAuthResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resourceConfig", targetDepth))
{
var unmarshaller = CreateBackendAuthResourceConfigUnmarshaller.Instance;
response.ResourceConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resourceName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ResourceName = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetBackendAuthResponseUnmarshaller _instance = new GetBackendAuthResponseUnmarshaller();
internal static GetBackendAuthResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendAuthResponseUnmarshaller 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetBackendJob Request Marshaller
/// </summary>
public class GetBackendJobRequestMarshaller : IMarshaller<IRequest, GetBackendJobRequest> , 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((GetBackendJobRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetBackendJobRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
if (!publicRequest.IsSetJobId())
throw new AmazonAmplifyBackendException("Request object does not have required field JobId set");
request.AddPathResource("{jobId}", StringUtils.FromString(publicRequest.JobId));
request.ResourcePath = "/backend/{appId}/job/{backendEnvironmentName}/{jobId}";
return request;
}
private static GetBackendJobRequestMarshaller _instance = new GetBackendJobRequestMarshaller();
internal static GetBackendJobRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendJobRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 93 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetBackendJob operation
/// </summary>
public class GetBackendJobResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetBackendJobResponse response = new GetBackendJobResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("createTime", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.CreateTime = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("updateTime", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.UpdateTime = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetBackendJobResponseUnmarshaller _instance = new GetBackendJobResponseUnmarshaller();
internal static GetBackendJobResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendJobResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 164 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetBackend Request Marshaller
/// </summary>
public class GetBackendRequestMarshaller : IMarshaller<IRequest, GetBackendRequest> , 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((GetBackendRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetBackendRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
request.ResourcePath = "/backend/{appId}/details";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetBackendEnvironmentName())
{
context.Writer.WritePropertyName("backendEnvironmentName");
context.Writer.Write(publicRequest.BackendEnvironmentName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetBackendRequestMarshaller _instance = new GetBackendRequestMarshaller();
internal static GetBackendRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 104 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetBackend operation
/// </summary>
public class GetBackendResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetBackendResponse response = new GetBackendResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("amplifyFeatureFlags", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AmplifyFeatureFlags = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("amplifyMetaConfig", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AmplifyMetaConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("appName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentList", targetDepth))
{
var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
response.BackendEnvironmentList = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetBackendResponseUnmarshaller _instance = new GetBackendResponseUnmarshaller();
internal static GetBackendResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 158 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetBackendStorage Request Marshaller
/// </summary>
public class GetBackendStorageRequestMarshaller : IMarshaller<IRequest, GetBackendStorageRequest> , 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((GetBackendStorageRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetBackendStorageRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/storage/{backendEnvironmentName}/details";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetResourceName())
{
context.Writer.WritePropertyName("resourceName");
context.Writer.Write(publicRequest.ResourceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static GetBackendStorageRequestMarshaller _instance = new GetBackendStorageRequestMarshaller();
internal static GetBackendStorageRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendStorageRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 107 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetBackendStorageResourceConfig Object
/// </summary>
public class GetBackendStorageResourceConfigUnmarshaller : IUnmarshaller<GetBackendStorageResourceConfig, XmlUnmarshallerContext>, IUnmarshaller<GetBackendStorageResourceConfig, JsonUnmarshallerContext>
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
GetBackendStorageResourceConfig IUnmarshaller<GetBackendStorageResourceConfig, XmlUnmarshallerContext>.Unmarshall(XmlUnmarshallerContext context)
{
throw new NotImplementedException();
}
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public GetBackendStorageResourceConfig Unmarshall(JsonUnmarshallerContext context)
{
context.Read();
if (context.CurrentTokenType == JsonToken.Null)
return null;
GetBackendStorageResourceConfig unmarshalledObject = new GetBackendStorageResourceConfig();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("bucketName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.BucketName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("imported", targetDepth))
{
var unmarshaller = BoolUnmarshaller.Instance;
unmarshalledObject.Imported = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("permissions", targetDepth))
{
var unmarshaller = BackendStoragePermissionsUnmarshaller.Instance;
unmarshalledObject.Permissions = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("serviceName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
unmarshalledObject.ServiceName = unmarshaller.Unmarshall(context);
continue;
}
}
return unmarshalledObject;
}
private static GetBackendStorageResourceConfigUnmarshaller _instance = new GetBackendStorageResourceConfigUnmarshaller();
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendStorageResourceConfigUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 110 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetBackendStorage operation
/// </summary>
public class GetBackendStorageResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetBackendStorageResponse response = new GetBackendStorageResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resourceConfig", targetDepth))
{
var unmarshaller = GetBackendStorageResourceConfigUnmarshaller.Instance;
response.ResourceConfig = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("resourceName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ResourceName = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetBackendStorageResponseUnmarshaller _instance = new GetBackendStorageResponseUnmarshaller();
internal static GetBackendStorageResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetBackendStorageResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// GetToken Request Marshaller
/// </summary>
public class GetTokenRequestMarshaller : IMarshaller<IRequest, GetTokenRequest> , 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((GetTokenRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(GetTokenRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "GET";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetSessionId())
throw new AmazonAmplifyBackendException("Request object does not have required field SessionId set");
request.AddPathResource("{sessionId}", StringUtils.FromString(publicRequest.SessionId));
request.ResourcePath = "/backend/{appId}/challenge/{sessionId}";
return request;
}
private static GetTokenRequestMarshaller _instance = new GetTokenRequestMarshaller();
internal static GetTokenRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetTokenRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 90 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for GetToken operation
/// </summary>
public class GetTokenResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
GetTokenResponse response = new GetTokenResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("challengeCode", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.ChallengeCode = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("sessionId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.SessionId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("ttl", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Ttl = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static GetTokenResponseUnmarshaller _instance = new GetTokenResponseUnmarshaller();
internal static GetTokenResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static GetTokenResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// ImportBackendAuth Request Marshaller
/// </summary>
public class ImportBackendAuthRequestMarshaller : IMarshaller<IRequest, ImportBackendAuthRequest> , 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((ImportBackendAuthRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ImportBackendAuthRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/auth/{backendEnvironmentName}/import";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetIdentityPoolId())
{
context.Writer.WritePropertyName("identityPoolId");
context.Writer.Write(publicRequest.IdentityPoolId);
}
if(publicRequest.IsSetNativeClientId())
{
context.Writer.WritePropertyName("nativeClientId");
context.Writer.Write(publicRequest.NativeClientId);
}
if(publicRequest.IsSetUserPoolId())
{
context.Writer.WritePropertyName("userPoolId");
context.Writer.Write(publicRequest.UserPoolId);
}
if(publicRequest.IsSetWebClientId())
{
context.Writer.WritePropertyName("webClientId");
context.Writer.Write(publicRequest.WebClientId);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static ImportBackendAuthRequestMarshaller _instance = new ImportBackendAuthRequestMarshaller();
internal static ImportBackendAuthRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ImportBackendAuthRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 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 amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ImportBackendAuth operation
/// </summary>
public class ImportBackendAuthResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ImportBackendAuthResponse response = new ImportBackendAuthResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("error", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Error = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("operation", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Operation = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ImportBackendAuthResponseUnmarshaller _instance = new ImportBackendAuthResponseUnmarshaller();
internal static ImportBackendAuthResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ImportBackendAuthResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 152 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// ImportBackendStorage Request Marshaller
/// </summary>
public class ImportBackendStorageRequestMarshaller : IMarshaller<IRequest, ImportBackendStorageRequest> , 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((ImportBackendStorageRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ImportBackendStorageRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/storage/{backendEnvironmentName}/import";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetBucketName())
{
context.Writer.WritePropertyName("bucketName");
context.Writer.Write(publicRequest.BucketName);
}
if(publicRequest.IsSetServiceName())
{
context.Writer.WritePropertyName("serviceName");
context.Writer.Write(publicRequest.ServiceName);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static ImportBackendStorageRequestMarshaller _instance = new ImportBackendStorageRequestMarshaller();
internal static ImportBackendStorageRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ImportBackendStorageRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 113 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ImportBackendStorage operation
/// </summary>
public class ImportBackendStorageResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ImportBackendStorageResponse response = new ImportBackendStorageResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("appId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.AppId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("backendEnvironmentName", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.BackendEnvironmentName = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("jobId", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.JobId = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("status", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.Status = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ImportBackendStorageResponseUnmarshaller _instance = new ImportBackendStorageResponseUnmarshaller();
internal static ImportBackendStorageResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ImportBackendStorageResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 140 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// ListBackendJobs Request Marshaller
/// </summary>
public class ListBackendJobsRequestMarshaller : IMarshaller<IRequest, ListBackendJobsRequest> , 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((ListBackendJobsRequest)input);
}
/// <summary>
/// Marshaller the request object to the HTTP request.
/// </summary>
/// <param name="publicRequest"></param>
/// <returns></returns>
public IRequest Marshall(ListBackendJobsRequest publicRequest)
{
IRequest request = new DefaultRequest(publicRequest, "Amazon.AmplifyBackend");
request.Headers["Content-Type"] = "application/json";
request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2020-08-11";
request.HttpMethod = "POST";
if (!publicRequest.IsSetAppId())
throw new AmazonAmplifyBackendException("Request object does not have required field AppId set");
request.AddPathResource("{appId}", StringUtils.FromString(publicRequest.AppId));
if (!publicRequest.IsSetBackendEnvironmentName())
throw new AmazonAmplifyBackendException("Request object does not have required field BackendEnvironmentName set");
request.AddPathResource("{backendEnvironmentName}", StringUtils.FromString(publicRequest.BackendEnvironmentName));
request.ResourcePath = "/backend/{appId}/job/{backendEnvironmentName}";
using (StringWriter stringWriter = new StringWriter(CultureInfo.InvariantCulture))
{
JsonWriter writer = new JsonWriter(stringWriter);
writer.WriteObjectStart();
var context = new JsonMarshallerContext(request, writer);
if(publicRequest.IsSetJobId())
{
context.Writer.WritePropertyName("jobId");
context.Writer.Write(publicRequest.JobId);
}
if(publicRequest.IsSetMaxResults())
{
context.Writer.WritePropertyName("maxResults");
context.Writer.Write(publicRequest.MaxResults);
}
if(publicRequest.IsSetNextToken())
{
context.Writer.WritePropertyName("nextToken");
context.Writer.Write(publicRequest.NextToken);
}
if(publicRequest.IsSetOperation())
{
context.Writer.WritePropertyName("operation");
context.Writer.Write(publicRequest.Operation);
}
if(publicRequest.IsSetStatus())
{
context.Writer.WritePropertyName("status");
context.Writer.Write(publicRequest.Status);
}
writer.WriteObjectEnd();
string snippet = stringWriter.ToString();
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);
}
return request;
}
private static ListBackendJobsRequestMarshaller _instance = new ListBackendJobsRequestMarshaller();
internal static ListBackendJobsRequestMarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListBackendJobsRequestMarshaller Instance
{
get
{
return _instance;
}
}
}
} | 131 |
aws-sdk-net | aws | C# | /*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the amplifybackend-2020-08-11.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.AmplifyBackend.Model;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Transform;
using Amazon.Runtime.Internal.Util;
using ThirdParty.Json.LitJson;
namespace Amazon.AmplifyBackend.Model.Internal.MarshallTransformations
{
/// <summary>
/// Response Unmarshaller for ListBackendJobs operation
/// </summary>
public class ListBackendJobsResponseUnmarshaller : JsonResponseUnmarshaller
{
/// <summary>
/// Unmarshaller the response from the service to the response class.
/// </summary>
/// <param name="context"></param>
/// <returns></returns>
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
{
ListBackendJobsResponse response = new ListBackendJobsResponse();
context.Read();
int targetDepth = context.CurrentDepth;
while (context.ReadAtDepth(targetDepth))
{
if (context.TestExpression("jobs", targetDepth))
{
var unmarshaller = new ListUnmarshaller<BackendJobRespObj, BackendJobRespObjUnmarshaller>(BackendJobRespObjUnmarshaller.Instance);
response.Jobs = unmarshaller.Unmarshall(context);
continue;
}
if (context.TestExpression("nextToken", targetDepth))
{
var unmarshaller = StringUnmarshaller.Instance;
response.NextToken = unmarshaller.Unmarshall(context);
continue;
}
}
return response;
}
/// <summary>
/// Unmarshaller error response to exception.
/// </summary>
/// <param name="context"></param>
/// <param name="innerException"></param>
/// <param name="statusCode"></param>
/// <returns></returns>
public override AmazonServiceException UnmarshallException(JsonUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode)
{
var errorResponse = JsonErrorResponseUnmarshaller.GetInstance().Unmarshall(context);
errorResponse.InnerException = innerException;
errorResponse.StatusCode = statusCode;
var responseBodyBytes = context.GetResponseBodyBytes();
using (var streamCopy = new MemoryStream(responseBodyBytes))
using (var contextCopy = new JsonUnmarshallerContext(streamCopy, false, null))
{
if (errorResponse.Code != null && errorResponse.Code.Equals("BadRequestException"))
{
return BadRequestExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("GatewayTimeoutException"))
{
return GatewayTimeoutExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("NotFoundException"))
{
return NotFoundExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
if (errorResponse.Code != null && errorResponse.Code.Equals("TooManyRequestsException"))
{
return TooManyRequestsExceptionUnmarshaller.Instance.Unmarshall(contextCopy, errorResponse);
}
}
return new AmazonAmplifyBackendException(errorResponse.Message, errorResponse.InnerException, errorResponse.Type, errorResponse.Code, errorResponse.RequestId, errorResponse.StatusCode);
}
private static ListBackendJobsResponseUnmarshaller _instance = new ListBackendJobsResponseUnmarshaller();
internal static ListBackendJobsResponseUnmarshaller GetInstance()
{
return _instance;
}
/// <summary>
/// Gets the singleton.
/// </summary>
public static ListBackendJobsResponseUnmarshaller Instance
{
get
{
return _instance;
}
}
}
} | 128 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.