Skip to content

Latest commit

 

History

History
3526 lines (3222 loc) · 142 KB

File metadata and controls

3526 lines (3222 loc) · 142 KB

Code snippets and samples

IntegrationAccountAgreements

IntegrationAccountAssemblies

IntegrationAccountBatchConfigurations

IntegrationAccountCertificates

IntegrationAccountMaps

IntegrationAccountPartners

IntegrationAccountSchemas

IntegrationAccountSessions

IntegrationAccounts

IntegrationServiceEnvironmentManagedApiOperations

IntegrationServiceEnvironmentManagedApis

IntegrationServiceEnvironmentNetworkHealth

IntegrationServiceEnvironmentSkus

IntegrationServiceEnvironments

Operations

WorkflowRunActionRepetitions

WorkflowRunActionRepetitionsRequestHistories

WorkflowRunActionRequestHistories

WorkflowRunActionScopeRepetitions

WorkflowRunActions

WorkflowRunOperations

WorkflowRuns

WorkflowTriggerHistories

WorkflowTriggers

WorkflowVersionTriggers

WorkflowVersions

Workflows

IntegrationAccountAgreements_CreateOrUpdate

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.models.AS2AcknowledgementConnectionSettings;
import com.azure.resourcemanager.logic.models.AS2AgreementContent;
import com.azure.resourcemanager.logic.models.AS2EnvelopeSettings;
import com.azure.resourcemanager.logic.models.AS2ErrorSettings;
import com.azure.resourcemanager.logic.models.AS2MdnSettings;
import com.azure.resourcemanager.logic.models.AS2MessageConnectionSettings;
import com.azure.resourcemanager.logic.models.AS2OneWayAgreement;
import com.azure.resourcemanager.logic.models.AS2ProtocolSettings;
import com.azure.resourcemanager.logic.models.AS2SecuritySettings;
import com.azure.resourcemanager.logic.models.AS2ValidationSettings;
import com.azure.resourcemanager.logic.models.AgreementContent;
import com.azure.resourcemanager.logic.models.AgreementType;
import com.azure.resourcemanager.logic.models.BusinessIdentity;
import com.azure.resourcemanager.logic.models.EncryptionAlgorithm;
import com.azure.resourcemanager.logic.models.HashingAlgorithm;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/** Samples for IntegrationAccountAgreements CreateOrUpdate. */
public final class IntegrationAccountAgreementsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAgreements_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update an agreement.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAnAgreement(com.azure.resourcemanager.logic.LogicManager manager)
        throws IOException {
        manager
            .integrationAccountAgreements()
            .define("testAgreement")
            .withRegion("westus")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withAgreementType(AgreementType.AS2)
            .withHostPartner("HostPartner")
            .withGuestPartner("GuestPartner")
            .withHostIdentity(new BusinessIdentity().withQualifier("ZZ").withValue("ZZ"))
            .withGuestIdentity(new BusinessIdentity().withQualifier("AA").withValue("AA"))
            .withContent(
                new AgreementContent()
                    .withAS2(
                        new AS2AgreementContent()
                            .withReceiveAgreement(
                                new AS2OneWayAgreement()
                                    .withSenderBusinessIdentity(
                                        new BusinessIdentity().withQualifier("AA").withValue("AA"))
                                    .withReceiverBusinessIdentity(
                                        new BusinessIdentity().withQualifier("ZZ").withValue("ZZ"))
                                    .withProtocolSettings(
                                        new AS2ProtocolSettings()
                                            .withMessageConnectionSettings(
                                                new AS2MessageConnectionSettings()
                                                    .withIgnoreCertificateNameMismatch(true)
                                                    .withSupportHttpStatusCodeContinue(true)
                                                    .withKeepHttpConnectionAlive(true)
                                                    .withUnfoldHttpHeaders(true))
                                            .withAcknowledgementConnectionSettings(
                                                new AS2AcknowledgementConnectionSettings()
                                                    .withIgnoreCertificateNameMismatch(true)
                                                    .withSupportHttpStatusCodeContinue(true)
                                                    .withKeepHttpConnectionAlive(true)
                                                    .withUnfoldHttpHeaders(true))
                                            .withMdnSettings(
                                                new AS2MdnSettings()
                                                    .withNeedMdn(true)
                                                    .withSignMdn(true)
                                                    .withSendMdnAsynchronously(true)
                                                    .withReceiptDeliveryUrl("http://tempuri.org")
                                                    .withDispositionNotificationTo("http://tempuri.org")
                                                    .withSignOutboundMdnIfOptional(true)
                                                    .withMdnText("Sample")
                                                    .withSendInboundMdnToMessageBox(true)
                                                    .withMicHashingAlgorithm(HashingAlgorithm.SHA1))
                                            .withSecuritySettings(
                                                new AS2SecuritySettings()
                                                    .withOverrideGroupSigningCertificate(false)
                                                    .withEnableNrrForInboundEncodedMessages(true)
                                                    .withEnableNrrForInboundDecodedMessages(true)
                                                    .withEnableNrrForOutboundMdn(true)
                                                    .withEnableNrrForOutboundEncodedMessages(true)
                                                    .withEnableNrrForOutboundDecodedMessages(true)
                                                    .withEnableNrrForInboundMdn(true))
                                            .withValidationSettings(
                                                new AS2ValidationSettings()
                                                    .withOverrideMessageProperties(true)
                                                    .withEncryptMessage(false)
                                                    .withSignMessage(false)
                                                    .withCompressMessage(true)
                                                    .withCheckDuplicateMessage(true)
                                                    .withInterchangeDuplicatesValidityDays(100)
                                                    .withCheckCertificateRevocationListOnSend(true)
                                                    .withCheckCertificateRevocationListOnReceive(true)
                                                    .withEncryptionAlgorithm(EncryptionAlgorithm.AES128))
                                            .withEnvelopeSettings(
                                                new AS2EnvelopeSettings()
                                                    .withMessageContentType("text/plain")
                                                    .withTransmitFileNameInMimeHeader(true)
                                                    .withFileNameTemplate("Test")
                                                    .withSuspendMessageOnFileNameGenerationError(true)
                                                    .withAutogenerateFileName(true))
                                            .withErrorSettings(
                                                new AS2ErrorSettings()
                                                    .withSuspendDuplicateMessage(true)
                                                    .withResendIfMdnNotReceived(true))))
                            .withSendAgreement(
                                new AS2OneWayAgreement()
                                    .withSenderBusinessIdentity(
                                        new BusinessIdentity().withQualifier("ZZ").withValue("ZZ"))
                                    .withReceiverBusinessIdentity(
                                        new BusinessIdentity().withQualifier("AA").withValue("AA"))
                                    .withProtocolSettings(
                                        new AS2ProtocolSettings()
                                            .withMessageConnectionSettings(
                                                new AS2MessageConnectionSettings()
                                                    .withIgnoreCertificateNameMismatch(true)
                                                    .withSupportHttpStatusCodeContinue(true)
                                                    .withKeepHttpConnectionAlive(true)
                                                    .withUnfoldHttpHeaders(true))
                                            .withAcknowledgementConnectionSettings(
                                                new AS2AcknowledgementConnectionSettings()
                                                    .withIgnoreCertificateNameMismatch(true)
                                                    .withSupportHttpStatusCodeContinue(true)
                                                    .withKeepHttpConnectionAlive(true)
                                                    .withUnfoldHttpHeaders(true))
                                            .withMdnSettings(
                                                new AS2MdnSettings()
                                                    .withNeedMdn(true)
                                                    .withSignMdn(true)
                                                    .withSendMdnAsynchronously(true)
                                                    .withReceiptDeliveryUrl("http://tempuri.org")
                                                    .withDispositionNotificationTo("http://tempuri.org")
                                                    .withSignOutboundMdnIfOptional(true)
                                                    .withMdnText("Sample")
                                                    .withSendInboundMdnToMessageBox(true)
                                                    .withMicHashingAlgorithm(HashingAlgorithm.SHA1))
                                            .withSecuritySettings(
                                                new AS2SecuritySettings()
                                                    .withOverrideGroupSigningCertificate(false)
                                                    .withEnableNrrForInboundEncodedMessages(true)
                                                    .withEnableNrrForInboundDecodedMessages(true)
                                                    .withEnableNrrForOutboundMdn(true)
                                                    .withEnableNrrForOutboundEncodedMessages(true)
                                                    .withEnableNrrForOutboundDecodedMessages(true)
                                                    .withEnableNrrForInboundMdn(true))
                                            .withValidationSettings(
                                                new AS2ValidationSettings()
                                                    .withOverrideMessageProperties(true)
                                                    .withEncryptMessage(false)
                                                    .withSignMessage(false)
                                                    .withCompressMessage(true)
                                                    .withCheckDuplicateMessage(true)
                                                    .withInterchangeDuplicatesValidityDays(100)
                                                    .withCheckCertificateRevocationListOnSend(true)
                                                    .withCheckCertificateRevocationListOnReceive(true)
                                                    .withEncryptionAlgorithm(EncryptionAlgorithm.AES128))
                                            .withEnvelopeSettings(
                                                new AS2EnvelopeSettings()
                                                    .withMessageContentType("text/plain")
                                                    .withTransmitFileNameInMimeHeader(true)
                                                    .withFileNameTemplate("Test")
                                                    .withSuspendMessageOnFileNameGenerationError(true)
                                                    .withAutogenerateFileName(true))
                                            .withErrorSettings(
                                                new AS2ErrorSettings()
                                                    .withSuspendDuplicateMessage(true)
                                                    .withResendIfMdnNotReceived(true))))))
            .withTags(mapOf("IntegrationAccountAgreement", "<IntegrationAccountAgreementName>"))
            .withMetadata(
                SerializerFactory
                    .createDefaultManagementSerializerAdapter()
                    .deserialize("{}", Object.class, SerializerEncoding.JSON))
            .create();
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}

IntegrationAccountAgreements_Delete

/** Samples for IntegrationAccountAgreements Delete. */
public final class IntegrationAccountAgreementsDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAgreements_Delete.json
     */
    /**
     * Sample code: Delete an agreement.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAnAgreement(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAgreements()
            .deleteWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testAgreement", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountAgreements_Get

/** Samples for IntegrationAccountAgreements Get. */
public final class IntegrationAccountAgreementsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAgreements_Get.json
     */
    /**
     * Sample code: Get agreement by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAgreementByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAgreements()
            .getWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testAgreement", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountAgreements_List

/** Samples for IntegrationAccountAgreements List. */
public final class IntegrationAccountAgreementsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAgreements_List.json
     */
    /**
     * Sample code: Get agreements by integration account name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAgreementsByIntegrationAccountName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAgreements()
            .list("testResourceGroup", "testIntegrationAccount", null, null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountAgreements_ListContentCallbackUrl

import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.resourcemanager.logic.models.KeyType;
import java.time.OffsetDateTime;

/** Samples for IntegrationAccountAgreements ListContentCallbackUrl. */
public final class IntegrationAccountAgreementsListContentCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAgreements_ListContentCallbackUrl.json
     */
    /**
     * Sample code: Get the content callback url.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheContentCallbackUrl(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAgreements()
            .listContentCallbackUrlWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                "testAgreement",
                new GetCallbackUrlParameters()
                    .withNotAfter(OffsetDateTime.parse("2018-04-19T16:00:00Z"))
                    .withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountAssemblies_CreateOrUpdate

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.models.AssemblyProperties;
import java.io.IOException;

/** Samples for IntegrationAccountAssemblies CreateOrUpdate. */
public final class IntegrationAccountAssembliesCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAssemblies_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update an account assembly.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAnAccountAssembly(com.azure.resourcemanager.logic.LogicManager manager)
        throws IOException {
        manager
            .integrationAccountAssemblies()
            .define("testAssembly")
            .withRegion("westus")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withProperties(
                new AssemblyProperties()
                    .withMetadata(
                        SerializerFactory
                            .createDefaultManagementSerializerAdapter()
                            .deserialize("{}", Object.class, SerializerEncoding.JSON))
                    .withContent("Base64 encoded Assembly Content")
                    .withAssemblyName("System.IdentityModel.Tokens.Jwt"))
            .create();
    }
}

IntegrationAccountAssemblies_Delete

/** Samples for IntegrationAccountAssemblies Delete. */
public final class IntegrationAccountAssembliesDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAssemblies_Delete.json
     */
    /**
     * Sample code: Delete an integration account assembly.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAnIntegrationAccountAssembly(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAssemblies()
            .deleteWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testAssembly", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountAssemblies_Get

/** Samples for IntegrationAccountAssemblies Get. */
public final class IntegrationAccountAssembliesGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAssemblies_Get.json
     */
    /**
     * Sample code: Get an integration account assembly.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAnIntegrationAccountAssembly(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAssemblies()
            .getWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testAssembly", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountAssemblies_List

/** Samples for IntegrationAccountAssemblies List. */
public final class IntegrationAccountAssembliesListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAssemblies_List.json
     */
    /**
     * Sample code: List integration account assemblies.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listIntegrationAccountAssemblies(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAssemblies()
            .list("testResourceGroup", "testIntegrationAccount", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountAssemblies_ListContentCallbackUrl

/** Samples for IntegrationAccountAssemblies ListContentCallbackUrl. */
public final class IntegrationAccountAssembliesListContentCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountAssemblies_ListContentCallbackUrl.json
     */
    /**
     * Sample code: Get the callback url for an integration account assembly.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheCallbackUrlForAnIntegrationAccountAssembly(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountAssemblies()
            .listContentCallbackUrlWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testAssembly", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountBatchConfigurations_CreateOrUpdate

import com.azure.resourcemanager.logic.models.BatchConfigurationProperties;
import com.azure.resourcemanager.logic.models.BatchReleaseCriteria;
import com.azure.resourcemanager.logic.models.RecurrenceFrequency;
import com.azure.resourcemanager.logic.models.WorkflowTriggerRecurrence;

/** Samples for IntegrationAccountBatchConfigurations CreateOrUpdate. */
public final class IntegrationAccountBatchConfigurationsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountBatchConfigurations_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update a batch configuration.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateABatchConfiguration(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountBatchConfigurations()
            .define("testBatchConfiguration")
            .withRegion("westus")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withProperties(
                new BatchConfigurationProperties()
                    .withBatchGroupName("DEFAULT")
                    .withReleaseCriteria(
                        new BatchReleaseCriteria()
                            .withMessageCount(10)
                            .withBatchSize(234567)
                            .withRecurrence(
                                new WorkflowTriggerRecurrence()
                                    .withFrequency(RecurrenceFrequency.MINUTE)
                                    .withInterval(1)
                                    .withStartTime("2017-03-24T11:43:00")
                                    .withTimeZone("India Standard Time"))))
            .create();
    }
}

IntegrationAccountBatchConfigurations_Delete

/** Samples for IntegrationAccountBatchConfigurations Delete. */
public final class IntegrationAccountBatchConfigurationsDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountBatchConfigurations_Delete.json
     */
    /**
     * Sample code: Delete a batch configuration.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteABatchConfiguration(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountBatchConfigurations()
            .deleteWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                "testBatchConfiguration",
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountBatchConfigurations_Get

/** Samples for IntegrationAccountBatchConfigurations Get. */
public final class IntegrationAccountBatchConfigurationsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountBatchConfigurations_Get.json
     */
    /**
     * Sample code: Get a batch configuration.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getABatchConfiguration(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountBatchConfigurations()
            .getWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                "testBatchConfiguration",
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountBatchConfigurations_List

/** Samples for IntegrationAccountBatchConfigurations List. */
public final class IntegrationAccountBatchConfigurationsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountBatchConfigurations_List.json
     */
    /**
     * Sample code: List batch configurations.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listBatchConfigurations(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountBatchConfigurations()
            .list("testResourceGroup", "testIntegrationAccount", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountCertificates_CreateOrUpdate

import com.azure.resourcemanager.logic.models.KeyVaultKeyReference;
import com.azure.resourcemanager.logic.models.KeyVaultKeyReferenceKeyVault;

/** Samples for IntegrationAccountCertificates CreateOrUpdate. */
public final class IntegrationAccountCertificatesCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountCertificates_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update a certificate.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateACertificate(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountCertificates()
            .define("testCertificate")
            .withRegion("brazilsouth")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withKey(
                new KeyVaultKeyReference()
                    .withKeyVault(
                        new KeyVaultKeyReferenceKeyVault()
                            .withId(
                                "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/testResourceGroup/providers/microsoft.keyvault/vaults/<keyVaultName>"))
                    .withKeyName("fakeTokenPlaceholder")
                    .withKeyVersion("fakeTokenPlaceholder"))
            .withPublicCertificate("<publicCertificateValue>")
            .create();
    }
}

IntegrationAccountCertificates_Delete

/** Samples for IntegrationAccountCertificates Delete. */
public final class IntegrationAccountCertificatesDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountCertificates_Delete.json
     */
    /**
     * Sample code: Delete a certificate.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteACertificate(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountCertificates()
            .deleteWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testCertificate", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountCertificates_Get

/** Samples for IntegrationAccountCertificates Get. */
public final class IntegrationAccountCertificatesGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountCertificates_Get.json
     */
    /**
     * Sample code: Get certificate by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getCertificateByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountCertificates()
            .getWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testCertificate", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountCertificates_List

/** Samples for IntegrationAccountCertificates List. */
public final class IntegrationAccountCertificatesListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountCertificates_List.json
     */
    /**
     * Sample code: Get certificates by integration account name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getCertificatesByIntegrationAccountName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountCertificates()
            .list("testResourceGroup", "testIntegrationAccount", null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountMaps_CreateOrUpdate

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.models.MapType;
import java.io.IOException;

/** Samples for IntegrationAccountMaps CreateOrUpdate. */
public final class IntegrationAccountMapsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountLargeMaps_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update a map larger than 4 MB.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAMapLargerThan4MB(com.azure.resourcemanager.logic.LogicManager manager)
        throws IOException {
        manager
            .integrationAccountMaps()
            .define("testMap")
            .withRegion("westus")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withMapType(MapType.XSLT)
            .withContentType("application/xml")
            .withMetadata(
                SerializerFactory
                    .createDefaultManagementSerializerAdapter()
                    .deserialize("{}", Object.class, SerializerEncoding.JSON))
            .create();
    }

    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountMaps_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update a map.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAMap(com.azure.resourcemanager.logic.LogicManager manager) throws IOException {
        manager
            .integrationAccountMaps()
            .define("testMap")
            .withRegion("westus")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withMapType(MapType.XSLT)
            .withContent(
                "<?xml version=\"1.0\" encoding=\"UTF-16\"?>\r\n"
                    + "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\""
                    + " xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\""
                    + " xmlns:var=\"http://schemas.microsoft.com/BizTalk/2003/var\" exclude-result-prefixes=\"msxsl var"
                    + " s0 userCSharp\" version=\"1.0\""
                    + " xmlns:ns0=\"http://BizTalk_Server_Project4.StringFunctoidsDestinationSchema\""
                    + " xmlns:s0=\"http://BizTalk_Server_Project4.StringFunctoidsSourceSchema\""
                    + " xmlns:userCSharp=\"http://schemas.microsoft.com/BizTalk/2003/userCSharp\">\r\n"
                    + "  <xsl:import href=\"http://btsfunctoids.blob.core.windows.net/functoids/functoids.xslt\" />\r\n"
                    + "  <xsl:output omit-xml-declaration=\"yes\" method=\"xml\" version=\"1.0\" />\r\n"
                    + "  <xsl:template match=\"/\">\r\n"
                    + "    <xsl:apply-templates select=\"/s0:Root\" />\r\n"
                    + "  </xsl:template>\r\n"
                    + "  <xsl:template match=\"/s0:Root\">\r\n"
                    + "    <xsl:variable name=\"var:v1\" select=\"userCSharp:StringFind(string(StringFindSource/text())"
                    + " , &quot;SearchString&quot;)\" />\r\n"
                    + "    <xsl:variable name=\"var:v2\" select=\"userCSharp:StringLeft(string(StringLeftSource/text())"
                    + " , &quot;2&quot;)\" />\r\n"
                    + "    <xsl:variable name=\"var:v3\""
                    + " select=\"userCSharp:StringRight(string(StringRightSource/text()) , &quot;2&quot;)\" />\r\n"
                    + "    <xsl:variable name=\"var:v4\""
                    + " select=\"userCSharp:StringUpperCase(string(UppercaseSource/text()))\" />\r\n"
                    + "    <xsl:variable name=\"var:v5\""
                    + " select=\"userCSharp:StringLowerCase(string(LowercaseSource/text()))\" />\r\n"
                    + "    <xsl:variable name=\"var:v6\" select=\"userCSharp:StringSize(string(SizeSource/text()))\""
                    + " />\r\n"
                    + "    <xsl:variable name=\"var:v7\""
                    + " select=\"userCSharp:StringSubstring(string(StringExtractSource/text()) , &quot;0&quot; ,"
                    + " &quot;2&quot;)\" />\r\n"
                    + "    <xsl:variable name=\"var:v8\""
                    + " select=\"userCSharp:StringConcat(string(StringConcatSource/text()))\" />\r\n"
                    + "    <xsl:variable name=\"var:v9\""
                    + " select=\"userCSharp:StringTrimLeft(string(StringLeftTrimSource/text()))\" />\r\n"
                    + "    <xsl:variable name=\"var:v10\""
                    + " select=\"userCSharp:StringTrimRight(string(StringRightTrimSource/text()))\" />\r\n"
                    + "    <ns0:Root>\r\n"
                    + "      <StringFindDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v1\" />\r\n"
                    + "      </StringFindDestination>\r\n"
                    + "      <StringLeftDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v2\" />\r\n"
                    + "      </StringLeftDestination>\r\n"
                    + "      <StringRightDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v3\" />\r\n"
                    + "      </StringRightDestination>\r\n"
                    + "      <UppercaseDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v4\" />\r\n"
                    + "      </UppercaseDestination>\r\n"
                    + "      <LowercaseDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v5\" />\r\n"
                    + "      </LowercaseDestination>\r\n"
                    + "      <SizeDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v6\" />\r\n"
                    + "      </SizeDestination>\r\n"
                    + "      <StringExtractDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v7\" />\r\n"
                    + "      </StringExtractDestination>\r\n"
                    + "      <StringConcatDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v8\" />\r\n"
                    + "      </StringConcatDestination>\r\n"
                    + "      <StringLeftTrimDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v9\" />\r\n"
                    + "      </StringLeftTrimDestination>\r\n"
                    + "      <StringRightTrimDestination>\r\n"
                    + "        <xsl:value-of select=\"$var:v10\" />\r\n"
                    + "      </StringRightTrimDestination>\r\n"
                    + "    </ns0:Root>\r\n"
                    + "  </xsl:template>\r\n"
                    + "</xsl:stylesheet>")
            .withContentType("application/xml")
            .withMetadata(
                SerializerFactory
                    .createDefaultManagementSerializerAdapter()
                    .deserialize("{}", Object.class, SerializerEncoding.JSON))
            .create();
    }
}

IntegrationAccountMaps_Delete

/** Samples for IntegrationAccountMaps Delete. */
public final class IntegrationAccountMapsDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountMaps_Delete.json
     */
    /**
     * Sample code: Delete a map.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAMap(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountMaps()
            .deleteWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testMap", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountMaps_Get

/** Samples for IntegrationAccountMaps Get. */
public final class IntegrationAccountMapsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountMaps_Get.json
     */
    /**
     * Sample code: Get map by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getMapByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountMaps()
            .getWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testMap", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountMaps_List

/** Samples for IntegrationAccountMaps List. */
public final class IntegrationAccountMapsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountMaps_List.json
     */
    /**
     * Sample code: Get maps by integration account name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getMapsByIntegrationAccountName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountMaps()
            .list("testResourceGroup", "testIntegrationAccount", null, null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountMaps_ListContentCallbackUrl

import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.resourcemanager.logic.models.KeyType;
import java.time.OffsetDateTime;

/** Samples for IntegrationAccountMaps ListContentCallbackUrl. */
public final class IntegrationAccountMapsListContentCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountMaps_ListContentCallbackUrl.json
     */
    /**
     * Sample code: Get the content callback url.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheContentCallbackUrl(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountMaps()
            .listContentCallbackUrlWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                "testMap",
                new GetCallbackUrlParameters()
                    .withNotAfter(OffsetDateTime.parse("2018-04-19T16:00:00Z"))
                    .withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountPartners_CreateOrUpdate

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.models.B2BPartnerContent;
import com.azure.resourcemanager.logic.models.BusinessIdentity;
import com.azure.resourcemanager.logic.models.PartnerContent;
import com.azure.resourcemanager.logic.models.PartnerType;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

/** Samples for IntegrationAccountPartners CreateOrUpdate. */
public final class IntegrationAccountPartnersCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountPartners_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update a partner.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAPartner(com.azure.resourcemanager.logic.LogicManager manager) throws IOException {
        manager
            .integrationAccountPartners()
            .define("testPartner")
            .withRegion("westus")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withPartnerType(PartnerType.B2B)
            .withContent(
                new PartnerContent()
                    .withB2B(
                        new B2BPartnerContent()
                            .withBusinessIdentities(
                                Arrays.asList(new BusinessIdentity().withQualifier("AA").withValue("ZZ")))))
            .withTags(mapOf())
            .withMetadata(
                SerializerFactory
                    .createDefaultManagementSerializerAdapter()
                    .deserialize("{}", Object.class, SerializerEncoding.JSON))
            .create();
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}

IntegrationAccountPartners_Delete

/** Samples for IntegrationAccountPartners Delete. */
public final class IntegrationAccountPartnersDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountPartners_Delete.json
     */
    /**
     * Sample code: Delete a partner.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAPartner(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountPartners()
            .deleteWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testPartner", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountPartners_Get

/** Samples for IntegrationAccountPartners Get. */
public final class IntegrationAccountPartnersGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountPartners_Get.json
     */
    /**
     * Sample code: Get partner by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getPartnerByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountPartners()
            .getWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testPartner", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountPartners_List

/** Samples for IntegrationAccountPartners List. */
public final class IntegrationAccountPartnersListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountPartners_List.json
     */
    /**
     * Sample code: Get partners by integration account name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getPartnersByIntegrationAccountName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountPartners()
            .list("testResourceGroup", "testIntegrationAccount", null, null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountPartners_ListContentCallbackUrl

import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.resourcemanager.logic.models.KeyType;
import java.time.OffsetDateTime;

/** Samples for IntegrationAccountPartners ListContentCallbackUrl. */
public final class IntegrationAccountPartnersListContentCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountPartners_ListContentCallbackUrl.json
     */
    /**
     * Sample code: Get the content callback url.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheContentCallbackUrl(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountPartners()
            .listContentCallbackUrlWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                "testPartner",
                new GetCallbackUrlParameters()
                    .withNotAfter(OffsetDateTime.parse("2018-04-19T16:00:00Z"))
                    .withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountSchemas_CreateOrUpdate

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.models.SchemaType;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/** Samples for IntegrationAccountSchemas CreateOrUpdate. */
public final class IntegrationAccountSchemasCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSchemas_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update schema.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateSchema(com.azure.resourcemanager.logic.LogicManager manager) throws IOException {
        manager
            .integrationAccountSchemas()
            .define("testSchema")
            .withRegion("westus")
            .withExistingIntegrationAccount("testResourceGroup", "testIntegrationAccount")
            .withSchemaType(SchemaType.XML)
            .withTags(mapOf("integrationAccountSchemaName", "IntegrationAccountSchema8120"))
            .withMetadata(
                SerializerFactory
                    .createDefaultManagementSerializerAdapter()
                    .deserialize("{}", Object.class, SerializerEncoding.JSON))
            .withContent(
                "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n"
                    + "<xs:schema xmlns:b=\"http://schemas.microsoft.com/BizTalk/2003\""
                    + " xmlns=\"http://Inbound_EDI.OrderFile\" targetNamespace=\"http://Inbound_EDI.OrderFile\""
                    + " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\r\n"
                    + "  <xs:annotation>\r\n"
                    + "    <xs:appinfo>\r\n"
                    + "      <b:schemaInfo default_pad_char=\" \" count_positions_by_byte=\"false\""
                    + " parser_optimization=\"speed\" lookahead_depth=\"3\" suppress_empty_nodes=\"false\""
                    + " generate_empty_nodes=\"true\" allow_early_termination=\"false\""
                    + " early_terminate_optional_fields=\"false\" allow_message_breakup_of_infix_root=\"false\""
                    + " compile_parse_tables=\"false\" standard=\"Flat File\" root_reference=\"OrderFile\" />\r\n"
                    + "      <schemaEditorExtension:schemaInfo namespaceAlias=\"b\""
                    + " extensionClass=\"Microsoft.BizTalk.FlatFileExtension.FlatFileExtension\" standardName=\"Flat"
                    + " File\""
                    + " xmlns:schemaEditorExtension=\"http://schemas.microsoft.com/BizTalk/2003/SchemaEditorExtensions\""
                    + " />\r\n"
                    + "    </xs:appinfo>\r\n"
                    + "  </xs:annotation>\r\n"
                    + "  <xs:element name=\"OrderFile\">\r\n"
                    + "    <xs:annotation>\r\n"
                    + "      <xs:appinfo>\r\n"
                    + "        <b:recordInfo structure=\"delimited\" preserve_delimiter_for_empty_data=\"true\""
                    + " suppress_trailing_delimiters=\"false\" sequence_number=\"1\" />\r\n"
                    + "      </xs:appinfo>\r\n"
                    + "    </xs:annotation>\r\n"
                    + "    <xs:complexType>\r\n"
                    + "      <xs:sequence>\r\n"
                    + "        <xs:annotation>\r\n"
                    + "          <xs:appinfo>\r\n"
                    + "            <b:groupInfo sequence_number=\"0\" />\r\n"
                    + "          </xs:appinfo>\r\n"
                    + "        </xs:annotation>\r\n"
                    + "        <xs:element name=\"Order\">\r\n"
                    + "          <xs:annotation>\r\n"
                    + "            <xs:appinfo>\r\n"
                    + "              <b:recordInfo sequence_number=\"1\" structure=\"delimited\""
                    + " preserve_delimiter_for_empty_data=\"true\" suppress_trailing_delimiters=\"false\""
                    + " child_delimiter_type=\"hex\" child_delimiter=\"0x0D 0x0A\" child_order=\"infix\" />\r\n"
                    + "            </xs:appinfo>\r\n"
                    + "          </xs:annotation>\r\n"
                    + "          <xs:complexType>\r\n"
                    + "            <xs:sequence>\r\n"
                    + "              <xs:annotation>\r\n"
                    + "                <xs:appinfo>\r\n"
                    + "                  <b:groupInfo sequence_number=\"0\" />\r\n"
                    + "                </xs:appinfo>\r\n"
                    + "              </xs:annotation>\r\n"
                    + "              <xs:element name=\"Header\">\r\n"
                    + "                <xs:annotation>\r\n"
                    + "                  <xs:appinfo>\r\n"
                    + "                    <b:recordInfo sequence_number=\"1\" structure=\"delimited\""
                    + " preserve_delimiter_for_empty_data=\"true\" suppress_trailing_delimiters=\"false\""
                    + " child_delimiter_type=\"char\" child_delimiter=\"|\" child_order=\"infix\" tag_name=\"HDR|\""
                    + " />\r\n"
                    + "                  </xs:appinfo>\r\n"
                    + "                </xs:annotation>\r\n"
                    + "                <xs:complexType>\r\n"
                    + "                  <xs:sequence>\r\n"
                    + "                    <xs:annotation>\r\n"
                    + "                      <xs:appinfo>\r\n"
                    + "                        <b:groupInfo sequence_number=\"0\" />\r\n"
                    + "                      </xs:appinfo>\r\n"
                    + "                    </xs:annotation>\r\n"
                    + "                    <xs:element name=\"PODate\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"1\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"PONumber\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo justification=\"left\" sequence_number=\"2\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"CustomerID\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"3\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"CustomerContactName\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"4\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"CustomerContactPhone\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"5\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                  </xs:sequence>\r\n"
                    + "                </xs:complexType>\r\n"
                    + "              </xs:element>\r\n"
                    + "              <xs:element minOccurs=\"1\" maxOccurs=\"unbounded\" name=\"LineItems\">\r\n"
                    + "                <xs:annotation>\r\n"
                    + "                  <xs:appinfo>\r\n"
                    + "                    <b:recordInfo sequence_number=\"2\" structure=\"delimited\""
                    + " preserve_delimiter_for_empty_data=\"true\" suppress_trailing_delimiters=\"false\""
                    + " child_delimiter_type=\"char\" child_delimiter=\"|\" child_order=\"infix\" tag_name=\"DTL|\""
                    + " />\r\n"
                    + "                  </xs:appinfo>\r\n"
                    + "                </xs:annotation>\r\n"
                    + "                <xs:complexType>\r\n"
                    + "                  <xs:sequence>\r\n"
                    + "                    <xs:annotation>\r\n"
                    + "                      <xs:appinfo>\r\n"
                    + "                        <b:groupInfo sequence_number=\"0\" />\r\n"
                    + "                      </xs:appinfo>\r\n"
                    + "                    </xs:annotation>\r\n"
                    + "                    <xs:element name=\"PONumber\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"1\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"ItemOrdered\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"2\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"Quantity\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"3\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"UOM\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"4\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"Price\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"5\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"ExtendedPrice\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"6\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                    <xs:element name=\"Description\" type=\"xs:string\">\r\n"
                    + "                      <xs:annotation>\r\n"
                    + "                        <xs:appinfo>\r\n"
                    + "                          <b:fieldInfo sequence_number=\"7\" justification=\"left\" />\r\n"
                    + "                        </xs:appinfo>\r\n"
                    + "                      </xs:annotation>\r\n"
                    + "                    </xs:element>\r\n"
                    + "                  </xs:sequence>\r\n"
                    + "                </xs:complexType>\r\n"
                    + "              </xs:element>\r\n"
                    + "            </xs:sequence>\r\n"
                    + "          </xs:complexType>\r\n"
                    + "        </xs:element>\r\n"
                    + "      </xs:sequence>\r\n"
                    + "    </xs:complexType>\r\n"
                    + "  </xs:element>\r\n"
                    + "</xs:schema>")
            .withContentType("application/xml")
            .create();
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}

IntegrationAccountSchemas_Delete

/** Samples for IntegrationAccountSchemas Delete. */
public final class IntegrationAccountSchemasDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSchemas_Delete.json
     */
    /**
     * Sample code: Delete a schema by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteASchemaByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountSchemas()
            .deleteWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testSchema", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountSchemas_Get

/** Samples for IntegrationAccountSchemas Get. */
public final class IntegrationAccountSchemasGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSchemas_Get.json
     */
    /**
     * Sample code: Get schema by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getSchemaByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountSchemas()
            .getWithResponse(
                "testResourceGroup", "testIntegrationAccount", "testSchema", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountSchemas_List

/** Samples for IntegrationAccountSchemas List. */
public final class IntegrationAccountSchemasListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSchemas_List.json
     */
    /**
     * Sample code: Get schemas by integration account name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getSchemasByIntegrationAccountName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountSchemas()
            .list("testResourceGroup", "<integrationAccountName>", null, null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountSchemas_ListContentCallbackUrl

import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.resourcemanager.logic.models.KeyType;
import java.time.OffsetDateTime;

/** Samples for IntegrationAccountSchemas ListContentCallbackUrl. */
public final class IntegrationAccountSchemasListContentCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSchemas_ListContentCallbackUrl.json
     */
    /**
     * Sample code: Get the content callback url.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheContentCallbackUrl(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountSchemas()
            .listContentCallbackUrlWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                "testSchema",
                new GetCallbackUrlParameters()
                    .withNotAfter(OffsetDateTime.parse("2018-04-19T16:00:00Z"))
                    .withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountSessions_CreateOrUpdate

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import java.io.IOException;

/** Samples for IntegrationAccountSessions CreateOrUpdate. */
public final class IntegrationAccountSessionsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSessions_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update an integration account session.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAnIntegrationAccountSession(com.azure.resourcemanager.logic.LogicManager manager)
        throws IOException {
        manager
            .integrationAccountSessions()
            .define("testsession123-ICN")
            .withRegion((String) null)
            .withExistingIntegrationAccount("testrg123", "testia123")
            .withContent(
                SerializerFactory
                    .createDefaultManagementSerializerAdapter()
                    .deserialize(
                        "{\"controlNumber\":\"1234\",\"controlNumberChangedTime\":\"2017-02-21T22:30:11.9923759Z\"}",
                        Object.class,
                        SerializerEncoding.JSON))
            .create();
    }
}

IntegrationAccountSessions_Delete

/** Samples for IntegrationAccountSessions Delete. */
public final class IntegrationAccountSessionsDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSessions_Delete.json
     */
    /**
     * Sample code: Delete an integration account session.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAnIntegrationAccountSession(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountSessions()
            .deleteWithResponse("testrg123", "testia123", "testsession123-ICN", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountSessions_Get

/** Samples for IntegrationAccountSessions Get. */
public final class IntegrationAccountSessionsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSessions_Get.json
     */
    /**
     * Sample code: Get an integration account session.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAnIntegrationAccountSession(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountSessions()
            .getWithResponse("testrg123", "testia123", "testsession123-ICN", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccountSessions_List

/** Samples for IntegrationAccountSessions List. */
public final class IntegrationAccountSessionsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccountSessions_List.json
     */
    /**
     * Sample code: Get a list of integration account sessions.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAListOfIntegrationAccountSessions(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccountSessions()
            .list("testrg123", "testia123", null, null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_CreateOrUpdate

import com.azure.resourcemanager.logic.models.IntegrationAccountSku;
import com.azure.resourcemanager.logic.models.IntegrationAccountSkuName;

/** Samples for IntegrationAccounts CreateOrUpdate. */
public final class IntegrationAccountsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update an integration account.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAnIntegrationAccount(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccounts()
            .define("testIntegrationAccount")
            .withRegion("westus")
            .withExistingResourceGroup("testResourceGroup")
            .withSku(new IntegrationAccountSku().withName(IntegrationAccountSkuName.STANDARD))
            .create();
    }
}

IntegrationAccounts_Delete

/** Samples for IntegrationAccounts Delete. */
public final class IntegrationAccountsDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_Delete.json
     */
    /**
     * Sample code: Delete an integration account.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAnIntegrationAccount(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccounts()
            .deleteByResourceGroupWithResponse(
                "testResourceGroup", "testIntegrationAccount", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_GetByResourceGroup

/** Samples for IntegrationAccounts GetByResourceGroup. */
public final class IntegrationAccountsGetByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_Get.json
     */
    /**
     * Sample code: Get integration account by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getIntegrationAccountByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccounts()
            .getByResourceGroupWithResponse(
                "testResourceGroup", "testIntegrationAccount", com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_List

/** Samples for IntegrationAccounts List. */
public final class IntegrationAccountsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_ListBySubscription.json
     */
    /**
     * Sample code: List integration accounts by subscription.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listIntegrationAccountsBySubscription(com.azure.resourcemanager.logic.LogicManager manager) {
        manager.integrationAccounts().list(null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_ListByResourceGroup

/** Samples for IntegrationAccounts ListByResourceGroup. */
public final class IntegrationAccountsListByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_ListByResourceGroup.json
     */
    /**
     * Sample code: List integration accounts by resource group name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listIntegrationAccountsByResourceGroupName(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager.integrationAccounts().listByResourceGroup("testResourceGroup", null, com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_ListCallbackUrl

import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.resourcemanager.logic.models.KeyType;
import java.time.OffsetDateTime;

/** Samples for IntegrationAccounts ListCallbackUrl. */
public final class IntegrationAccountsListCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_ListCallbackUrl.json
     */
    /**
     * Sample code: List IntegrationAccount callback URL.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listIntegrationAccountCallbackURL(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccounts()
            .listCallbackUrlWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                new GetCallbackUrlParameters()
                    .withNotAfter(OffsetDateTime.parse("2017-03-05T08:00:00Z"))
                    .withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_ListKeyVaultKeys

import com.azure.resourcemanager.logic.models.KeyVaultReference;
import com.azure.resourcemanager.logic.models.ListKeyVaultKeysDefinition;

/** Samples for IntegrationAccounts ListKeyVaultKeys. */
public final class IntegrationAccountsListKeyVaultKeysSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_ListKeyVaultKeys.json
     */
    /**
     * Sample code: Get Integration Account callback URL.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getIntegrationAccountCallbackURL(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccounts()
            .listKeyVaultKeys(
                "testResourceGroup",
                "testIntegrationAccount",
                new ListKeyVaultKeysDefinition()
                    .withKeyVault(
                        new KeyVaultReference()
                            .withId(
                                "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testResourceGroup/providers/Microsoft.KeyVault/vaults/testKeyVault"))
                    .withSkipToken("fakeTokenPlaceholder"),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_LogTrackingEvents

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.models.EventLevel;
import com.azure.resourcemanager.logic.models.TrackingEvent;
import com.azure.resourcemanager.logic.models.TrackingEventErrorInfo;
import com.azure.resourcemanager.logic.models.TrackingEventsDefinition;
import com.azure.resourcemanager.logic.models.TrackingRecordType;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.Arrays;

/** Samples for IntegrationAccounts LogTrackingEvents. */
public final class IntegrationAccountsLogTrackingEventsSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_LogTrackingEvents.json
     */
    /**
     * Sample code: Log a tracked event.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void logATrackedEvent(com.azure.resourcemanager.logic.LogicManager manager) throws IOException {
        manager
            .integrationAccounts()
            .logTrackingEventsWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                new TrackingEventsDefinition()
                    .withSourceType("Microsoft.Logic/workflows")
                    .withEvents(
                        Arrays
                            .asList(
                                new TrackingEvent()
                                    .withEventLevel(EventLevel.INFORMATIONAL)
                                    .withEventTime(OffsetDateTime.parse("2016-08-05T01:54:49.505567Z"))
                                    .withRecordType(TrackingRecordType.AS2MESSAGE)
                                    .withRecord(
                                        SerializerFactory
                                            .createDefaultManagementSerializerAdapter()
                                            .deserialize(
                                                "{\"agreementProperties\":{\"agreementName\":\"testAgreement\",\"as2From\":\"testas2from\",\"as2To\":\"testas2to\",\"receiverPartnerName\":\"testPartner2\",\"senderPartnerName\":\"testPartner1\"},\"messageProperties\":{\"IsMessageEncrypted\":false,\"IsMessageSigned\":false,\"correlationMessageId\":\"Unique"
                                                    + " message"
                                                    + " identifier\",\"direction\":\"Receive\",\"dispositionType\":\"received-success\",\"fileName\":\"test\",\"isMdnExpected\":true,\"isMessageCompressed\":false,\"isMessageFailed\":false,\"isNrrEnabled\":true,\"mdnType\":\"Async\",\"messageId\":\"12345\"}}",
                                                Object.class,
                                                SerializerEncoding.JSON))
                                    .withError(
                                        new TrackingEventErrorInfo()
                                            .withMessage("Some error occurred")
                                            .withCode("fakeTokenPlaceholder")))),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_RegenerateAccessKey

import com.azure.resourcemanager.logic.models.KeyType;
import com.azure.resourcemanager.logic.models.RegenerateActionParameter;

/** Samples for IntegrationAccounts RegenerateAccessKey. */
public final class IntegrationAccountsRegenerateAccessKeySamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_RegenerateAccessKey.json
     */
    /**
     * Sample code: Regenerate access key.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void regenerateAccessKey(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationAccounts()
            .regenerateAccessKeyWithResponse(
                "testResourceGroup",
                "testIntegrationAccount",
                new RegenerateActionParameter().withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

IntegrationAccounts_Update

import com.azure.resourcemanager.logic.models.IntegrationAccount;
import com.azure.resourcemanager.logic.models.IntegrationAccountSku;
import com.azure.resourcemanager.logic.models.IntegrationAccountSkuName;

/** Samples for IntegrationAccounts Update. */
public final class IntegrationAccountsUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationAccounts_Update.json
     */
    /**
     * Sample code: Patch an integration account.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void patchAnIntegrationAccount(com.azure.resourcemanager.logic.LogicManager manager) {
        IntegrationAccount resource =
            manager
                .integrationAccounts()
                .getByResourceGroupWithResponse(
                    "testResourceGroup", "testIntegrationAccount", com.azure.core.util.Context.NONE)
                .getValue();
        resource.update().withSku(new IntegrationAccountSku().withName(IntegrationAccountSkuName.STANDARD)).apply();
    }
}

IntegrationServiceEnvironmentManagedApiOperations_List

/** Samples for IntegrationServiceEnvironmentManagedApiOperations List. */
public final class IntegrationServiceEnvironmentManagedApiOperationsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_ManagedApis_ListApiOperations.json
     */
    /**
     * Sample code: Gets the integration service environment managed Apis.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getsTheIntegrationServiceEnvironmentManagedApis(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironmentManagedApiOperations()
            .list(
                "testResourceGroup",
                "testIntegrationServiceEnvironment",
                "servicebus",
                com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironmentManagedApis_Delete

/** Samples for IntegrationServiceEnvironmentManagedApis Delete. */
public final class IntegrationServiceEnvironmentManagedApisDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_ManagedApis_Delete.json
     */
    /**
     * Sample code: Deletes the integration service environment managed Apis.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deletesTheIntegrationServiceEnvironmentManagedApis(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironmentManagedApis()
            .delete(
                "testResourceGroup",
                "testIntegrationServiceEnvironment",
                "servicebus",
                com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironmentManagedApis_Get

/** Samples for IntegrationServiceEnvironmentManagedApis Get. */
public final class IntegrationServiceEnvironmentManagedApisGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_ManagedApis_Get.json
     */
    /**
     * Sample code: Gets the integration service environment managed Apis.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getsTheIntegrationServiceEnvironmentManagedApis(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironmentManagedApis()
            .getWithResponse(
                "testResourceGroup",
                "testIntegrationServiceEnvironment",
                "servicebus",
                com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironmentManagedApis_List

/** Samples for IntegrationServiceEnvironmentManagedApis List. */
public final class IntegrationServiceEnvironmentManagedApisListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_ManagedApis_List.json
     */
    /**
     * Sample code: Gets the integration service environment managed Apis.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getsTheIntegrationServiceEnvironmentManagedApis(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironmentManagedApis()
            .list("testResourceGroup", "testIntegrationServiceEnvironment", com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironmentManagedApis_Put

/** Samples for IntegrationServiceEnvironmentManagedApis Put. */
public final class IntegrationServiceEnvironmentManagedApisPutSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_ManagedApis_Put.json
     */
    /**
     * Sample code: Gets the integration service environment managed Apis.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getsTheIntegrationServiceEnvironmentManagedApis(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironmentManagedApis()
            .define("servicebus")
            .withRegion("brazilsouth")
            .withExistingIntegrationServiceEnvironment("testResourceGroup", "testIntegrationServiceEnvironment")
            .create();
    }
}

IntegrationServiceEnvironmentNetworkHealth_Get

/** Samples for IntegrationServiceEnvironmentNetworkHealth Get. */
public final class IntegrationServiceEnvironmentNetworkHealthGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_NetworkHealth.json
     */
    /**
     * Sample code: Gets the integration service environment network health.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getsTheIntegrationServiceEnvironmentNetworkHealth(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironmentNetworkHealths()
            .getWithResponse(
                "testResourceGroup", "testIntegrationServiceEnvironment", com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironmentSkus_List

/** Samples for IntegrationServiceEnvironmentSkus List. */
public final class IntegrationServiceEnvironmentSkusListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_Skus.json
     */
    /**
     * Sample code: List integration service environment skus.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listIntegrationServiceEnvironmentSkus(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironmentSkus()
            .list("testResourceGroup", "testIntegrationServiceEnvironment", com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironments_CreateOrUpdate

import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmenEncryptionConfiguration;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmenEncryptionKeyReference;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentAccessEndpoint;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentAccessEndpointType;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentProperties;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentSku;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentSkuName;
import com.azure.resourcemanager.logic.models.NetworkConfiguration;
import com.azure.resourcemanager.logic.models.ResourceReference;
import java.util.Arrays;

/** Samples for IntegrationServiceEnvironments CreateOrUpdate. */
public final class IntegrationServiceEnvironmentsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_Put.json
     */
    /**
     * Sample code: Create or update an integration service environment.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAnIntegrationServiceEnvironment(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironments()
            .define("testIntegrationServiceEnvironment")
            .withRegion("brazilsouth")
            .withExistingResourceGroup("testResourceGroup")
            .withProperties(
                new IntegrationServiceEnvironmentProperties()
                    .withNetworkConfiguration(
                        new NetworkConfiguration()
                            .withAccessEndpoint(
                                new IntegrationServiceEnvironmentAccessEndpoint()
                                    .withType(IntegrationServiceEnvironmentAccessEndpointType.INTERNAL))
                            .withSubnets(
                                Arrays
                                    .asList(
                                        new ResourceReference()
                                            .withId(
                                                "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s1"),
                                        new ResourceReference()
                                            .withId(
                                                "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s2"),
                                        new ResourceReference()
                                            .withId(
                                                "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s3"),
                                        new ResourceReference()
                                            .withId(
                                                "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.Network/virtualNetworks/testVNET/subnets/s4"))))
                    .withEncryptionConfiguration(
                        new IntegrationServiceEnvironmenEncryptionConfiguration()
                            .withEncryptionKeyReference(
                                new IntegrationServiceEnvironmenEncryptionKeyReference()
                                    .withKeyVault(
                                        new ResourceReference()
                                            .withId(
                                                "/subscriptions/f34b22a3-2202-4fb1-b040-1332bd928c84/resourceGroups/testResourceGroup/providers/Microsoft.KeyVault/vaults/testKeyVault"))
                                    .withKeyName("fakeTokenPlaceholder")
                                    .withKeyVersion("fakeTokenPlaceholder"))))
            .withSku(
                new IntegrationServiceEnvironmentSku()
                    .withName(IntegrationServiceEnvironmentSkuName.PREMIUM)
                    .withCapacity(2))
            .create();
    }
}

IntegrationServiceEnvironments_Delete

/** Samples for IntegrationServiceEnvironments Delete. */
public final class IntegrationServiceEnvironmentsDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_Delete.json
     */
    /**
     * Sample code: Delete an integration account.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAnIntegrationAccount(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironments()
            .deleteByResourceGroupWithResponse(
                "testResourceGroup", "testIntegrationServiceEnvironment", com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironments_GetByResourceGroup

/** Samples for IntegrationServiceEnvironments GetByResourceGroup. */
public final class IntegrationServiceEnvironmentsGetByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_Get.json
     */
    /**
     * Sample code: Get integration service environment by name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getIntegrationServiceEnvironmentByName(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironments()
            .getByResourceGroupWithResponse(
                "testResourceGroup", "testIntegrationServiceEnvironment", com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironments_List

/** Samples for IntegrationServiceEnvironments List. */
public final class IntegrationServiceEnvironmentsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_ListBySubscription.json
     */
    /**
     * Sample code: List integration service environments by subscription.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listIntegrationServiceEnvironmentsBySubscription(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager.integrationServiceEnvironments().list(null, com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironments_ListByResourceGroup

/** Samples for IntegrationServiceEnvironments ListByResourceGroup. */
public final class IntegrationServiceEnvironmentsListByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_ListByResourceGroup.json
     */
    /**
     * Sample code: List integration service environments by resource group name.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listIntegrationServiceEnvironmentsByResourceGroupName(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironments()
            .listByResourceGroup("testResourceGroup", null, com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironments_Restart

/** Samples for IntegrationServiceEnvironments Restart. */
public final class IntegrationServiceEnvironmentsRestartSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_Restart.json
     */
    /**
     * Sample code: Restarts an integration service environment.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void restartsAnIntegrationServiceEnvironment(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .integrationServiceEnvironments()
            .restartWithResponse(
                "testResourceGroup", "testIntegrationServiceEnvironment", com.azure.core.util.Context.NONE);
    }
}

IntegrationServiceEnvironments_Update

import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironment;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentSku;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentSkuName;
import java.util.HashMap;
import java.util.Map;

/** Samples for IntegrationServiceEnvironments Update. */
public final class IntegrationServiceEnvironmentsUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/IntegrationServiceEnvironments_Patch.json
     */
    /**
     * Sample code: Patch an integration service environment.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void patchAnIntegrationServiceEnvironment(com.azure.resourcemanager.logic.LogicManager manager) {
        IntegrationServiceEnvironment resource =
            manager
                .integrationServiceEnvironments()
                .getByResourceGroupWithResponse(
                    "testResourceGroup", "testIntegrationServiceEnvironment", com.azure.core.util.Context.NONE)
                .getValue();
        resource
            .update()
            .withTags(mapOf("tag1", "value1"))
            .withSku(
                new IntegrationServiceEnvironmentSku()
                    .withName(IntegrationServiceEnvironmentSkuName.DEVELOPER)
                    .withCapacity(0))
            .apply();
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}

Operations_List

/** Samples for Operations List. */
public final class OperationsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Operations_List.json
     */
    /**
     * Sample code: List Microsoft.Logic operations.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listMicrosoftLogicOperations(com.azure.resourcemanager.logic.LogicManager manager) {
        manager.operations().list(com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionRepetitions_Get

/** Samples for WorkflowRunActionRepetitions Get. */
public final class WorkflowRunActionRepetitionsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionRepetitions_Get.json
     */
    /**
     * Sample code: Get a repetition.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getARepetition(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionRepetitions()
            .getWithResponse(
                "testResourceGroup",
                "testFlow",
                "08586776228332053161046300351",
                "testAction",
                "000001",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionRepetitions_List

/** Samples for WorkflowRunActionRepetitions List. */
public final class WorkflowRunActionRepetitionsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionRepetitions_List.json
     */
    /**
     * Sample code: List repetitions.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listRepetitions(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionRepetitions()
            .list(
                "testResourceGroup",
                "testFlow",
                "08586776228332053161046300351",
                "testAction",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionRepetitions_ListExpressionTraces

/** Samples for WorkflowRunActionRepetitions ListExpressionTraces. */
public final class WorkflowRunActionRepetitionsListExpressionTracesSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionRepetitions_ListExpressionTraces.json
     */
    /**
     * Sample code: List expression traces for a repetition.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listExpressionTracesForARepetition(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionRepetitions()
            .listExpressionTraces(
                "testResourceGroup",
                "testFlow",
                "08586776228332053161046300351",
                "testAction",
                "000001",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionRepetitionsRequestHistories_Get

/** Samples for WorkflowRunActionRepetitionsRequestHistories Get. */
public final class WorkflowRunActionRepetitionsRequestHistoriesGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionRepetitionsRequestHistories_Get.json
     */
    /**
     * Sample code: Get a repetition request history.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getARepetitionRequestHistory(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionRepetitionsRequestHistories()
            .getWithResponse(
                "test-resource-group",
                "test-workflow",
                "08586776228332053161046300351",
                "HTTP_Webhook",
                "000001",
                "08586611142732800686",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionRepetitionsRequestHistories_List

/** Samples for WorkflowRunActionRepetitionsRequestHistories List. */
public final class WorkflowRunActionRepetitionsRequestHistoriesListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionRepetitionsRequestHistories_List.json
     */
    /**
     * Sample code: List repetition request history.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listRepetitionRequestHistory(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionRepetitionsRequestHistories()
            .list(
                "test-resource-group",
                "test-workflow",
                "08586776228332053161046300351",
                "HTTP_Webhook",
                "000001",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionRequestHistories_Get

/** Samples for WorkflowRunActionRequestHistories Get. */
public final class WorkflowRunActionRequestHistoriesGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionRequestHistories_Get.json
     */
    /**
     * Sample code: Get a request history.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getARequestHistory(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionRequestHistories()
            .getWithResponse(
                "test-resource-group",
                "test-workflow",
                "08586776228332053161046300351",
                "HTTP_Webhook",
                "08586611142732800686",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionRequestHistories_List

/** Samples for WorkflowRunActionRequestHistories List. */
public final class WorkflowRunActionRequestHistoriesListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionRequestHistories_List.json
     */
    /**
     * Sample code: List a request history.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listARequestHistory(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionRequestHistories()
            .list(
                "test-resource-group",
                "test-workflow",
                "08586776228332053161046300351",
                "HTTP_Webhook",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionScopeRepetitions_Get

/** Samples for WorkflowRunActionScopeRepetitions Get. */
public final class WorkflowRunActionScopeRepetitionsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionScopeRepetitions_Get.json
     */
    /**
     * Sample code: Get a scoped repetition.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAScopedRepetition(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionScopeRepetitions()
            .getWithResponse(
                "testResourceGroup",
                "testFlow",
                "08586776228332053161046300351",
                "for_each",
                "000000",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActionScopeRepetitions_List

/** Samples for WorkflowRunActionScopeRepetitions List. */
public final class WorkflowRunActionScopeRepetitionsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActionScopeRepetitions_List.json
     */
    /**
     * Sample code: List the scoped repetitions.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listTheScopedRepetitions(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActionScopeRepetitions()
            .list(
                "testResourceGroup",
                "testFlow",
                "08586776228332053161046300351",
                "for_each",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActions_Get

/** Samples for WorkflowRunActions Get. */
public final class WorkflowRunActionsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActions_Get.json
     */
    /**
     * Sample code: Get a workflow run action.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAWorkflowRunAction(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActions()
            .getWithResponse(
                "test-resource-group",
                "test-workflow",
                "08586676746934337772206998657CU22",
                "HTTP",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActions_List

/** Samples for WorkflowRunActions List. */
public final class WorkflowRunActionsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActions_List.json
     */
    /**
     * Sample code: List a workflow run actions.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listAWorkflowRunActions(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActions()
            .list(
                "test-resource-group",
                "test-workflow",
                "08586676746934337772206998657CU22",
                null,
                null,
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunActions_ListExpressionTraces

/** Samples for WorkflowRunActions ListExpressionTraces. */
public final class WorkflowRunActionsListExpressionTracesSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunActions_ListExpressionTraces.json
     */
    /**
     * Sample code: List expression traces.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listExpressionTraces(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunActions()
            .listExpressionTraces(
                "testResourceGroup",
                "testFlow",
                "08586776228332053161046300351",
                "testAction",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRunOperations_Get

/** Samples for WorkflowRunOperations Get. */
public final class WorkflowRunOperationsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRunOperations_Get.json
     */
    /**
     * Sample code: Get a run operation.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getARunOperation(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRunOperations()
            .getWithResponse(
                "testResourceGroup",
                "testFlow",
                "08586774142730039209110422528",
                "ebdcbbde-c4db-43ec-987c-fd0f7726f43b",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRuns_Cancel

/** Samples for WorkflowRuns Cancel. */
public final class WorkflowRunsCancelSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRuns_Cancel.json
     */
    /**
     * Sample code: Cancel a workflow run.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void cancelAWorkflowRun(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRuns()
            .cancelWithResponse(
                "test-resource-group",
                "test-workflow",
                "08586676746934337772206998657CU22",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRuns_Get

/** Samples for WorkflowRuns Get. */
public final class WorkflowRunsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRuns_Get.json
     */
    /**
     * Sample code: Get a run for a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getARunForAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRuns()
            .getWithResponse(
                "test-resource-group",
                "test-workflow",
                "08586676746934337772206998657CU22",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowRuns_List

/** Samples for WorkflowRuns List. */
public final class WorkflowRunsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowRuns_List.json
     */
    /**
     * Sample code: List workflow runs.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listWorkflowRuns(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowRuns()
            .list("test-resource-group", "test-workflow", null, null, com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggerHistories_Get

/** Samples for WorkflowTriggerHistories Get. */
public final class WorkflowTriggerHistoriesGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggerHistories_Get.json
     */
    /**
     * Sample code: Get a workflow trigger history.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAWorkflowTriggerHistory(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggerHistories()
            .getWithResponse(
                "testResourceGroup",
                "testWorkflowName",
                "testTriggerName",
                "08586676746934337772206998657CU22",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggerHistories_List

/** Samples for WorkflowTriggerHistories List. */
public final class WorkflowTriggerHistoriesListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggerHistories_List.json
     */
    /**
     * Sample code: List a workflow trigger history.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listAWorkflowTriggerHistory(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggerHistories()
            .list(
                "testResourceGroup",
                "testWorkflowName",
                "testTriggerName",
                null,
                null,
                com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggerHistories_Resubmit

/** Samples for WorkflowTriggerHistories Resubmit. */
public final class WorkflowTriggerHistoriesResubmitSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggerHistories_Resubmit.json
     */
    /**
     * Sample code: Resubmit a workflow run based on the trigger history.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void resubmitAWorkflowRunBasedOnTheTriggerHistory(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggerHistories()
            .resubmitWithResponse(
                "testResourceGroup",
                "testWorkflowName",
                "testTriggerName",
                "testHistoryName",
                com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggers_Get

/** Samples for WorkflowTriggers Get. */
public final class WorkflowTriggersGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggers_Get.json
     */
    /**
     * Sample code: Get a workflow trigger.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAWorkflowTrigger(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggers()
            .getWithResponse("test-resource-group", "test-workflow", "manual", com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggers_GetSchemaJson

/** Samples for WorkflowTriggers GetSchemaJson. */
public final class WorkflowTriggersGetSchemaJsonSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggers_GetSchemaJson.json
     */
    /**
     * Sample code: Get trigger schema.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTriggerSchema(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggers()
            .getSchemaJsonWithResponse(
                "testResourceGroup", "testWorkflow", "testTrigger", com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggers_List

/** Samples for WorkflowTriggers List. */
public final class WorkflowTriggersListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggers_List.json
     */
    /**
     * Sample code: List workflow triggers.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listWorkflowTriggers(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggers()
            .list("test-resource-group", "test-workflow", null, null, com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggers_ListCallbackUrl

/** Samples for WorkflowTriggers ListCallbackUrl. */
public final class WorkflowTriggersListCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggers_ListCallbackUrl.json
     */
    /**
     * Sample code: Get the callback URL for a trigger.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheCallbackURLForATrigger(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggers()
            .listCallbackUrlWithResponse(
                "test-resource-group", "test-workflow", "manual", com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggers_Reset

/** Samples for WorkflowTriggers Reset. */
public final class WorkflowTriggersResetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggers_Reset.json
     */
    /**
     * Sample code: Reset trigger.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void resetTrigger(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggers()
            .resetWithResponse("testResourceGroup", "testWorkflow", "testTrigger", com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggers_Run

/** Samples for WorkflowTriggers Run. */
public final class WorkflowTriggersRunSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggers_Run.json
     */
    /**
     * Sample code: Run a workflow trigger.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void runAWorkflowTrigger(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggers()
            .runWithResponse("test-resource-group", "test-workflow", "manual", com.azure.core.util.Context.NONE);
    }
}

WorkflowTriggers_SetState

import com.azure.resourcemanager.logic.models.SetTriggerStateActionDefinition;
import com.azure.resourcemanager.logic.models.WorkflowTriggerReference;

/** Samples for WorkflowTriggers SetState. */
public final class WorkflowTriggersSetStateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowTriggers_SetState.json
     */
    /**
     * Sample code: Set trigger state.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void setTriggerState(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowTriggers()
            .setStateWithResponse(
                "testResourceGroup",
                "testWorkflow",
                "testTrigger",
                new SetTriggerStateActionDefinition()
                    .withSource(
                        new WorkflowTriggerReference()
                            .withId(
                                "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/sourceResGroup/providers/Microsoft.Logic/workflows/sourceWorkflow/triggers/sourceTrigger")),
                com.azure.core.util.Context.NONE);
    }
}

WorkflowVersionTriggers_ListCallbackUrl

import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.resourcemanager.logic.models.KeyType;
import java.time.OffsetDateTime;

/** Samples for WorkflowVersionTriggers ListCallbackUrl. */
public final class WorkflowVersionTriggersListCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowVersionTriggers_ListCallbackUrl.json
     */
    /**
     * Sample code: Get the callback url for a trigger of a workflow version.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheCallbackUrlForATriggerOfAWorkflowVersion(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowVersionTriggers()
            .listCallbackUrlWithResponse(
                "testResourceGroup",
                "testWorkflowName",
                "testWorkflowVersionId",
                "testTriggerName",
                new GetCallbackUrlParameters()
                    .withNotAfter(OffsetDateTime.parse("2017-03-05T08:00:00Z"))
                    .withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

WorkflowVersions_Get

/** Samples for WorkflowVersions Get. */
public final class WorkflowVersionsGetSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowVersions_Get.json
     */
    /**
     * Sample code: Get a workflow version.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAWorkflowVersion(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflowVersions()
            .getWithResponse(
                "test-resource-group", "test-workflow", "08586676824806722526", com.azure.core.util.Context.NONE);
    }
}

WorkflowVersions_List

/** Samples for WorkflowVersions List. */
public final class WorkflowVersionsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/WorkflowVersions_List.json
     */
    /**
     * Sample code: List a workflows versions.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listAWorkflowsVersions(com.azure.resourcemanager.logic.LogicManager manager) {
        manager.workflowVersions().list("test-resource-group", "test-workflow", null, com.azure.core.util.Context.NONE);
    }
}

Workflows_CreateOrUpdate

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.models.ResourceReference;
import com.azure.resourcemanager.logic.models.WorkflowParameter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/** Samples for Workflows CreateOrUpdate. */
public final class WorkflowsCreateOrUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_CreateOrUpdate.json
     */
    /**
     * Sample code: Create or update a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void createOrUpdateAWorkflow(com.azure.resourcemanager.logic.LogicManager manager)
        throws IOException {
        manager
            .workflows()
            .define("test-workflow")
            .withRegion("brazilsouth")
            .withExistingResourceGroup("test-resource-group")
            .withTags(mapOf())
            .withIntegrationAccount(
                new ResourceReference()
                    .withId(
                        "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account"))
            .withDefinition(
                SerializerFactory
                    .createDefaultManagementSerializerAdapter()
                    .deserialize(
                        "{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"actions\":{\"Find_pet_by_ID\":{\"type\":\"ApiConnection\",\"inputs\":{\"path\":\"/pet/@{encodeURIComponent('1')}\",\"method\":\"get\",\"host\":{\"connection\":{\"name\":\"@parameters('$connections')['test-custom-connector']['connectionId']\"}}},\"runAfter\":{}}},\"contentVersion\":\"1.0.0.0\",\"outputs\":{},\"parameters\":{\"$connections\":{\"type\":\"Object\",\"defaultValue\":{}}},\"triggers\":{\"manual\":{\"type\":\"Request\",\"inputs\":{\"schema\":{}},\"kind\":\"Http\"}}}",
                        Object.class,
                        SerializerEncoding.JSON))
            .withParameters(
                mapOf(
                    "$connections",
                    new WorkflowParameter()
                        .withValue(
                            SerializerFactory
                                .createDefaultManagementSerializerAdapter()
                                .deserialize(
                                    "{\"test-custom-connector\":{\"connectionId\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Web/connections/test-custom-connector\",\"connectionName\":\"test-custom-connector\",\"id\":\"/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/providers/Microsoft.Web/locations/brazilsouth/managedApis/test-custom-connector\"}}",
                                    Object.class,
                                    SerializerEncoding.JSON))))
            .create();
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}

Workflows_Delete

/** Samples for Workflows Delete. */
public final class WorkflowsDeleteSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_Delete.json
     */
    /**
     * Sample code: Delete a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void deleteAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .deleteByResourceGroupWithResponse(
                "test-resource-group", "test-workflow", com.azure.core.util.Context.NONE);
    }
}

Workflows_Disable

/** Samples for Workflows Disable. */
public final class WorkflowsDisableSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_Disable.json
     */
    /**
     * Sample code: Disable a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void disableAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .disableWithResponse("test-resource-group", "test-workflow", com.azure.core.util.Context.NONE);
    }
}

Workflows_Enable

/** Samples for Workflows Enable. */
public final class WorkflowsEnableSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_Enable.json
     */
    /**
     * Sample code: Enable a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void enableAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .enableWithResponse("test-resource-group", "test-workflow", com.azure.core.util.Context.NONE);
    }
}

Workflows_GenerateUpgradedDefinition

import com.azure.resourcemanager.logic.models.GenerateUpgradedDefinitionParameters;

/** Samples for Workflows GenerateUpgradedDefinition. */
public final class WorkflowsGenerateUpgradedDefinitionSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_GenerateUpgradedDefinition.json
     */
    /**
     * Sample code: Generate an upgraded definition.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void generateAnUpgradedDefinition(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .generateUpgradedDefinitionWithResponse(
                "test-resource-group",
                "test-workflow",
                new GenerateUpgradedDefinitionParameters().withTargetSchemaVersion("2016-06-01"),
                com.azure.core.util.Context.NONE);
    }
}

Workflows_GetByResourceGroup

/** Samples for Workflows GetByResourceGroup. */
public final class WorkflowsGetByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_Get.json
     */
    /**
     * Sample code: Get a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .getByResourceGroupWithResponse("test-resource-group", "test-workflow", com.azure.core.util.Context.NONE);
    }
}

Workflows_List

/** Samples for Workflows List. */
public final class WorkflowsListSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_ListBySubscription.json
     */
    /**
     * Sample code: List all workflows in a subscription.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listAllWorkflowsInASubscription(com.azure.resourcemanager.logic.LogicManager manager) {
        manager.workflows().list(null, null, com.azure.core.util.Context.NONE);
    }
}

Workflows_ListByResourceGroup

/** Samples for Workflows ListByResourceGroup. */
public final class WorkflowsListByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_ListByResourceGroup.json
     */
    /**
     * Sample code: List all workflows in a resource group.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void listAllWorkflowsInAResourceGroup(com.azure.resourcemanager.logic.LogicManager manager) {
        manager.workflows().listByResourceGroup("test-resource-group", null, null, com.azure.core.util.Context.NONE);
    }
}

Workflows_ListCallbackUrl

import com.azure.resourcemanager.logic.models.GetCallbackUrlParameters;
import com.azure.resourcemanager.logic.models.KeyType;
import java.time.OffsetDateTime;

/** Samples for Workflows ListCallbackUrl. */
public final class WorkflowsListCallbackUrlSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_ListCallbackUrl.json
     */
    /**
     * Sample code: Get callback url.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getCallbackUrl(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .listCallbackUrlWithResponse(
                "testResourceGroup",
                "testWorkflow",
                new GetCallbackUrlParameters()
                    .withNotAfter(OffsetDateTime.parse("2018-04-19T16:00:00Z"))
                    .withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

Workflows_ListSwagger

/** Samples for Workflows ListSwagger. */
public final class WorkflowsListSwaggerSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_ListSwagger.json
     */
    /**
     * Sample code: Get the swagger for a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void getTheSwaggerForAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .listSwaggerWithResponse("testResourceGroup", "testWorkflowName", com.azure.core.util.Context.NONE);
    }
}

Workflows_Move

import com.azure.resourcemanager.logic.models.WorkflowReference;

/** Samples for Workflows Move. */
public final class WorkflowsMoveSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_Move.json
     */
    /**
     * Sample code: Move a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void moveAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .move(
                "testResourceGroup",
                "testWorkflow",
                new WorkflowReference()
                    .withId(
                        "subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/newResourceGroup/providers/Microsoft.Logic/workflows/newWorkflowName"),
                com.azure.core.util.Context.NONE);
    }
}

Workflows_RegenerateAccessKey

import com.azure.resourcemanager.logic.models.KeyType;
import com.azure.resourcemanager.logic.models.RegenerateActionParameter;

/** Samples for Workflows RegenerateAccessKey. */
public final class WorkflowsRegenerateAccessKeySamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_RegenerateAccessKey.json
     */
    /**
     * Sample code: Regenerate the callback URL access key for request triggers.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void regenerateTheCallbackURLAccessKeyForRequestTriggers(
        com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .regenerateAccessKeyWithResponse(
                "testResourceGroup",
                "testWorkflowName",
                new RegenerateActionParameter().withKeyType(KeyType.PRIMARY),
                com.azure.core.util.Context.NONE);
    }
}

Workflows_Update

/** Samples for Workflows Update. */
public final class WorkflowsUpdateSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_Update.json
     */
    /**
     * Sample code: Patch a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void patchAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) {
        manager
            .workflows()
            .updateWithResponse("test-resource-group", "test-workflow", com.azure.core.util.Context.NONE);
    }
}

Workflows_ValidateByLocation

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.fluent.models.WorkflowInner;
import com.azure.resourcemanager.logic.models.ResourceReference;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/** Samples for Workflows ValidateByLocation. */
public final class WorkflowsValidateByLocationSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_ValidateByLocation.json
     */
    /**
     * Sample code: Validate a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void validateAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) throws IOException {
        manager
            .workflows()
            .validateByLocationWithResponse(
                "test-resource-group",
                "brazilsouth",
                "test-workflow",
                new WorkflowInner()
                    .withLocation("brazilsouth")
                    .withTags(mapOf())
                    .withIntegrationAccount(
                        new ResourceReference()
                            .withId(
                                "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account"))
                    .withDefinition(
                        SerializerFactory
                            .createDefaultManagementSerializerAdapter()
                            .deserialize(
                                "{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"actions\":{},\"contentVersion\":\"1.0.0.0\",\"outputs\":{},\"parameters\":{},\"triggers\":{}}",
                                Object.class,
                                SerializerEncoding.JSON)),
                com.azure.core.util.Context.NONE);
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}

Workflows_ValidateByResourceGroup

import com.azure.core.management.serializer.SerializerFactory;
import com.azure.core.util.serializer.SerializerEncoding;
import com.azure.resourcemanager.logic.fluent.models.WorkflowInner;
import com.azure.resourcemanager.logic.models.ResourceReference;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

/** Samples for Workflows ValidateByResourceGroup. */
public final class WorkflowsValidateByResourceGroupSamples {
    /*
     * x-ms-original-file: specification/logic/resource-manager/Microsoft.Logic/stable/2019-05-01/examples/Workflows_ValidateByResourceGroup.json
     */
    /**
     * Sample code: Validate a workflow.
     *
     * @param manager Entry point to LogicManager.
     */
    public static void validateAWorkflow(com.azure.resourcemanager.logic.LogicManager manager) throws IOException {
        manager
            .workflows()
            .validateByResourceGroupWithResponse(
                "test-resource-group",
                "test-workflow",
                new WorkflowInner()
                    .withLocation("brazilsouth")
                    .withTags(mapOf())
                    .withIntegrationAccount(
                        new ResourceReference()
                            .withId(
                                "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/test-resource-group/providers/Microsoft.Logic/integrationAccounts/test-integration-account"))
                    .withDefinition(
                        SerializerFactory
                            .createDefaultManagementSerializerAdapter()
                            .deserialize(
                                "{\"$schema\":\"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#\",\"actions\":{},\"contentVersion\":\"1.0.0.0\",\"outputs\":{},\"parameters\":{},\"triggers\":{}}",
                                Object.class,
                                SerializerEncoding.JSON)),
                com.azure.core.util.Context.NONE);
    }

    @SuppressWarnings("unchecked")
    private static <T> Map<String, T> mapOf(Object... inputs) {
        Map<String, T> map = new HashMap<>();
        for (int i = 0; i < inputs.length; i += 2) {
            String key = (String) inputs[i];
            T value = (T) inputs[i + 1];
            map.put(key, value);
        }
        return map;
    }
}