// This is an automatically generated code sample.
// To make this code sample work in your Oracle Cloud tenancy,
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
// boolean, number, and enum parameters with values not fitting your use case).

import * as loganalytics from "oci-loganalytics";
import common = require("oci-common");

// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.

const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();

(async () => {
  try {
    // Create a service client
    const client = new loganalytics.LogAnalyticsClient({ authenticationDetailsProvider: provider });

    // Create a request and dependent object(s).
    const upsertLogAnalyticsParserDetails = {
      content: "EXAMPLE-content-Value",
      description: "EXAMPLE-description-Value",
      displayName: "EXAMPLE-displayName-Value",
      editVersion: 737,
      encoding: "EXAMPLE-encoding-Value",
      exampleContent: "EXAMPLE-exampleContent-Value",
      fieldMaps: [
        {
          field: {
            ceeAlias: "EXAMPLE-ceeAlias-Value",
            dataType: "EXAMPLE-dataType-Value",
            regularExpression: "EXAMPLE-regularExpression-Value",
            description: "EXAMPLE-description-Value",
            displayName: "EXAMPLE-displayName-Value",
            editVersion: 293,
            facetPriority: 891,
            name: "EXAMPLE-name-Value",
            isFacetEligible: true,
            isHighCardinality: false,
            isLargeData: false,
            isMultiValued: true,
            isPrimary: false,
            isSystem: true,
            isSummarizable: true,
            mappedValue: "EXAMPLE-mappedValue-Value",
            isMetricKeyEligible: false,
            isMetricValueEligible: false,
            rangeFacetEligible: 888,
            isTableEligible: false,
            unitType: "EXAMPLE-unitType-Value"
          },
          parserFieldId: 961,
          parserFieldExpression: "EXAMPLE-parserFieldExpression-Value",
          parserFieldName: "EXAMPLE-parserFieldName-Value",
          storageFieldName: "EXAMPLE-storageFieldName-Value",
          parserFieldIntegratorName: "EXAMPLE-parserFieldIntegratorName-Value",
          parserName: "EXAMPLE-parserName-Value",
          parserFieldSequence: 578,
          parser: {
            content: "EXAMPLE-content-Value",
            description: "EXAMPLE-description-Value",
            displayName: "EXAMPLE-displayName-Value",
            editVersion: 5,
            encoding: "EXAMPLE-encoding-Value",
            exampleContent: "EXAMPLE-exampleContent-Value",
            footerContent: "EXAMPLE-footerContent-Value",
            headerContent: "EXAMPLE-headerContent-Value",
            name: "EXAMPLE-name-Value",
            isDefault: false,
            isSingleLineContent: false,
            isSystem: true,
            language: "EXAMPLE-language-Value",
            timeUpdated: new Date("Tue Sep 23 06:14:04 UTC 2008"),
            logTypeTestRequestVersion: 306,
            parserIgnorelineCharacters: "EXAMPLE-parserIgnorelineCharacters-Value",
            isHidden: true,
            parserSequence: 543,
            parserTimezone: "EXAMPLE-parserTimezone-Value",
            parserFilter: {
              id: "ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
              agentVersion: "EXAMPLE-agentVersion-Value",
              isInUse: 759,
              operatingSystem: "EXAMPLE-operatingSystem-Value",
              parserId: 847,
              version: "EXAMPLE-version-Value"
            },
            isParserWrittenOnce: false,
            parserFunctions: [
              {
                parserMetaPlugin: {
                  metaPluginParameters: [
                    {
                      description: "EXAMPLE-description-Value",
                      name: "EXAMPLE-name-Value",
                      isMandatory: false,
                      isRepeatable: false,
                      pluginName: "EXAMPLE-pluginName-Value",
                      type: "EXAMPLE-type-Value"
                    }
                  ],
                  description: "EXAMPLE-description-Value",
                  displayName: "EXAMPLE-displayName-Value",
                  name: "EXAMPLE-name-Value"
                },
                parserFunctionId: 14,
                parserFunctionName: "EXAMPLE-parserFunctionName-Value",
                isEnabled: true,
                isSystem: true,
                parserId: 865,
                parserName: "EXAMPLE-parserName-Value",
                parserMetaPluginName: "EXAMPLE-parserMetaPluginName-Value",
                parserFunctionPriority: 53,
                parserFunctionParameters: [
                  {
                    parserFunctionId: 945,
                    parserFunctionParameterName: "EXAMPLE-parserFunctionParameterName-Value",
                    parserFunctionParameterId: 228,
                    parserMetaPluginParameterName: "EXAMPLE-parserMetaPluginParameterName-Value",
                    parserMetaPluginParameterValue: "EXAMPLE-parserMetaPluginParameterValue-Value",
                    parserName: "EXAMPLE-parserName-Value",
                    parserMetaPluginParameter: {
                      description: "EXAMPLE-description-Value",
                      name: "EXAMPLE-name-Value",
                      isMandatory: true,
                      isRepeatable: true,
                      pluginName: "EXAMPLE-pluginName-Value",
                      type: "EXAMPLE-type-Value"
                    }
                  }
                ]
              }
            ],
            sourcesCount: 640,
            sources: [
              {
                labelConditions: [
                  {
                    conditionString: "EXAMPLE-conditionString-Value",
                    conditionBlock: {
                      conditionBlocksOperator:
                        loganalytics.models.ConditionBlock.ConditionBlocksOperator.And,
                      fieldName: "EXAMPLE-fieldName-Value",
                      labelConditionOperator: "EXAMPLE-labelConditionOperator-Value",
                      labelConditionValue: "EXAMPLE-labelConditionValue-Value",
                      labelConditionValues: ["EXAMPLE--Value"]
                    },
                    message: "EXAMPLE-message-Value",
                    isVisible: true,
                    blockConditionField: "EXAMPLE-blockConditionField-Value",
                    blockConditionOperator: "EXAMPLE-blockConditionOperator-Value",
                    blockConditionValue: "EXAMPLE-blockConditionValue-Value",
                    labelConditionValue: "EXAMPLE-labelConditionValue-Value",
                    labelConditionValues: ["EXAMPLE--Value"],
                    contentExample: "EXAMPLE-contentExample-Value",
                    isEnabled: false,
                    fieldName: "EXAMPLE-fieldName-Value",
                    labelConditionId: 529,
                    isSystem: true,
                    labelConditionOperator: "EXAMPLE-labelConditionOperator-Value",
                    sourceId: 901,
                    labelDisplayName: "EXAMPLE-labelDisplayName-Value",
                    storageField: "EXAMPLE-storageField-Value",
                    labelName: "EXAMPLE-labelName-Value",
                    isInlineLabelExistingInDatabase: true
                  }
                ],
                associationCount: 817,
                associationEntity: [
                  {
                    failureMessage: "EXAMPLE-failureMessage-Value",
                    agentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-agentId-Value",
                    timeLastAttempted: new Date("Wed Aug 23 16:56:03 UTC 2028"),
                    retryCount: 795,
                    sourceName: "EXAMPLE-sourceName-Value",
                    sourceDisplayName: "EXAMPLE-sourceDisplayName-Value",
                    sourceTypeName: "EXAMPLE-sourceTypeName-Value",
                    lifeCycleState:
                      loganalytics.models.LogAnalyticsAssociation.LifeCycleState.InProgress,
                    entityId: "ocid1.test.oc1..<unique_ID>EXAMPLE-entityId-Value",
                    entityName: "EXAMPLE-entityName-Value",
                    entityTypeName: "EXAMPLE-entityTypeName-Value",
                    host: "EXAMPLE-host-Value",
                    agentEntityName: "EXAMPLE-agentEntityName-Value",
                    entityTypeDisplayName: "EXAMPLE-entityTypeDisplayName-Value",
                    logGroupId: "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
                    logGroupName: "EXAMPLE-logGroupName-Value",
                    logGroupCompartment: "EXAMPLE-logGroupCompartment-Value",
                    associationProperties: [
                      {
                        name: "EXAMPLE-name-Value",
                        value: "EXAMPLE-value-Value",
                        patterns: [
                          {
                            id: "ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
                            value: "EXAMPLE-value-Value",
                            effectiveLevel: "EXAMPLE-effectiveLevel-Value"
                          }
                        ]
                      }
                    ]
                  }
                ],
                dataFilterDefinitions: [
                  {
                    description: "EXAMPLE-description-Value",
                    displayName: "EXAMPLE-displayName-Value",
                    editVersion: 448,
                    isEnabled: true,
                    fieldName: "EXAMPLE-fieldName-Value",
                    hashType: 50,
                    dataFilterId: 506,
                    isSystem: false,
                    matchRegularExpression: "EXAMPLE-matchRegularExpression-Value",
                    order: 239,
                    path: "EXAMPLE-path-Value",
                    replacementString: "EXAMPLE-replacementString-Value",
                    sourceId: 715,
                    filterType:
                      loganalytics.models.LogAnalyticsSourceDataFilter.FilterType.DropString
                  }
                ],
                databaseCredential: "EXAMPLE-databaseCredential-Value",
                extendedFieldDefinitions: [
                  {
                    field: {
                      ceeAlias: "EXAMPLE-ceeAlias-Value",
                      dataType: "EXAMPLE-dataType-Value",
                      regularExpression: "EXAMPLE-regularExpression-Value",
                      description: "EXAMPLE-description-Value",
                      displayName: "EXAMPLE-displayName-Value",
                      editVersion: 362,
                      facetPriority: 353,
                      name: "EXAMPLE-name-Value",
                      isFacetEligible: false,
                      isHighCardinality: true,
                      isLargeData: true,
                      isMultiValued: true,
                      isPrimary: false,
                      isSystem: true,
                      isSummarizable: false,
                      mappedValue: "EXAMPLE-mappedValue-Value",
                      isMetricKeyEligible: true,
                      isMetricValueEligible: false,
                      rangeFacetEligible: 132,
                      isTableEligible: false,
                      unitType: "EXAMPLE-unitType-Value"
                    },
                    displayRegularExpression: "EXAMPLE-displayRegularExpression-Value",
                    extendedFields: [
                      {
                        field: {
                          ceeAlias: "EXAMPLE-ceeAlias-Value",
                          dataType: "EXAMPLE-dataType-Value",
                          regularExpression: "EXAMPLE-regularExpression-Value",
                          description: "EXAMPLE-description-Value",
                          displayName: "EXAMPLE-displayName-Value",
                          editVersion: 434,
                          facetPriority: 880,
                          name: "EXAMPLE-name-Value",
                          isFacetEligible: true,
                          isHighCardinality: false,
                          isLargeData: false,
                          isMultiValued: true,
                          isPrimary: true,
                          isSystem: false,
                          isSummarizable: false,
                          mappedValue: "EXAMPLE-mappedValue-Value",
                          isMetricKeyEligible: true,
                          isMetricValueEligible: true,
                          rangeFacetEligible: 245,
                          isTableEligible: true,
                          unitType: "EXAMPLE-unitType-Value"
                        },
                        extendedFieldDefinitionId: 198,
                        fieldName: "EXAMPLE-fieldName-Value",
                        fieldDisplayName: "EXAMPLE-fieldDisplayName-Value",
                        savedRegularExpressionName: "EXAMPLE-savedRegularExpressionName-Value",
                        extendedFieldId: 499
                      }
                    ],
                    baseFieldName: "EXAMPLE-baseFieldName-Value",
                    baseFieldLogText: "EXAMPLE-baseFieldLogText-Value",
                    conditionDataType: "EXAMPLE-conditionDataType-Value",
                    conditionField: "EXAMPLE-conditionField-Value",
                    conditionOperator: "EXAMPLE-conditionOperator-Value",
                    conditionValue: "EXAMPLE-conditionValue-Value",
                    convertedRegularExpression: "EXAMPLE-convertedRegularExpression-Value",
                    isEnabled: false,
                    extendedFieldDefinitionId: 228,
                    isSystem: false,
                    regularExpression: "EXAMPLE-regularExpression-Value",
                    sourceId: 358,
                    timeUpdated: new Date("Tue Jul 23 13:03:20 UTC 2013")
                  }
                ],
                isForCloud: false,
                labels: [
                  {
                    aliases: [
                      {
                        alias: "EXAMPLE-alias-Value",
                        aliasDisplayName: "EXAMPLE-aliasDisplayName-Value",
                        isSystem: true,
                        displayName: "EXAMPLE-displayName-Value",
                        name: "EXAMPLE-name-Value",
                        priority: loganalytics.models.LogAnalyticsLabelAlias.Priority.High
                      }
                    ],
                    countUsageInAlertRule: 374,
                    countUsageInSource: 432,
                    id: "EXAMPLE-id-Value",
                    suggestType: 782,
                    description: "EXAMPLE-description-Value",
                    displayName: "EXAMPLE-displayName-Value",
                    editVersion: 745,
                    impact: "EXAMPLE-impact-Value",
                    isSystem: false,
                    name: "EXAMPLE-name-Value",
                    priority: loganalytics.models.LogAnalyticsLabelView.Priority.High,
                    recommendation: "EXAMPLE-recommendation-Value",
                    type: 93,
                    isUserDeleted: false
                  }
                ],
                metricDefinitions: [
                  {
                    aggregationField: "EXAMPLE-aggregationField-Value",
                    bucketMetadata: "EXAMPLE-bucketMetadata-Value",
                    clockPeriod: "EXAMPLE-clockPeriod-Value",
                    description: "EXAMPLE-description-Value",
                    editVersion: 527,
                    fieldName: "EXAMPLE-fieldName-Value",
                    fieldValues: ["EXAMPLE--Value"],
                    groupingField: "EXAMPLE-groupingField-Value",
                    isEnabled: true,
                    isSystem: true,
                    displayName: "EXAMPLE-displayName-Value",
                    metricReference: 528,
                    name: "EXAMPLE-name-Value",
                    metricType: loganalytics.models.LogAnalyticsMetric.MetricType.SumDistribution,
                    isMetricSourceEnabled: true,
                    operator: loganalytics.models.LogAnalyticsMetric.Operator.NotNull,
                    entityType: "EXAMPLE-entityType-Value",
                    timeUpdated: new Date("Mon Sep 20 08:04:02 UTC 2032"),
                    unitType: "EXAMPLE-unitType-Value",
                    isUserCustomized: false
                  }
                ],
                metrics: [
                  {
                    isMetricSourceEnabled: true,
                    metricName: "EXAMPLE-metricName-Value",
                    sourceName: "EXAMPLE-sourceName-Value",
                    entityType: "EXAMPLE-entityType-Value"
                  }
                ],
                parameters: [
                  {
                    defaultValue: "EXAMPLE-defaultValue-Value",
                    description: "EXAMPLE-description-Value",
                    isActive: true,
                    name: "EXAMPLE-name-Value",
                    sourceId: 910
                  }
                ],
                patternCount: 376,
                patterns: [
                  {
                    convertedText: "EXAMPLE-convertedText-Value",
                    dbParserId: 438,
                    dbPatternDateTimeColumns: "EXAMPLE-dbPatternDateTimeColumns-Value",
                    dbPatternDateTimeField: "EXAMPLE-dbPatternDateTimeField-Value",
                    dbPatternSequenceColumn: "EXAMPLE-dbPatternSequenceColumn-Value",
                    isInclude: false,
                    isDefault: true,
                    patternFilter: {
                      agentVersion: "EXAMPLE-agentVersion-Value",
                      isInUse: true,
                      operatingSystem: "EXAMPLE-operatingSystem-Value",
                      patternId: 484,
                      sourceId: 588,
                      version: "EXAMPLE-version-Value"
                    },
                    alias: "EXAMPLE-alias-Value",
                    description: "EXAMPLE-description-Value",
                    isEnabled: false,
                    patternId: 722,
                    isSystem: true,
                    sourceId: 887,
                    isAgentWarningSuppressed: true,
                    patternText: "EXAMPLE-patternText-Value",
                    patternType: 386,
                    entityType: ["EXAMPLE--Value"],
                    patternProperties: [
                      {
                        name: "EXAMPLE-name-Value",
                        value: "EXAMPLE-value-Value"
                      }
                    ]
                  }
                ],
                description: "EXAMPLE-description-Value",
                displayName: "EXAMPLE-displayName-Value",
                editVersion: 171,
                functions: [
                  {
                    arguments: [
                      {
                        isOverrideOutputFields: false,
                        argumentDisplayName: "EXAMPLE-argumentDisplayName-Value",
                        argumentExample: "EXAMPLE-argumentExample-Value",
                        argumentService: "EXAMPLE-argumentService-Value",
                        argumentDataType: "EXAMPLE-argumentDataType-Value",
                        argumentDescription: "EXAMPLE-argumentDescription-Value",
                        argumentName: "EXAMPLE-argumentName-Value",
                        argumentOrder: 688,
                        argumentType: 365,
                        argumentId: 212,
                        argumentLookupColumn: "EXAMPLE-argumentLookupColumn-Value",
                        argumentLookupColumnPosition: 762,
                        argumentValue: "EXAMPLE-argumentValue-Value",
                        argumentReference: "EXAMPLE-argumentReference-Value"
                      }
                    ],
                    isEnabled: false,
                    function: {
                      metaFunctionArgument: [
                        {
                          isOverrideOutputFields: false,
                          argumentDisplayName: "EXAMPLE-argumentDisplayName-Value",
                          argumentExample: "EXAMPLE-argumentExample-Value",
                          argumentService: "EXAMPLE-argumentService-Value",
                          argumentDataType: "EXAMPLE-argumentDataType-Value",
                          argumentDescription: "EXAMPLE-argumentDescription-Value",
                          argumentName: "EXAMPLE-argumentName-Value",
                          argumentOrder: 672,
                          argumentType: 240,
                          argumentId: 831,
                          argumentLookupColumn: "EXAMPLE-argumentLookupColumn-Value",
                          argumentLookupColumnPosition: 390,
                          argumentValue: "EXAMPLE-argumentValue-Value",
                          argumentReference: "EXAMPLE-argumentReference-Value"
                        }
                      ],
                      component: "EXAMPLE-component-Value",
                      description: "EXAMPLE-description-Value",
                      editVersion: 825,
                      metaFunctionId: 495,
                      javaClassName: "EXAMPLE-javaClassName-Value",
                      name: "EXAMPLE-name-Value"
                    },
                    functionName:
                      loganalytics.models.LogAnalyticsSourceFunction.FunctionName.Lookup,
                    functionReference: "EXAMPLE-functionReference-Value",
                    sourceReference: "EXAMPLE-sourceReference-Value",
                    features: ["EXAMPLE--Value"],
                    functionId: 510,
                    order: 71,
                    isSystem: true,
                    lookupColumn: "EXAMPLE-lookupColumn-Value",
                    lookupColumnPosition: 521,
                    lookupDisplayName: "EXAMPLE-lookupDisplayName-Value",
                    lookupMode: 773,
                    lookupTable: "EXAMPLE-lookupTable-Value",
                    sourceId: 402
                  }
                ],
                sourceId: 831,
                name: "EXAMPLE-name-Value",
                isSecureContent: false,
                isSystem: false,
                isAutoAssociationEnabled: false,
                isAutoAssociationOverride: false,
                ruleId: 663,
                typeName: "EXAMPLE-typeName-Value",
                typeDisplayName: "EXAMPLE-typeDisplayName-Value",
                warningConfig: 442,
                metadataFields: [
                  {
                    fieldName: "EXAMPLE-fieldName-Value",
                    isEnabled: false,
                    isSystem: false,
                    key: "EXAMPLE-key-Value",
                    sourceName: "EXAMPLE-sourceName-Value"
                  }
                ],
                labelDefinitions: [
                  {
                    editVersion: 409,
                    isSystem: false,
                    sourceId: 168,
                    labelName: "EXAMPLE-labelName-Value"
                  }
                ],
                entityTypes: [
                  {
                    sourceId: 369,
                    entityType: "EXAMPLE-entityType-Value",
                    entityTypeCategory: "EXAMPLE-entityTypeCategory-Value",
                    entityTypeDisplayName: "EXAMPLE-entityTypeDisplayName-Value"
                  }
                ],
                isTimezoneOverride: false,
                timeUpdated: new Date("Thu Jan 08 06:05:23 UTC 2015"),
                eventTypes: [
                  {
                    eventTypeName: "EXAMPLE-eventTypeName-Value",
                    specVersion: "EXAMPLE-specVersion-Value",
                    isEnabled: true,
                    isSystem: true,
                    timeUpdated: new Date("Mon Sep 02 08:39:03 UTC 2030")
                  }
                ],
                categories: [
                  {
                    name: "EXAMPLE-name-Value",
                    description: "EXAMPLE-description-Value",
                    displayName: "EXAMPLE-displayName-Value",
                    type: "EXAMPLE-type-Value",
                    isSystem: false
                  }
                ],
                endpoints: [
                  {
                    endpointType: "LOG_LIST",
                    listEndpoint: {
                      name: "EXAMPLE-name-Value",
                      description: "EXAMPLE-description-Value",
                      model: "EXAMPLE-model-Value",
                      endpointId: 622,
                      request: {
                        method: loganalytics.requests.EndpointRequest.Method.Get,
                        url: "EXAMPLE-url-Value",
                        contentType: "EXAMPLE-contentType-Value",
                        payload: "EXAMPLE-payload-Value",
                        headers: [
                          {
                            name: "EXAMPLE-name-Value",
                            value: "EXAMPLE-value-Value"
                          }
                        ],
                        formParameters: [
                          {
                            name: "EXAMPLE-name-Value",
                            value: "EXAMPLE-value-Value"
                          }
                        ]
                      },
                      response: {
                        contentType: "EXAMPLE-contentType-Value",
                        example: "EXAMPLE-example-Value"
                      },
                      credentials: {
                        credentialType: loganalytics.models.EndpointCredentials.CredentialType.None,
                        credentialName: "EXAMPLE-credentialName-Value",
                        credentialEndpoint: {
                          name: "EXAMPLE-name-Value",
                          description: "EXAMPLE-description-Value",
                          model: "EXAMPLE-model-Value",
                          endpointId: 192,
                          response: {
                            contentType: "EXAMPLE-contentType-Value",
                            example: "EXAMPLE-example-Value"
                          },
                          proxy: {
                            url: "EXAMPLE-url-Value",
                            credentialName: "EXAMPLE-credentialName-Value",
                            credentialType:
                              loganalytics.models.EndpointProxy.CredentialType.BasicAuth
                          }
                        }
                      },
                      proxy: {
                        url: "EXAMPLE-url-Value",
                        credentialName: "EXAMPLE-credentialName-Value",
                        credentialType: loganalytics.models.EndpointProxy.CredentialType.None
                      },
                      isEnabled: true,
                      isSystem: false,
                      endpointProperties: [
                        {
                          name: "EXAMPLE-name-Value",
                          value: "EXAMPLE-value-Value"
                        }
                      ]
                    },
                    logEndpoints: [
                      {
                        name: "EXAMPLE-name-Value",
                        description: "EXAMPLE-description-Value",
                        model: "EXAMPLE-model-Value",
                        endpointId: 514,
                        request: {
                          method: loganalytics.requests.EndpointRequest.Method.Get,
                          url: "EXAMPLE-url-Value",
                          contentType: "EXAMPLE-contentType-Value",
                          payload: "EXAMPLE-payload-Value",
                          headers: [
                            {
                              name: "EXAMPLE-name-Value",
                              value: "EXAMPLE-value-Value"
                            }
                          ],
                          formParameters: [
                            {
                              name: "EXAMPLE-name-Value",
                              value: "EXAMPLE-value-Value"
                            }
                          ]
                        },
                        response: {
                          contentType: "EXAMPLE-contentType-Value",
                          example: "EXAMPLE-example-Value"
                        },
                        credentials: {
                          credentialType:
                            loganalytics.models.EndpointCredentials.CredentialType.None,
                          credentialName: "EXAMPLE-credentialName-Value",
                          credentialEndpoint: {
                            name: "EXAMPLE-name-Value",
                            description: "EXAMPLE-description-Value",
                            model: "EXAMPLE-model-Value",
                            endpointId: 362,
                            response: {
                              contentType: "EXAMPLE-contentType-Value",
                              example: "EXAMPLE-example-Value"
                            },
                            proxy: {
                              url: "EXAMPLE-url-Value",
                              credentialName: "EXAMPLE-credentialName-Value",
                              credentialType: loganalytics.models.EndpointProxy.CredentialType.Token
                            }
                          }
                        },
                        proxy: {
                          url: "EXAMPLE-url-Value",
                          credentialName: "EXAMPLE-credentialName-Value",
                          credentialType: loganalytics.models.EndpointProxy.CredentialType.None
                        },
                        isEnabled: true,
                        isSystem: false,
                        endpointProperties: [
                          {
                            name: "EXAMPLE-name-Value",
                            value: "EXAMPLE-value-Value"
                          }
                        ]
                      }
                    ]
                  }
                ],
                sourceProperties: [
                  {
                    name: "EXAMPLE-name-Value",
                    value: "EXAMPLE-value-Value"
                  }
                ]
              }
            ],
            shouldTokenizeOriginalText: true,
            fieldDelimiter: "EXAMPLE-fieldDelimiter-Value",
            fieldQualifier: "EXAMPLE-fieldQualifier-Value",
            type: loganalytics.models.LogAnalyticsParser.Type.Odl,
            isUserDeleted: true,
            isNamespaceAware: true,
            categories: [
              {
                name: "EXAMPLE-name-Value",
                description: "EXAMPLE-description-Value",
                displayName: "EXAMPLE-displayName-Value",
                type: "EXAMPLE-type-Value",
                isSystem: true
              }
            ],
            isPositionAware: false,
            dependentSources: [
              {
                sourceName: "EXAMPLE-sourceName-Value",
                sourceDisplayName: "EXAMPLE-sourceDisplayName-Value",
                sourceId: 340,
                sourceType: "EXAMPLE-sourceType-Value",
                isSystem: true,
                isAutoAssociationEnabled: true,
                entityTypes: [
                  {
                    sourceId: 976,
                    entityType: "EXAMPLE-entityType-Value",
                    entityTypeCategory: "EXAMPLE-entityTypeCategory-Value",
                    entityTypeDisplayName: "EXAMPLE-entityTypeDisplayName-Value"
                  }
                ],
                dependencies: [
                  {
                    type: "EXAMPLE-type-Value",
                    referenceType: "EXAMPLE-referenceType-Value",
                    referenceId: 28
                  }
                ]
              }
            ],
            dependentParsers: [
              {
                parserName: "EXAMPLE-parserName-Value",
                parserDisplayName: "EXAMPLE-parserDisplayName-Value",
                parserId: 906,
                isSystem: false,
                parserType: loganalytics.models.DependentParser.ParserType.Delimited,
                dependencies: [
                  {
                    type: "EXAMPLE-type-Value",
                    referenceType: "EXAMPLE-referenceType-Value",
                    referenceId: 266
                  }
                ]
              }
            ]
          },
          structuredColumnInfo: "EXAMPLE-structuredColumnInfo-Value"
        }
      ],
      footerContent: "EXAMPLE-footerContent-Value",
      headerContent: "EXAMPLE-headerContent-Value",
      name: "EXAMPLE-name-Value",
      isDefault: false,
      isSingleLineContent: true,
      isSystem: true,
      language: "EXAMPLE-language-Value",
      logTypeTestRequestVersion: 809,
      parserIgnorelineCharacters: "EXAMPLE-parserIgnorelineCharacters-Value",
      parserSequence: 974,
      parserTimezone: "EXAMPLE-parserTimezone-Value",
      isParserWrittenOnce: false,
      parserFunctions: [
        {
          parserMetaPlugin: {
            metaPluginParameters: [
              {
                description: "EXAMPLE-description-Value",
                name: "EXAMPLE-name-Value",
                isMandatory: false,
                isRepeatable: false,
                pluginName: "EXAMPLE-pluginName-Value",
                type: "EXAMPLE-type-Value"
              }
            ],
            description: "EXAMPLE-description-Value",
            displayName: "EXAMPLE-displayName-Value",
            name: "EXAMPLE-name-Value"
          },
          parserFunctionId: 305,
          parserFunctionName: "EXAMPLE-parserFunctionName-Value",
          isEnabled: false,
          isSystem: true,
          parserId: 226,
          parserName: "EXAMPLE-parserName-Value",
          parserMetaPluginName: "EXAMPLE-parserMetaPluginName-Value",
          parserFunctionPriority: 497,
          parserFunctionParameters: [
            {
              parserFunctionId: 842,
              parserFunctionParameterName: "EXAMPLE-parserFunctionParameterName-Value",
              parserFunctionParameterId: 252,
              parserMetaPluginParameterName: "EXAMPLE-parserMetaPluginParameterName-Value",
              parserMetaPluginParameterValue: "EXAMPLE-parserMetaPluginParameterValue-Value",
              parserName: "EXAMPLE-parserName-Value",
              parserMetaPluginParameter: {
                description: "EXAMPLE-description-Value",
                name: "EXAMPLE-name-Value",
                isMandatory: true,
                isRepeatable: true,
                pluginName: "EXAMPLE-pluginName-Value",
                type: "EXAMPLE-type-Value"
              }
            }
          ]
        }
      ],
      shouldTokenizeOriginalText: false,
      fieldDelimiter: "EXAMPLE-fieldDelimiter-Value",
      fieldQualifier: "EXAMPLE-fieldQualifier-Value",
      type: loganalytics.models.UpsertLogAnalyticsParserDetails.Type.Delimited,
      isNamespaceAware: false,
      categories: [
        {
          name: "EXAMPLE-name-Value",
          description: "EXAMPLE-description-Value",
          displayName: "EXAMPLE-displayName-Value",
          type: "EXAMPLE-type-Value",
          isSystem: true
        }
      ],
      isPositionAware: false
    };

    const upsertParserRequest: loganalytics.requests.UpsertParserRequest = {
      namespaceName: "EXAMPLE-namespaceName-Value",
      upsertLogAnalyticsParserDetails: upsertLogAnalyticsParserDetails,
      opcRetryToken: "EXAMPLE-opcRetryToken-Value",
      opcRequestId: "0QFUDE5CWDYXRWEYNF5A<unique_ID>",
      ifMatch: "EXAMPLE-ifMatch-Value"
    };

    // Send request to the Client.
    const upsertParserResponse = await client.upsertParser(upsertParserRequest);
  } catch (error) {
    console.log("upsertParser Failed with error  " + error);
  }
})();