All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.wellarchitected.model.transform.CreateWorkloadRequestMarshaller Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Well-Architected Tool module holds the client classes that are used for communicating with AWS Well-Architected Tool Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.wellarchitected.model.transform;

import java.util.Map;
import java.util.List;
import javax.annotation.Generated;

import com.amazonaws.SdkClientException;
import com.amazonaws.services.wellarchitected.model.*;

import com.amazonaws.util.IdempotentUtils;

import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;

/**
 * CreateWorkloadRequestMarshaller
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class CreateWorkloadRequestMarshaller {

    private static final MarshallingInfo WORKLOADNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("WorkloadName").build();
    private static final MarshallingInfo DESCRIPTION_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Description").build();
    private static final MarshallingInfo ENVIRONMENT_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("Environment").build();
    private static final MarshallingInfo ACCOUNTIDS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("AccountIds").build();
    private static final MarshallingInfo AWSREGIONS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("AwsRegions").build();
    private static final MarshallingInfo NONAWSREGIONS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("NonAwsRegions").build();
    private static final MarshallingInfo PILLARPRIORITIES_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("PillarPriorities").build();
    private static final MarshallingInfo ARCHITECTURALDESIGN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ArchitecturalDesign").build();
    private static final MarshallingInfo REVIEWOWNER_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ReviewOwner").build();
    private static final MarshallingInfo INDUSTRYTYPE_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("IndustryType").build();
    private static final MarshallingInfo INDUSTRY_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Industry").build();
    private static final MarshallingInfo LENSES_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Lenses").build();
    private static final MarshallingInfo NOTES_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Notes").build();
    private static final MarshallingInfo CLIENTREQUESTTOKEN_BINDING = MarshallingInfo.builder(MarshallingType.STRING)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ClientRequestToken")
            .defaultValueSupplier(com.amazonaws.util.IdempotentUtils.getGenerator()).build();
    private static final MarshallingInfo TAGS_BINDING = MarshallingInfo.builder(MarshallingType.MAP).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Tags").build();
    private static final MarshallingInfo DISCOVERYCONFIG_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("DiscoveryConfig").build();
    private static final MarshallingInfo APPLICATIONS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("Applications").build();
    private static final MarshallingInfo PROFILEARNS_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD)
            .marshallLocationName("ProfileArns").build();
    private static final MarshallingInfo REVIEWTEMPLATEARNS_BINDING = MarshallingInfo.builder(MarshallingType.LIST)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ReviewTemplateArns").build();
    private static final MarshallingInfo JIRACONFIGURATION_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED)
            .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("JiraConfiguration").build();

    private static final CreateWorkloadRequestMarshaller instance = new CreateWorkloadRequestMarshaller();

    public static CreateWorkloadRequestMarshaller getInstance() {
        return instance;
    }

    /**
     * Marshall the given parameter object.
     */
    public void marshall(CreateWorkloadRequest createWorkloadRequest, ProtocolMarshaller protocolMarshaller) {

        if (createWorkloadRequest == null) {
            throw new SdkClientException("Invalid argument passed to marshall(...)");
        }

        try {
            protocolMarshaller.marshall(createWorkloadRequest.getWorkloadName(), WORKLOADNAME_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getDescription(), DESCRIPTION_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getEnvironment(), ENVIRONMENT_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getAccountIds(), ACCOUNTIDS_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getAwsRegions(), AWSREGIONS_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getNonAwsRegions(), NONAWSREGIONS_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getPillarPriorities(), PILLARPRIORITIES_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getArchitecturalDesign(), ARCHITECTURALDESIGN_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getReviewOwner(), REVIEWOWNER_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getIndustryType(), INDUSTRYTYPE_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getIndustry(), INDUSTRY_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getLenses(), LENSES_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getNotes(), NOTES_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getClientRequestToken(), CLIENTREQUESTTOKEN_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getTags(), TAGS_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getDiscoveryConfig(), DISCOVERYCONFIG_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getApplications(), APPLICATIONS_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getProfileArns(), PROFILEARNS_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getReviewTemplateArns(), REVIEWTEMPLATEARNS_BINDING);
            protocolMarshaller.marshall(createWorkloadRequest.getJiraConfiguration(), JIRACONFIGURATION_BINDING);
        } catch (Exception e) {
            throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy