text:
package programmatic

// Copyright (c) Microsoft and contributors.  All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.

import (
	"encoding/json"
	"github.com/Azure/go-autorest/autorest"
	"github.com/Azure/go-autorest/autorest/date"
	"github.com/satori/go.uuid"
	"io"
)

// AzureRegions enumerates the values for azure regions.
type AzureRegions string

const (
	// Australiaeast ...
	Australiaeast AzureRegions = "australiaeast"
	// Brazilsouth ...
	Brazilsouth AzureRegions = "brazilsouth"
	// Eastasia ...
	Eastasia AzureRegions = "eastasia"
	// Eastus ...
	Eastus AzureRegions = "eastus"
	// Eastus2 ...
	Eastus2 AzureRegions = "eastus2"
	// Northeurope ...
	Northeurope AzureRegions = "northeurope"
	// Southcentralus ...
	Southcentralus AzureRegions = "southcentralus"
	// Southeastasia ...
	Southeastasia AzureRegions = "southeastasia"
	// Westcentralus ...
	Westcentralus AzureRegions = "westcentralus"
	// Westeurope ...
	Westeurope AzureRegions = "westeurope"
	// Westus ...
	Westus AzureRegions = "westus"
	// Westus2 ...
	Westus2 AzureRegions = "westus2"
)

// OperationStatusType enumerates the values for operation status type.
type OperationStatusType string

const (
	// Failed ...
	Failed OperationStatusType = "Failed"
	// FAILED ...
	FAILED OperationStatusType = "FAILED"
	// Success ...
	Success OperationStatusType = "Success"
)

// ReadableType enumerates the values for readable type.
type ReadableType string

const (
	// ReadableTypeClosedListEntityExtractor ...
	ReadableTypeClosedListEntityExtractor ReadableType = "Closed List Entity Extractor"
	// ReadableTypeCompositeEntityExtractor ...
	ReadableTypeCompositeEntityExtractor ReadableType = "Composite Entity Extractor"
	// ReadableTypeEntityExtractor ...
	ReadableTypeEntityExtractor ReadableType = "Entity Extractor"
	// ReadableTypeHierarchicalChildEntityExtractor ...
	ReadableTypeHierarchicalChildEntityExtractor ReadableType = "Hierarchical Child Entity Extractor"
	// ReadableTypeHierarchicalEntityExtractor ...
	ReadableTypeHierarchicalEntityExtractor ReadableType = "Hierarchical Entity Extractor"
	// ReadableTypeIntentClassifier ...
	ReadableTypeIntentClassifier ReadableType = "Intent Classifier"
	// ReadableTypePrebuiltEntityExtractor ...
	ReadableTypePrebuiltEntityExtractor ReadableType = "Prebuilt Entity Extractor"
)

// ReadableType1 enumerates the values for readable type 1.
type ReadableType1 string

const (
	// ReadableType1ClosedListEntityExtractor ...
	ReadableType1ClosedListEntityExtractor ReadableType1 = "Closed List Entity Extractor"
	// ReadableType1CompositeEntityExtractor ...
	ReadableType1CompositeEntityExtractor ReadableType1 = "Composite Entity Extractor"
	// ReadableType1EntityExtractor ...
	ReadableType1EntityExtractor ReadableType1 = "Entity Extractor"
	// ReadableType1HierarchicalChildEntityExtractor ...
	ReadableType1HierarchicalChildEntityExtractor ReadableType1 = "Hierarchical Child Entity Extractor"
	// ReadableType1HierarchicalEntityExtractor ...
	ReadableType1HierarchicalEntityExtractor ReadableType1 = "Hierarchical Entity Extractor"
	// ReadableType1IntentClassifier ...
	ReadableType1IntentClassifier ReadableType1 = "Intent Classifier"
	// ReadableType1PrebuiltEntityExtractor ...
	ReadableType1PrebuiltEntityExtractor ReadableType1 = "Prebuilt Entity Extractor"
)

// ReadableType2 enumerates the values for readable type 2.
type ReadableType2 string

const (
	// ReadableType2ClosedListEntityExtractor ...
	ReadableType2ClosedListEntityExtractor ReadableType2 = "Closed List Entity Extractor"
	// ReadableType2CompositeEntityExtractor ...
	ReadableType2CompositeEntityExtractor ReadableType2 = "Composite Entity Extractor"
	// ReadableType2EntityExtractor ...
	ReadableType2EntityExtractor ReadableType2 = "Entity Extractor"
	// ReadableType2HierarchicalChildEntityExtractor ...
	ReadableType2HierarchicalChildEntityExtractor ReadableType2 = "Hierarchical Child Entity Extractor"
	// ReadableType2HierarchicalEntityExtractor ...
	ReadableType2HierarchicalEntityExtractor ReadableType2 = "Hierarchical Entity Extractor"
	// ReadableType2IntentClassifier ...
	ReadableType2IntentClassifier ReadableType2 = "Intent Classifier"
	// ReadableType2PrebuiltEntityExtractor ...
	ReadableType2PrebuiltEntityExtractor ReadableType2 = "Prebuilt Entity Extractor"
)

// ReadableType3 enumerates the values for readable type 3.
type ReadableType3 string

const (
	// ReadableType3ClosedListEntityExtractor ...
	ReadableType3ClosedListEntityExtractor ReadableType3 = "Closed List Entity Extractor"
	// ReadableType3CompositeEntityExtractor ...
	ReadableType3CompositeEntityExtractor ReadableType3 = "Composite Entity Extractor"
	// ReadableType3EntityExtractor ...
	ReadableType3EntityExtractor ReadableType3 = "Entity Extractor"
	// ReadableType3HierarchicalChildEntityExtractor ...
	ReadableType3HierarchicalChildEntityExtractor ReadableType3 = "Hierarchical Child Entity Extractor"
	// ReadableType3HierarchicalEntityExtractor ...
	ReadableType3HierarchicalEntityExtractor ReadableType3 = "Hierarchical Entity Extractor"
	// ReadableType3IntentClassifier ...
	ReadableType3IntentClassifier ReadableType3 = "Intent Classifier"
	// ReadableType3PrebuiltEntityExtractor ...
	ReadableType3PrebuiltEntityExtractor ReadableType3 = "Prebuilt Entity Extractor"
)

// Status enumerates the values for status.
type Status string

const (
	// StatusFail ...
	StatusFail Status = "Fail"
	// StatusInProgress ...
	StatusInProgress Status = "InProgress"
	// StatusQueued ...
	StatusQueued Status = "Queued"
	// StatusSuccess ...
	StatusSuccess Status = "Success"
	// StatusUpToDate ...
	StatusUpToDate Status = "UpToDate"
)

// Status1 enumerates the values for status 1.
type Status1 string

const (
	// Status1Fail ...
	Status1Fail Status1 = "Fail"
	// Status1InProgress ...
	Status1InProgress Status1 = "InProgress"
	// Status1Queued ...
	Status1Queued Status1 = "Queued"
	// Status1Success ...
	Status1Success Status1 = "Success"
	// Status1UpToDate ...
	Status1UpToDate Status1 = "UpToDate"
)

// TrainingStatus enumerates the values for training status.
type TrainingStatus string

const (
	// InProgress ...
	InProgress TrainingStatus = "InProgress"
	// NeedsTraining ...
	NeedsTraining TrainingStatus = "NeedsTraining"
	// Trained ...
	Trained TrainingStatus = "Trained"
)

// ApplicationCreateObject properties for creating a new LUIS Application
type ApplicationCreateObject struct {
	// Culture - The culture for the new application. It is the language that your app understands and speaks. E.g.: "en-us". Note: the culture cannot be changed after the app is created.
	Culture *string `json:"culture,omitempty"`
	// Domain - The domain for the new application. Optional. E.g.: Comics.
	Domain *string `json:"domain,omitempty"`
	// Description - Description of the new application. Optional.
	Description *string `json:"description,omitempty"`
	// InitialVersionID - The initial version ID. Optional. Default value is: "0.1"
	InitialVersionID *string `json:"initialVersionId,omitempty"`
	// UsageScenario - Defines the scenario for the new application. Optional. E.g.: IoT.
	UsageScenario *string `json:"usageScenario,omitempty"`
	// Name - The name for the new application.
	Name *string `json:"name,omitempty"`
}

// ApplicationInfoResponse response containing the Application Info.
type ApplicationInfoResponse struct {
	autorest.Response `json:"-"`
	// ID - The ID (GUID) of the application.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - The name of the application.
	Name *string `json:"name,omitempty"`
	// Description - The description of the application.
	Description *string `json:"description,omitempty"`
	// Culture - The culture of the application. E.g.: en-us.
	Culture *string `json:"culture,omitempty"`
	// UsageScenario - Defines the scenario for the new application. Optional. E.g.: IoT.
	UsageScenario *string `json:"usageScenario,omitempty"`
	// Domain - The domain for the new application. Optional. E.g.: Comics.
	Domain *string `json:"domain,omitempty"`
	// VersionsCount - Amount of model versions within the application.
	VersionsCount *int32 `json:"versionsCount,omitempty"`
	// CreatedDateTime - The version's creation timestamp.
	CreatedDateTime *string `json:"createdDateTime,omitempty"`
	// Endpoints - The Runtime endpoint URL for this model version.
	Endpoints interface{} `json:"endpoints,omitempty"`
	// EndpointHitsCount - Number of calls made to this endpoint.
	EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"`
	// ActiveVersion - The version ID currently marked as active.
	ActiveVersion *string `json:"activeVersion,omitempty"`
}

// ApplicationPublishObject object model for publishing a specific application version.
type ApplicationPublishObject struct {
	// VersionID - The version ID to publish.
	VersionID *string `json:"versionId,omitempty"`
	// IsStaging - Indicates if the staging slot should be used, instead of the Production one.
	IsStaging *bool `json:"isStaging,omitempty"`
	// Region - The target region that the application is published to.
	Region *string `json:"region,omitempty"`
}

// ApplicationSettings the application settings.
type ApplicationSettings struct {
	autorest.Response `json:"-"`
	// ID - The application ID.
	ID *uuid.UUID `json:"id,omitempty"`
	// IsPublic - Setting your application as public allows other people to use your application's endpoint using their own keys.
	IsPublic *bool `json:"public,omitempty"`
}

// ApplicationSettingUpdateObject object model for updating an application's settings.
type ApplicationSettingUpdateObject struct {
	// Public - Setting your application as public allows other people to use your application's endpoint using their own keys.
	Public *bool `json:"public,omitempty"`
}

// ApplicationUpdateObject object model for updating the name or description of an application.
type ApplicationUpdateObject struct {
	// Name - The application's new name.
	Name *string `json:"name,omitempty"`
	// Description - The application's new description.
	Description *string `json:"description,omitempty"`
}

// AvailableCulture available culture for using in a new application.
type AvailableCulture struct {
	// Name - The language name.
	Name *string `json:"name,omitempty"`
	// Code - The ISO value for the language.
	Code *string `json:"code,omitempty"`
}

// AvailablePrebuiltEntityModel available Prebuilt entity model for using in an application.
type AvailablePrebuiltEntityModel struct {
	// Name - The entity name.
	Name *string `json:"name,omitempty"`
	// Description - The entity description and usage information.
	Description *string `json:"description,omitempty"`
	// Examples - Usage examples.
	Examples *string `json:"examples,omitempty"`
}

// BatchLabelExample response when adding a batch of labeled examples.
type BatchLabelExample struct {
	Value    *LabelExampleResponse `json:"value,omitempty"`
	HasError *bool                 `json:"hasError,omitempty"`
	Error    *OperationStatus      `json:"error,omitempty"`
}

// ChildEntity the base child entity type.
type ChildEntity struct {
	// ID - The ID (GUID) belonging to a child entity.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - The name of a child entity.
	Name *string `json:"name,omitempty"`
}

// ClosedList exported Model - A Closed List.
type ClosedList struct {
	// Name - Name of the closed list feature.
	Name *string `json:"name,omitempty"`
	// SubLists - Sublists for the feature.
	SubLists *[]SubClosedList `json:"subLists,omitempty"`
}

// ClosedListEntityExtractor closed List Entity Extractor.
type ClosedListEntityExtractor struct {
	autorest.Response `json:"-"`
	// SubLists - List of sub-lists.
	SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
	ReadableType ReadableType `json:"readableType,omitempty"`
}

// ClosedListModelCreateObject object model for creating a closed list.
type ClosedListModelCreateObject struct {
	// SubLists - Sublists for the feature.
	SubLists *[]WordListObject `json:"subLists,omitempty"`
	// Name - Name of the closed list feature.
	Name *string `json:"name,omitempty"`
}

// ClosedListModelPatchObject object model for adding a batch of sublists to an existing closedlist.
type ClosedListModelPatchObject struct {
	// SubLists - Sublists to add.
	SubLists *[]WordListObject `json:"subLists,omitempty"`
}

// ClosedListModelUpdateObject object model for updating a closed list.
type ClosedListModelUpdateObject struct {
	// SubLists - The new sublists for the feature.
	SubLists *[]WordListObject `json:"subLists,omitempty"`
	// Name - The new name of the closed list feature.
	Name *string `json:"name,omitempty"`
}

// CollaboratorsArray ...
type CollaboratorsArray struct {
	// Emails - The email address of the users.
	Emails *[]string `json:"emails,omitempty"`
}

// CompositeChildModelCreateObject ...
type CompositeChildModelCreateObject struct {
	Name *string `json:"name,omitempty"`
}

// CompositeEntityExtractor a Composite Entity Extractor.
type CompositeEntityExtractor struct {
	autorest.Response `json:"-"`
	// Children - List of child entities.
	Children *[]ChildEntity `json:"children,omitempty"`
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
	ReadableType ReadableType `json:"readableType,omitempty"`
}

// CompositeEntityModel a composite entity.
type CompositeEntityModel struct {
	// Children - Child entities.
	Children *[]string `json:"children,omitempty"`
	// Name - Entity name.
	Name *string `json:"name,omitempty"`
}

// CustomPrebuiltModel a Custom Prebuilt model.
type CustomPrebuiltModel struct {
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableType3EntityExtractor', 'ReadableType3HierarchicalEntityExtractor', 'ReadableType3HierarchicalChildEntityExtractor', 'ReadableType3CompositeEntityExtractor', 'ReadableType3ClosedListEntityExtractor', 'ReadableType3PrebuiltEntityExtractor', 'ReadableType3IntentClassifier'
	ReadableType ReadableType3 `json:"readableType,omitempty"`
	// CustomPrebuiltDomainName - The domain name.
	CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
	// CustomPrebuiltModelName - The intent name or entity name.
	CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
}

// EndpointInfo the base class "ProductionOrStagingEndpointInfo" inherits from.
type EndpointInfo struct {
	// VersionID - The version ID to publish.
	VersionID *string `json:"versionId,omitempty"`
	// IsStaging - Indicates if the staging slot should be used, instead of the Production one.
	IsStaging *bool `json:"isStaging,omitempty"`
	// EndpointURL - The Runtime endpoint URL for this model version.
	EndpointURL *string `json:"endpointUrl,omitempty"`
	// Region - The target region that the application is published to.
	Region *string `json:"region,omitempty"`
	// AssignedEndpointKey - The endpoint key.
	AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"`
	// EndpointRegion - The endpoint's region.
	EndpointRegion *string `json:"endpointRegion,omitempty"`
	// PublishedDateTime - Timestamp when was last published.
	PublishedDateTime *string `json:"publishedDateTime,omitempty"`
}

// EnqueueTrainingResponse response model when requesting to train the model.
type EnqueueTrainingResponse struct {
	autorest.Response `json:"-"`
	// StatusID - The train request status ID.
	StatusID *int32 `json:"statusId,omitempty"`
	// Status - Possible values include: 'StatusQueued', 'StatusInProgress', 'StatusUpToDate', 'StatusFail', 'StatusSuccess'
	Status Status `json:"status,omitempty"`
}

// EntitiesSuggestionExample predicted/suggested entity.
type EntitiesSuggestionExample struct {
	// Text - The utterance. E.g.: what's the weather like in seattle?
	Text *string `json:"text,omitempty"`
	// TokenizedText - The utterance tokenized.
	TokenizedText *[]string `json:"tokenizedText,omitempty"`
	// IntentPredictions - Predicted/suggested intents.
	IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
	// EntityPredictions - Predicted/suggested entities.
	EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
}

// EntityExtractor entity Extractor.
type EntityExtractor struct {
	autorest.Response `json:"-"`
	// CustomPrebuiltDomainName - The domain name.
	CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
	// CustomPrebuiltModelName - The intent name or entity name.
	CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
	ReadableType ReadableType `json:"readableType,omitempty"`
}

// EntityLabel defines the entity type and position of the extracted entity within the example.
type EntityLabel struct {
	// EntityName - The entity type.
	EntityName *string `json:"entityName,omitempty"`
	// StartTokenIndex - The index within the utterance where the extracted entity starts.
	StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
	// EndTokenIndex - The index within the utterance where the extracted entity ends.
	EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
}

// EntityLabelObject defines the entity type and position of the extracted entity within the example.
type EntityLabelObject struct {
	// EntityName - The entity type.
	EntityName *string `json:"entityName,omitempty"`
	// StartCharIndex - The index within the utterance where the extracted entity starts.
	StartCharIndex *int32 `json:"startCharIndex,omitempty"`
	// EndCharIndex - The index within the utterance where the extracted entity ends.
	EndCharIndex *int32 `json:"endCharIndex,omitempty"`
}

// EntityPrediction a suggested entity.
type EntityPrediction struct {
	// EntityName - The entity's name
	EntityName *string `json:"entityName,omitempty"`
	// StartTokenIndex - The index within the utterance where the extracted entity starts.
	StartTokenIndex *int32 `json:"startTokenIndex,omitempty"`
	// EndTokenIndex - The index within the utterance where the extracted entity ends.
	EndTokenIndex *int32 `json:"endTokenIndex,omitempty"`
	// Phrase - The actual token(s) that comprise the entity.
	Phrase *string `json:"phrase,omitempty"`
}

// ErrorResponse error response when invoking an operation on the API.
type ErrorResponse struct {
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	ErrorType            *string                `json:"errorType,omitempty"`
}

// MarshalJSON is the custom marshaler for ErrorResponse.
func (er ErrorResponse) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if er.ErrorType != nil {
		objectMap["errorType"] = er.ErrorType
	}
	for k, v := range er.AdditionalProperties {
		objectMap[k] = v
	}
	return json.Marshal(objectMap)
}

// ExampleLabelObject a labeled example.
type ExampleLabelObject struct {
	// Text - The sample's utterance.
	Text *string `json:"text,omitempty"`
	// EntityLabels - The idenfied entities within the utterance.
	EntityLabels *[]EntityLabelObject `json:"entityLabels,omitempty"`
	// IntentName - The idenfitied intent representing the utterance.
	IntentName *string `json:"intentName,omitempty"`
}

// FeatureInfoObject the base class Features-related response objects inherit from.
type FeatureInfoObject struct {
	// ID - A six-digit ID used for Features.
	ID *int32 `json:"id,omitempty"`
	// Name - The name of the Feature.
	Name *string `json:"name,omitempty"`
	// IsActive - Indicates if the feature is enabled.
	IsActive *bool `json:"isActive,omitempty"`
}

// FeaturesResponseObject model Features, including Patterns and Phraselists.
type FeaturesResponseObject struct {
	autorest.Response  `json:"-"`
	PhraselistFeatures *[]PhraseListFeatureInfo `json:"phraselistFeatures,omitempty"`
	PatternFeatures    *[]PatternFeatureInfo    `json:"patternFeatures,omitempty"`
}

// HierarchicalChildEntity a Hierarchical Child Entity.
type HierarchicalChildEntity struct {
	autorest.Response `json:"-"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableType2EntityExtractor', 'ReadableType2HierarchicalEntityExtractor', 'ReadableType2HierarchicalChildEntityExtractor', 'ReadableType2CompositeEntityExtractor', 'ReadableType2ClosedListEntityExtractor', 'ReadableType2PrebuiltEntityExtractor', 'ReadableType2IntentClassifier'
	ReadableType ReadableType2 `json:"readableType,omitempty"`
	// ID - The ID (GUID) belonging to a child entity.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - The name of a child entity.
	Name *string `json:"name,omitempty"`
}

// HierarchicalChildModelCreateObject ...
type HierarchicalChildModelCreateObject struct {
	Name *string `json:"name,omitempty"`
}

// HierarchicalChildModelUpdateObject ...
type HierarchicalChildModelUpdateObject struct {
	Name *string `json:"name,omitempty"`
}

// HierarchicalEntityExtractor hierarchical Entity Extractor.
type HierarchicalEntityExtractor struct {
	autorest.Response `json:"-"`
	// Children - List of child entities.
	Children *[]ChildEntity `json:"children,omitempty"`
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
	ReadableType ReadableType `json:"readableType,omitempty"`
}

// HierarchicalEntityModel a Hierarchical Entity Extractor.
type HierarchicalEntityModel struct {
	// Children - Child entities.
	Children *[]string `json:"children,omitempty"`
	// Name - Entity name.
	Name *string `json:"name,omitempty"`
}

// HierarchicalModel ...
type HierarchicalModel struct {
	Name     *string   `json:"name,omitempty"`
	Children *[]string `json:"children,omitempty"`
}

// Int32 ...
type Int32 struct {
	autorest.Response `json:"-"`
	Value             *int32 `json:"value,omitempty"`
}

// IntentClassifier intent Classifier.
type IntentClassifier struct {
	autorest.Response `json:"-"`
	// CustomPrebuiltDomainName - The domain name.
	CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
	// CustomPrebuiltModelName - The intent name or entity name.
	CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
	ReadableType ReadableType `json:"readableType,omitempty"`
}

// IntentPrediction a suggested intent.
type IntentPrediction struct {
	// Name - The intent's name
	Name *string `json:"name,omitempty"`
	// Score - The intent's score, based on the prediction model.
	Score *float64 `json:"score,omitempty"`
}

// IntentsSuggestionExample predicted/suggested intent.
type IntentsSuggestionExample struct {
	// Text - The utterance. E.g.: what's the weather like in seattle?
	Text *string `json:"text,omitempty"`
	// TokenizedText - The utterance tokenized.
	TokenizedText *[]string `json:"tokenizedText,omitempty"`
	// IntentPredictions - Predicted/suggested intents.
	IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
	// EntityPredictions - Predicted/suggested entities.
	EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
}

// JSONEntity exported Model - Extracted Entity from utterance.
type JSONEntity struct {
	// StartPos - The index within the utterance where the extracted entity starts.
	StartPos *int32 `json:"startPos,omitempty"`
	// EndPos - The index within the utterance where the extracted entity ends.
	EndPos *int32 `json:"endPos,omitempty"`
	// Entity - The entity name.
	Entity *string `json:"entity,omitempty"`
}

// JSONModelFeature exported Model - Phraselist Model Feature.
type JSONModelFeature struct {
	// Activated - Indicates if the feature is enabled.
	Activated *bool `json:"activated,omitempty"`
	// Name - The Phraselist name.
	Name *string `json:"name,omitempty"`
	// Words - List of comma-separated phrases that represent the Phraselist.
	Words *string `json:"words,omitempty"`
	// Mode - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn't. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
	Mode *bool `json:"mode,omitempty"`
}

// JSONRegexFeature exported Model - A Pattern feature.
type JSONRegexFeature struct {
	// Pattern - The Regular Expression to match.
	Pattern *string `json:"pattern,omitempty"`
	// Activated - Indicates if the Pattern feature is enabled.
	Activated *bool `json:"activated,omitempty"`
	// Name - Name of the feature.
	Name *string `json:"name,omitempty"`
}

// JSONUtterance exported Model - Utterance that was used to train the model.
type JSONUtterance struct {
	// Text - The utterance.
	Text *string `json:"text,omitempty"`
	// Intent - The matched intent.
	Intent *string `json:"intent,omitempty"`
	// Entities - The matched entities.
	Entities *[]JSONEntity `json:"entities,omitempty"`
}

// LabeledUtterance a prediction and label pair of an example.
type LabeledUtterance struct {
	// ID - ID of Labeled Utterance.
	ID *int32 `json:"id,omitempty"`
	// Text - The utterance. E.g.: what's the weather like in seattle?
	Text *string `json:"text,omitempty"`
	// TokenizedText - The utterance tokenized.
	TokenizedText *[]string `json:"tokenizedText,omitempty"`
	// IntentLabel - The intent matching the example.
	IntentLabel *string `json:"intentLabel,omitempty"`
	// EntityLabels - The entities matching the example.
	EntityLabels *[]EntityLabel `json:"entityLabels,omitempty"`
	// IntentPredictions - List of suggested intents.
	IntentPredictions *[]IntentPrediction `json:"intentPredictions,omitempty"`
	// EntityPredictions - List of suggested entities.
	EntityPredictions *[]EntityPrediction `json:"entityPredictions,omitempty"`
}

// LabelExampleResponse response when adding a labeled example.
type LabelExampleResponse struct {
	autorest.Response `json:"-"`
	// UtteranceText - The sample's utterance.
	UtteranceText *string `json:"UtteranceText,omitempty"`
	// ExampleID - The newly created sample ID.
	ExampleID *int32 `json:"ExampleId,omitempty"`
}

// ListApplicationInfoResponse ...
type ListApplicationInfoResponse struct {
	autorest.Response `json:"-"`
	Value             *[]ApplicationInfoResponse `json:"value,omitempty"`
}

// ListAvailableCulture ...
type ListAvailableCulture struct {
	autorest.Response `json:"-"`
	Value             *[]AvailableCulture `json:"value,omitempty"`
}

// ListAvailablePrebuiltEntityModel ...
type ListAvailablePrebuiltEntityModel struct {
	autorest.Response `json:"-"`
	Value             *[]AvailablePrebuiltEntityModel `json:"value,omitempty"`
}

// ListBatchLabelExample ...
type ListBatchLabelExample struct {
	autorest.Response `json:"-"`
	Value             *[]BatchLabelExample `json:"value,omitempty"`
}

// ListClosedListEntityExtractor ...
type ListClosedListEntityExtractor struct {
	autorest.Response `json:"-"`
	Value             *[]ClosedListEntityExtractor `json:"value,omitempty"`
}

// ListCompositeEntityExtractor ...
type ListCompositeEntityExtractor struct {
	autorest.Response `json:"-"`
	Value             *[]CompositeEntityExtractor `json:"value,omitempty"`
}

// ListCustomPrebuiltModel ...
type ListCustomPrebuiltModel struct {
	autorest.Response `json:"-"`
	Value             *[]CustomPrebuiltModel `json:"value,omitempty"`
}

// ListEntitiesSuggestionExample ...
type ListEntitiesSuggestionExample struct {
	autorest.Response `json:"-"`
	Value             *[]EntitiesSuggestionExample `json:"value,omitempty"`
}

// ListEntityExtractor ...
type ListEntityExtractor struct {
	autorest.Response `json:"-"`
	Value             *[]EntityExtractor `json:"value,omitempty"`
}

// ListHierarchicalEntityExtractor ...
type ListHierarchicalEntityExtractor struct {
	autorest.Response `json:"-"`
	Value             *[]HierarchicalEntityExtractor `json:"value,omitempty"`
}

// ListIntentClassifier ...
type ListIntentClassifier struct {
	autorest.Response `json:"-"`
	Value             *[]IntentClassifier `json:"value,omitempty"`
}

// ListIntentsSuggestionExample ...
type ListIntentsSuggestionExample struct {
	autorest.Response `json:"-"`
	Value             *[]IntentsSuggestionExample `json:"value,omitempty"`
}

// ListLabeledUtterance ...
type ListLabeledUtterance struct {
	autorest.Response `json:"-"`
	Value             *[]LabeledUtterance `json:"value,omitempty"`
}

// ListModelInfoResponse ...
type ListModelInfoResponse struct {
	autorest.Response `json:"-"`
	Value             *[]ModelInfoResponse `json:"value,omitempty"`
}

// ListModelTrainingInfo ...
type ListModelTrainingInfo struct {
	autorest.Response `json:"-"`
	Value             *[]ModelTrainingInfo `json:"value,omitempty"`
}

// ListPhraseListFeatureInfo ...
type ListPhraseListFeatureInfo struct {
	autorest.Response `json:"-"`
	Value             *[]PhraseListFeatureInfo `json:"value,omitempty"`
}

// ListPrebuiltDomain ...
type ListPrebuiltDomain struct {
	autorest.Response `json:"-"`
	Value             *[]PrebuiltDomain `json:"value,omitempty"`
}

// ListPrebuiltEntityExtractor ...
type ListPrebuiltEntityExtractor struct {
	autorest.Response `json:"-"`
	Value             *[]PrebuiltEntityExtractor `json:"value,omitempty"`
}

// ListString ...
type ListString struct {
	autorest.Response `json:"-"`
	Value             *[]string `json:"value,omitempty"`
}

// ListUUID ...
type ListUUID struct {
	autorest.Response `json:"-"`
	Value             *[]uuid.UUID `json:"value,omitempty"`
}

// ListVersionInfo ...
type ListVersionInfo struct {
	autorest.Response `json:"-"`
	Value             *[]VersionInfo `json:"value,omitempty"`
}

// LuisApp exported Model - An exported LUIS Application.
type LuisApp struct {
	autorest.Response `json:"-"`
	// AdditionalProperties - Unmatched properties from the message are deserialized this collection
	AdditionalProperties map[string]interface{} `json:""`
	// Name - The name of the application.
	Name *string `json:"name,omitempty"`
	// VersionID - The version ID of the application that was exported.
	VersionID *string `json:"versionId,omitempty"`
	// Desc - The description of the application.
	Desc *string `json:"desc,omitempty"`
	// Culture - The culture of the application. E.g.: en-us.
	Culture *string `json:"culture,omitempty"`
	// Intents - List of intents.
	Intents *[]HierarchicalModel `json:"intents,omitempty"`
	// Entities - List of entities.
	Entities *[]HierarchicalModel `json:"entities,omitempty"`
	// BingEntities - List of prebuilt intents.
	BingEntities *[]string `json:"bing_entities,omitempty"`
	// ClosedLists - List of closed lists.
	ClosedLists *[]ClosedList `json:"closedLists,omitempty"`
	// Composites - List of composite entities.
	Composites *[]HierarchicalModel `json:"composites,omitempty"`
	// RegexFeatures - List of pattern features.
	RegexFeatures *[]JSONRegexFeature `json:"regex_features,omitempty"`
	// ModelFeatures - List of model features.
	ModelFeatures *[]JSONModelFeature `json:"model_features,omitempty"`
	// Utterances - List of sample utterances.
	Utterances *[]JSONUtterance `json:"utterances,omitempty"`
}

// MarshalJSON is the custom marshaler for LuisApp.
func (la LuisApp) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if la.Name != nil {
		objectMap["name"] = la.Name
	}
	if la.VersionID != nil {
		objectMap["versionId"] = la.VersionID
	}
	if la.Desc != nil {
		objectMap["desc"] = la.Desc
	}
	if la.Culture != nil {
		objectMap["culture"] = la.Culture
	}
	if la.Intents != nil {
		objectMap["intents"] = la.Intents
	}
	if la.Entities != nil {
		objectMap["entities"] = la.Entities
	}
	if la.BingEntities != nil {
		objectMap["bing_entities"] = la.BingEntities
	}
	if la.ClosedLists != nil {
		objectMap["closedLists"] = la.ClosedLists
	}
	if la.Composites != nil {
		objectMap["composites"] = la.Composites
	}
	if la.RegexFeatures != nil {
		objectMap["regex_features"] = la.RegexFeatures
	}
	if la.ModelFeatures != nil {
		objectMap["model_features"] = la.ModelFeatures
	}
	if la.Utterances != nil {
		objectMap["utterances"] = la.Utterances
	}
	for k, v := range la.AdditionalProperties {
		objectMap[k] = v
	}
	return json.Marshal(objectMap)
}

// ModelCreateObject object model for creating a new entity extractor.
type ModelCreateObject struct {
	// Name - Name of the new entity extractor.
	Name *string `json:"name,omitempty"`
}

// ModelInfo base type used in entity types.
type ModelInfo struct {
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
	ReadableType ReadableType `json:"readableType,omitempty"`
}

// ModelInfoResponse an application model info.
type ModelInfoResponse struct {
	// Children - List of child entities.
	Children *[]ChildEntity `json:"children,omitempty"`
	// SubLists - List of sub-lists.
	SubLists *[]SubClosedListResponse `json:"subLists,omitempty"`
	// CustomPrebuiltDomainName - The domain name.
	CustomPrebuiltDomainName *string `json:"customPrebuiltDomainName,omitempty"`
	// CustomPrebuiltModelName - The intent name or entity name.
	CustomPrebuiltModelName *string `json:"customPrebuiltModelName,omitempty"`
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableType1EntityExtractor', 'ReadableType1HierarchicalEntityExtractor', 'ReadableType1HierarchicalChildEntityExtractor', 'ReadableType1CompositeEntityExtractor', 'ReadableType1ClosedListEntityExtractor', 'ReadableType1PrebuiltEntityExtractor', 'ReadableType1IntentClassifier'
	ReadableType ReadableType1 `json:"readableType,omitempty"`
}

// ModelTrainingDetails model Training Details.
type ModelTrainingDetails struct {
	// StatusID - The train request status ID.
	StatusID *int32 `json:"statusId,omitempty"`
	// Status - Possible values include: 'Status1Queued', 'Status1InProgress', 'Status1UpToDate', 'Status1Fail', 'Status1Success'
	Status Status1 `json:"status,omitempty"`
	// ExampleCount - The count of examples used to train the model.
	ExampleCount *int32 `json:"exampleCount,omitempty"`
	// TrainingDateTime - When the model was trained.
	TrainingDateTime *date.Time `json:"trainingDateTime,omitempty"`
	// FailureReason - Reason for the training failure.
	FailureReason *string `json:"failureReason,omitempty"`
}

// ModelTrainingInfo model Training Info.
type ModelTrainingInfo struct {
	// ModelID - The ID (GUID) of the model.
	ModelID *uuid.UUID            `json:"modelId,omitempty"`
	Details *ModelTrainingDetails `json:"details,omitempty"`
}

// ModelUpdateObject object model for updating an intent classifier.
type ModelUpdateObject struct {
	// Name - The entity's new name.
	Name *string `json:"name,omitempty"`
}

// OperationError operation error details when invoking an operation on the API.
type OperationError struct {
	Code    *string `json:"code,omitempty"`
	Message *string `json:"message,omitempty"`
}

// OperationStatus response of an Operation status.
type OperationStatus struct {
	autorest.Response `json:"-"`
	// Code - Status Code. Possible values include: 'Failed', 'FAILED', 'Success'
	Code OperationStatusType `json:"code,omitempty"`
	// Message - Status details.
	Message *string `json:"message,omitempty"`
}

// PatternCreateObject object model for creating a Pattern feature.
type PatternCreateObject struct {
	// Pattern - The Regular Expression to match.
	Pattern *string `json:"pattern,omitempty"`
	// Name - Name of the feature.
	Name *string `json:"name,omitempty"`
}

// PatternFeatureInfo pattern feature.
type PatternFeatureInfo struct {
	// Pattern - The Regular Expression to match.
	Pattern *string `json:"pattern,omitempty"`
	// ID - A six-digit ID used for Features.
	ID *int32 `json:"id,omitempty"`
	// Name - The name of the Feature.
	Name *string `json:"name,omitempty"`
	// IsActive - Indicates if the feature is enabled.
	IsActive *bool `json:"isActive,omitempty"`
}

// PatternUpdateObject object model for updating an existing Pattern feature.
type PatternUpdateObject struct {
	// Pattern - The Regular Expression to match.
	Pattern *string `json:"pattern,omitempty"`
	// Name - Name of the feature.
	Name *string `json:"name,omitempty"`
	// IsActive - Indicates if the Pattern feature is enabled.
	IsActive *bool `json:"isActive,omitempty"`
}

// PersonalAssistantsResponse response containing user's endpoint keys and the endpoint URLs of the prebuilt
// Cortana applications.
type PersonalAssistantsResponse struct {
	autorest.Response `json:"-"`
	EndpointKeys      *[]uuid.UUID       `json:"endpointKeys,omitempty"`
	EndpointUrls      map[string]*string `json:"endpointUrls"`
}

// MarshalJSON is the custom marshaler for PersonalAssistantsResponse.
func (par PersonalAssistantsResponse) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if par.EndpointKeys != nil {
		objectMap["endpointKeys"] = par.EndpointKeys
	}
	if par.EndpointUrls != nil {
		objectMap["endpointUrls"] = par.EndpointUrls
	}
	return json.Marshal(objectMap)
}

// PhraselistCreateObject object model for creating a phraselist model.
type PhraselistCreateObject struct {
	// Phrases - List of comma-separated phrases that represent the Phraselist.
	Phrases *string `json:"phrases,omitempty"`
	// Name - The Phraselist name.
	Name *string `json:"name,omitempty"`
	// IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn't. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
	IsExchangeable *bool `json:"isExchangeable,omitempty"`
}

// PhraseListFeatureInfo phraselist Feature.
type PhraseListFeatureInfo struct {
	autorest.Response `json:"-"`
	// Phrases - A list of comma-separated values.
	Phrases *string `json:"phrases,omitempty"`
	// IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn't. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
	IsExchangeable *bool `json:"isExchangeable,omitempty"`
	// ID - A six-digit ID used for Features.
	ID *int32 `json:"id,omitempty"`
	// Name - The name of the Feature.
	Name *string `json:"name,omitempty"`
	// IsActive - Indicates if the feature is enabled.
	IsActive *bool `json:"isActive,omitempty"`
}

// PhraselistUpdateObject object model for updating a Phraselist.
type PhraselistUpdateObject struct {
	// Phrases - List of comma-separated phrases that represent the Phraselist.
	Phrases *string `json:"phrases,omitempty"`
	// Name - The Phraselist name.
	Name *string `json:"name,omitempty"`
	// IsActive - Indicates if the Phraselist is enabled.
	IsActive *bool `json:"isActive,omitempty"`
	// IsExchangeable - An exchangeable phrase list feature are serves as single feature to the LUIS underlying training algorithm. It is used as a lexicon lookup feature where its value is 1 if the lexicon contains a given word or 0 if it doesn't. Think of an exchangeable as a synonyms list. A non-exchangeable phrase list feature has all the phrases in the list serve as separate features to the underlying training algorithm. So, if you your phrase list feature contains 5 phrases, they will be mapped to 5 separate features. You can think of the non-exchangeable phrase list feature as an additional bag of words that you are willing to add to LUIS existing vocabulary features. Think of a non-exchangeable as set of different words. Default value is true.
	IsExchangeable *bool `json:"isExchangeable,omitempty"`
}

// PrebuiltDomain prebuilt Domain.
type PrebuiltDomain struct {
	Name        *string               `json:"name,omitempty"`
	Culture     *string               `json:"culture,omitempty"`
	Description *string               `json:"description,omitempty"`
	Examples    *string               `json:"examples,omitempty"`
	Intents     *[]PrebuiltDomainItem `json:"intents,omitempty"`
	Entities    *[]PrebuiltDomainItem `json:"entities,omitempty"`
}

// PrebuiltDomainCreateBaseObject a model object containing the name of the custom prebuilt entity and the name of
// the domain to which this model belongs.
type PrebuiltDomainCreateBaseObject struct {
	// DomainName - The domain name.
	DomainName *string `json:"domainName,omitempty"`
}

// PrebuiltDomainCreateObject a prebuilt domain create object containing the name and culture of the domain.
type PrebuiltDomainCreateObject struct {
	// DomainName - The domain name.
	DomainName *string `json:"domainName,omitempty"`
	// Culture - The culture of the new domain.
	Culture *string `json:"culture,omitempty"`
}

// PrebuiltDomainItem ...
type PrebuiltDomainItem struct {
	Name        *string `json:"name,omitempty"`
	Description *string `json:"description,omitempty"`
	Examples    *string `json:"examples,omitempty"`
}

// PrebuiltDomainModelCreateObject a model object containing the name of the custom prebuilt intent or entity and
// the name of the domain to which this model belongs.
type PrebuiltDomainModelCreateObject struct {
	// DomainName - The domain name.
	DomainName *string `json:"domainName,omitempty"`
	// ModelName - The intent name or entity name.
	ModelName *string `json:"modelName,omitempty"`
}

// PrebuiltEntityExtractor prebuilt Entity Extractor.
type PrebuiltEntityExtractor struct {
	autorest.Response `json:"-"`
	// ID - The ID of the Entity Model.
	ID *uuid.UUID `json:"id,omitempty"`
	// Name - Name of the Entity Model.
	Name *string `json:"name,omitempty"`
	// TypeID - The type ID of the Entity Model.
	TypeID *int32 `json:"typeId,omitempty"`
	// ReadableType - Possible values include: 'ReadableTypeEntityExtractor', 'ReadableTypeHierarchicalEntityExtractor', 'ReadableTypeHierarchicalChildEntityExtractor', 'ReadableTypeCompositeEntityExtractor', 'ReadableTypeClosedListEntityExtractor', 'ReadableTypePrebuiltEntityExtractor', 'ReadableTypeIntentClassifier'
	ReadableType ReadableType `json:"readableType,omitempty"`
}

// ProductionOrStagingEndpointInfo ...
type ProductionOrStagingEndpointInfo struct {
	autorest.Response `json:"-"`
	// VersionID - The version ID to publish.
	VersionID *string `json:"versionId,omitempty"`
	// IsStaging - Indicates if the staging slot should be used, instead of the Production one.
	IsStaging *bool `json:"isStaging,omitempty"`
	// EndpointURL - The Runtime endpoint URL for this model version.
	EndpointURL *string `json:"endpointUrl,omitempty"`
	// Region - The target region that the application is published to.
	Region *string `json:"region,omitempty"`
	// AssignedEndpointKey - The endpoint key.
	AssignedEndpointKey *string `json:"assignedEndpointKey,omitempty"`
	// EndpointRegion - The endpoint's region.
	EndpointRegion *string `json:"endpointRegion,omitempty"`
	// PublishedDateTime - Timestamp when was last published.
	PublishedDateTime *string `json:"publishedDateTime,omitempty"`
}

// ReadCloser ...
type ReadCloser struct {
	autorest.Response `json:"-"`
	Value             *io.ReadCloser `json:"value,omitempty"`
}

// SetString ...
type SetString struct {
	autorest.Response `json:"-"`
	Value             map[string]*string `json:"value"`
}

// MarshalJSON is the custom marshaler for SetString.
func (ss SetString) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if ss.Value != nil {
		objectMap["value"] = ss.Value
	}
	return json.Marshal(objectMap)
}

// String ...
type String struct {
	autorest.Response `json:"-"`
	Value             *string `json:"value,omitempty"`
}

// SubClosedList sublist of items for a Closed list.
type SubClosedList struct {
	// CanonicalForm - The standard form that the list represents.
	CanonicalForm *string `json:"canonicalForm,omitempty"`
	// List - List of synonym words.
	List *[]string `json:"list,omitempty"`
}

// SubClosedListResponse sublist of items for a Closed list.
type SubClosedListResponse struct {
	// ID - The sublist ID
	ID *int32 `json:"id,omitempty"`
	// CanonicalForm - The standard form that the list represents.
	CanonicalForm *string `json:"canonicalForm,omitempty"`
	// List - List of synonym words.
	List *[]string `json:"list,omitempty"`
}

// TaskUpdateObject object model for cloning an application's version.
type TaskUpdateObject struct {
	// Version - The new version for the cloned model.
	Version *string `json:"version,omitempty"`
}

// UserAccessList list of user permissions.
type UserAccessList struct {
	autorest.Response `json:"-"`
	// Owner - The email address of owner of the application.
	Owner  *string   `json:"owner,omitempty"`
	Emails *[]string `json:"emails,omitempty"`
}

// UserCollaborator ...
type UserCollaborator struct {
	// Email - The email address of the user.
	Email *string `json:"email,omitempty"`
}

// UUID ...
type UUID struct {
	autorest.Response `json:"-"`
	Value             *uuid.UUID `json:"value,omitempty"`
}

// VersionInfo object model of an application version.
type VersionInfo struct {
	autorest.Response `json:"-"`
	// Version - The version ID. E.g.: "0.1"
	Version *string `json:"version,omitempty"`
	// CreatedDateTime - The version's creation timestamp.
	CreatedDateTime *date.Time `json:"createdDateTime,omitempty"`
	// LastModifiedDateTime - Timestamp of the last update.
	LastModifiedDateTime *date.Time `json:"lastModifiedDateTime,omitempty"`
	// LastTrainedDateTime - Timestamp of the last time the model was trained.
	LastTrainedDateTime *date.Time `json:"lastTrainedDateTime,omitempty"`
	// LastPublishedDateTime - Timestamp when was last published.
	LastPublishedDateTime *date.Time `json:"lastPublishedDateTime,omitempty"`
	// EndpointURL - The Runtime endpoint URL for this model version.
	EndpointURL *string `json:"endpointUrl,omitempty"`
	// AssignedEndpointKey - The endpoint key.
	AssignedEndpointKey map[string]*string `json:"assignedEndpointKey"`
	// ExternalAPIKeys - External keys.
	ExternalAPIKeys interface{} `json:"externalApiKeys,omitempty"`
	// IntentsCount - Number of intents in this model.
	IntentsCount *int32 `json:"intentsCount,omitempty"`
	// EntitiesCount - Number of entities in this model.
	EntitiesCount *int32 `json:"entitiesCount,omitempty"`
	// EndpointHitsCount - Number of calls made to this endpoint.
	EndpointHitsCount *int32 `json:"endpointHitsCount,omitempty"`
	// TrainingStatus - The current training status. Possible values include: 'NeedsTraining', 'InProgress', 'Trained'
	TrainingStatus TrainingStatus `json:"trainingStatus,omitempty"`
}

// MarshalJSON is the custom marshaler for VersionInfo.
func (vi VersionInfo) MarshalJSON() ([]byte, error) {
	objectMap := make(map[string]interface{})
	if vi.Version != nil {
		objectMap["version"] = vi.Version
	}
	if vi.CreatedDateTime != nil {
		objectMap["createdDateTime"] = vi.CreatedDateTime
	}
	if vi.LastModifiedDateTime != nil {
		objectMap["lastModifiedDateTime"] = vi.LastModifiedDateTime
	}
	if vi.LastTrainedDateTime != nil {
		objectMap["lastTrainedDateTime"] = vi.LastTrainedDateTime
	}
	if vi.LastPublishedDateTime != nil {
		objectMap["lastPublishedDateTime"] = vi.LastPublishedDateTime
	}
	if vi.EndpointURL != nil {
		objectMap["endpointUrl"] = vi.EndpointURL
	}
	if vi.AssignedEndpointKey != nil {
		objectMap["assignedEndpointKey"] = vi.AssignedEndpointKey
	}
	objectMap["externalApiKeys"] = vi.ExternalAPIKeys
	if vi.IntentsCount != nil {
		objectMap["intentsCount"] = vi.IntentsCount
	}
	if vi.EntitiesCount != nil {
		objectMap["entitiesCount"] = vi.EntitiesCount
	}
	if vi.EndpointHitsCount != nil {
		objectMap["endpointHitsCount"] = vi.EndpointHitsCount
	}
	objectMap["trainingStatus"] = vi.TrainingStatus
	return json.Marshal(objectMap)
}

// WordListBaseUpdateObject object model for updating one of the closed list's sublists.
type WordListBaseUpdateObject struct {
	// CanonicalForm - The standard form that the list represents.
	CanonicalForm *string `json:"canonicalForm,omitempty"`
	// List - List of synonym words.
	List *[]string `json:"list,omitempty"`
}

// WordListObject sublist of items for a Closed list.
type WordListObject struct {
	// CanonicalForm - The standard form that the list represents.
	CanonicalForm *string `json:"canonicalForm,omitempty"`
	// List - List of synonym words.
	List *[]string `json:"list,omitempty"`
}


text:
=head1 NAME

Bio::EnsEMBL::QualityScore - Stores conservation scores

=head1 SYNOPSIS

use Bio::EnsEMBL::QualityScore;
my $quality_score = new Bio::EnsEMBL::QualityScore(
    -window_size => $window_size,
    -position    => $position,
    -scores      => $scores,
);

SET VALUES
    $quality_score->window_size(10);
    $quality_score->position(1);
    $quality_score->scores($scores);
    $quality_score->y_axis_min(0);
    $quality_score->y_axis_max(100);

GET VALUES
    $window_size = $quality_score->window_size;
    $position = $quality_score->position;
    $scores = $quality_score->observed_scores;
    $y_axis_min = $quality_score->y_axis_min;
    $y_axis_max = $quality_score->y_axis_max;

=head1 DESCRIPTION

Object for storing quality scores. The scores are averaged over different
window sizes to speed up drawing over large regions. The scores are packed as
floats and stored in a string. The scores can be stored and retrieved in
either a packed or unpacked format. The unpacked format is as a space delimited
string eg ("75 90 22"). The packed format is a single precision float
(4 bytes). It is recommended to use the unpacked format.

=head1 AUTHOR - Shiran Pasternak

This modules is part of the Ensembl project http://www.ensembl.org

Email shiran@cshl.edu

=head1 CONTACT

This modules is part of the EnsEMBL project (http://www.ensembl.org)

Questions can be posted to the ensembl-dev mailing list:
ensembl-dev@ebi.ac.uk

=head1 APPENDIX

The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

=cut

package Bio::EnsEMBL::QualityScore;

use strict;

use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(warning deprecate throw);

#store as 4 byte float
my $pack_size = 4;
my $pack_type = "f";

=head2 new (CONSTRUCTOR)
    Arg [-ADAPTOR]
        : Bio::EnsEMBL::DBSQL::quality_score $adaptor
        (the adaptor for connecting to the database)
    Arg [-SLICE] (opt)
        : Bio::EnsEMBL::Slice $slice
        (the Slice on which the quality scores are called)
    Arg [-WINDOW_SIZE] (opt)
         : int $window_size
         (window size used to average the scores over)
    Arg [-POSITION] (opt)
        : int $position
        (position of the first score in genomic coordinates)
    Arg [-SCORES]
        : string $expected_score
        (packed or unpacked string of expected scores)
    Arg [-PACKED] (opt)
        : boolean $packed
        (whether the scores are packed (1) or unpacked (0))
    Arg [Y_AXIS_MIN] (opt)
	    : float $y_axis_min
	    (minimum score value used for display)
    Arg [Y_AXIS_MAX] (opt)
	    : float $y_axis_max
	    (maximum score value used for display)
    Example :
	my $quality_score = new Bio::EnsEMBL::QualityScore(
                    	    -slice       => $slice,
                            -window_size => $window_size,
                            -position    => $position,
                            -scores      => $scores,
    );
       Description: Creates a new quality_score object
       Returntype : Bio::EnsEMBL::QualityScore
       Exceptions : none
       Caller     : general
       Status     : At risk

=cut

sub new {

    my ($class, @args) = @_;

    my $self = {};
    bless $self, $class;

    my ($adaptor, $slice, $window_size, $position, $scores, $packed,
        $y_axis_min, $y_axis_max)
        = rearrange(
        [   qw(ADAPTOR SLICE WINDOW_SIZE
                POSITION SCORES PACKED
                Y_AXIS_MIN Y_AXIS_MAX)
        ],
        @args
        );

    $self->adaptor($adaptor)         if (defined($adaptor));
    $self->slice($slice)             if (defined($slice));
    $self->window_size($window_size) if (defined($window_size));
    $self->position($position)       if (defined($position));
    $self->scores($scores)           if (defined($scores));
    $self->y_axis_min($y_axis_min)   if (defined($y_axis_min));
    $self->y_axis_max($y_axis_max)   if (defined($y_axis_max));

    if (defined($packed)) {
        $self->packed($packed);
    } else {
        $self->packed(0);
    }
    return $self;
}

=head2 new_fast

  Arg [1]    : hash reference $hashref
  Example    : none
  Description: This is an ultra fast constructor which requires knowledge of
               the objects internals to be used.
  Returntype :
  Exceptions : none
  Caller     :

=cut

sub new_fast {
    my ($class, $hashref) = @_;

    return bless $hashref, $class;
}

=head2 adaptor

  Arg [1]    : Bio::EnsEMBL::DBSQL::QualityScoreAdaptor $adaptor
  Example    : $quality_score->adaptor($adaptor);
  Description: Getter/Setter for the adaptor this object used for database
               interaction
  Returntype : Bio::EnsEMBL::DBSQL::QualityScoreAdaptor object
  Exceptions : thrown if the argument is not a
               Bio::EnsEMBL::DBSQL::QualityScoreAdaptor object
  Caller     : general
  Status     : At risk

=cut

sub adaptor {
    my ($self, $adaptor) = @_;

    if (defined($adaptor)) {
        throw(
            "$adaptor is not a Bio::EnsEMBL::DBSQL::QualityScoreAdaptor object"
            )
            unless (
            $adaptor->isa("Bio::EnsEMBL::DBSQL::QualityScoreAdaptor"));
        $self->{'adaptor'} = $adaptor;
    }

    return $self->{'adaptor'};
}

=head2 slice

  Arg [1]    : (optional) Bio::EnsEMBL::Slice $slice
  Example    : $seqname = $feature->slice()->name();
  Description: Getter/Setter for the Slice that is associated with this
               feature.  The slice represents the underlying sequence that this
               feature is on.  Note that this method call is analagous to the
               old SeqFeature methods contig(), entire_seq(), attach_seq(),
               etc.
  Returntype : Bio::EnsEMBL::Slice
  Exceptions : thrown if an invalid argument is passed
  Caller     : general
  Status     : Stable

=cut

sub slice {
    my $self = shift;

    if (@_) {
        my $sl = shift;
        if (defined($sl) && (!ref($sl) || !$sl->isa('Bio::EnsEMBL::Slice'))) {
            throw('slice argument must be a Bio::EnsEMBL::Slice');
        }

        $self->{'slice'} = $sl;
    }

    return $self->{'slice'};
}

=head2 window_size

  Arg [1]    : (opt) integer window_size
  Example    : my $window_size = $quality_score->window_size();
  Example    : $quality_score->window_size(1);
  Description: Getter/Setter for the window_size of this conservation score
  Returntype : integer, Returns 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub window_size {
    my ($self, $window_size) = @_;

    if (defined $window_size) {
        $self->{'window_size'} = $window_size;
    }
    $self->{'window_size'} = '1' unless (defined($self->{'window_size'}));
    return $self->{'window_size'};
}

=head2 position

  Arg [1]    : (opt) integer
  Example    : $quality_score->position(1);
  Description: Getter/Setter for the genomic position of the first score
  Returntype : integer. Return 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub position {
    my ($self, $position) = @_;

    if (defined $position) {
        $self->{'position'} = $position;
    }

    $self->{'position'} ||= '1';
    return $self->{'position'};
}

=head2 start

  Example    : $quality_score->start();
  Description: Wrapper round position call
  Returntype : integer. Return 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub start {
    my ($self, $start) = @_;
    if (defined $start) {
        $self->{'start'} = $start;
    }
    return $self->{'start'};
}

=head2 end

  Example    : $quality_score->end();
  Description: wrapper around position
  Returntype : integer. Return 1 if value not defined
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub end {
    my ($self, $end) = @_;
    if (defined $end) {
        $self->{'end'} = $end;
    }
    return $self->{'end'};
}

=head2 scores

  Arg [1]    : (opt) string of difference scores (expected - observed)
               (can be either packed or space delimited)
  Example    : $quality_score->scores("1.85 -2.54 1.56");
  Example    : my $scores = $quality_score->scores();
  Description: Getter/Setter for the difference score string
  Returntype : string (either packed or space delimited)
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub scores {
    my ($self, $scores) = @_;

    if (defined $scores) {
        $self->{'scores'} = $scores;
    }
    return $self->{'scores'};
}

=head2 score

  Arg [1]    : (opt) string of the aggregate score
               (can be either packed or space delimited)
  Example    : $quality_score->score("1.85 -2.54 1.56");
  Example    : my $score = $quality_score->score();
  Description: Getter/Setter for the score string (synonym of 'scores')
  Returntype : string (either packed or space delimited)
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub score {
    my ($self, $score) = @_;

    return $self->scores($score);
}

=head2 y_axis_min

  Arg [1]    : (opt) float
  Example    : $quality_score->y_axis_min(-0.5);
  Example    : $y_axis_min = $quality_score->y_axis_min;
  Description: Getter/Setter for the minimum score
  Returntype : float
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub y_axis_min {
    my ($self, $y_axis_min) = @_;

    if (defined $y_axis_min) {
        $self->{'y_axis_min'} = $y_axis_min;
    }
    return $self->{'y_axis_min'};
}

=head2 y_axis_max

  Arg [1]    : (opt) float
  Example    : $quality_score->y_axis_max(2.45);
  Example    : $y_axis_max = $quality_score->y_axis_min;
  Description: Getter/Setter for the maximum score
  Returntype : float
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub y_axis_max {
    my ($self, $y_axis_max) = @_;

    if (defined $y_axis_max) {
        $self->{'y_axis_max'} = $y_axis_max;
    }
    return $self->{'y_axis_max'};
}

=head2 packed

  Arg [1]    : (opt) boolean
  Example    : $quality_score->packed(1);
  Example    : $packed = $quality_score->packed;
  Description: Getter/Setter for the whether the scores are packed or space
               delimited
  Returntype : boolean
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub packed {
    my ($self, $packed) = @_;

    if ($packed) {
        $self->{'packed'} = $packed;
    }
    return $self->{'packed'};
}

=head2 reverse

  Example    : $quality_score->reverse;
  Description: reverse scores and position in the quality_score object
  Returntype : none
  Exceptions : none
  Caller     : general
  Status     : At risk

=cut

sub reverse {
    my ($self) = @_;
    my $num_scores = 0;
    return if (!defined($self->scores));
    if ($self->packed) {
        $num_scores = length($self->scores) / $pack_size;
    } else {
        my @scores = split ' ', $self->scores;
        $num_scores = scalar(@scores);
    }

    #swap position orientation and reverse position in alignment
    my $end = $self->position + (($num_scores - 1) * $self->window_size);

    #10.10.06 +1 so position starts at 1 not 0
    #$self->position($self->genomic_align_block->length - $end);
    $self->position($self->slice->length - $end + 1);

    #swap position orientation and reverse position in alignment
    if (defined $self->position) {
        $end = $self->position
            + (($num_scores - 1) * $self->window_size);

        #10.10.06 +1 so position starts at 1 not 0
        #$self->position($self->genomic_align_block->length - $end);
        $self->position($self->slice->length - $end + 1);
    }

    #reverse score strings
    $self->scores(
        _reverse_score($self->scores, $num_scores, $self->packed));
}

#internal method used by reverse to reverse the score strings
#arguments:
#score_str : string, score string
#num_scores : integer, number of scores in the string
#packed : boolean, whether the scores are packed or not
sub _reverse_score {
    my ($score_str, $num_scores, $packed) = @_;

    my $rev_str;
    if ($packed) {
        for (my $i = $num_scores - 1; $i >= 0; $i--) {
            my $value = substr $score_str, $i * $pack_size, $pack_size;
            $rev_str .= $value;
        }
    } else {
        my @scores = split ' ', $score_str;
        my $rev_str;
        for (my $i = $num_scores - 1; $i >= 0; $i--) {
            $rev_str .= $scores[$i];
        }
    }
    return $rev_str;
}

#print the contents of the quality_score object
sub _print {
    my ($self, $FILEH) = @_;

    $FILEH ||= \*STDOUT;

    print $FILEH <<PRINT;
Bio::EnsEMBL::QualityScore object ($self)
  slice       = @{[ $self->slice ]}
  window_size = @{[ $self->window_size ]}
  position    = @{[ $self->position ]}
  scores      = @{[ $self->scores ]}
PRINT
}

1;

redpajama_set_name: RedPajamaGithub


text:
booyah
======

marketing tech


text:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CristiPotlog.WizardControl;

namespace FXStudio
{
    public partial class EffectWizardDialog : Form
    {
        private string m_FileName;
        private string m_EffectName;
        private string m_MaterialName;

        private string m_EffectDir;
        private string m_TemplatePath;

        public EffectWizardDialog(string projectLocation)
        {
            InitializeComponent();

            m_EffectDir = projectLocation + @"\Effects";
            m_TemplatePath = Directory.GetCurrentDirectory() + @"\Templates\";
        }

        public string FileName { get { return m_FileName; } set { m_FileName = value; } }

        public string EffectName { get { return m_EffectName; } }

        public string MaterialName { get { return m_MaterialName; } }

        public bool CreateMaterial() { return checkBoxCreate.Checked; }

        public bool IsEffectFromExist() { return radioButtonFile.Checked; }

        private void wizardForm_AfterSwitchPages(object sender, CristiPotlog.WizardControl.Wizard.AfterSwitchPagesEventArgs e)
        {
            WizardPage newPage = wizardForm.Pages[e.NewIndex];

            if (newPage == wizardPageFile)
            {
                wizardForm.NextEnabled = (textBoxFile.Text != string.Empty) && File.Exists(textBoxFile.Text);
            }
            else if (newPage == wizardPageTemplate)
            {
                wizardForm.NextEnabled = !string.IsNullOrEmpty(textBoxName.Text);
            }
            else if (newPage == wizardPageName)
            {
                textBoxEffect.Text = m_EffectName;
                textBoxMaterial.Text = m_MaterialName;
                if (radioButtonFile.Checked)
                {
                    m_FileName = textBoxFile.Text;
                }
                else if (radioButtonHlsl.Checked)
                {
                    m_FileName = textBoxLocation.Text + @"\" + textBoxName.Text;
                }
            }
        }

        private void wizardForm_BeforeSwitchPages(object sender, CristiPotlog.WizardControl.Wizard.BeforeSwitchPagesEventArgs e)
        {
            WizardPage oldPage = wizardForm.Pages[e.OldIndex];

            if (oldPage == wizardPageSelect && e.NewIndex > e.OldIndex)
            {
                if (!radioButtonFile.Checked)
                {
                    e.NewIndex++;
                }
            }
            else if (oldPage == wizardPageTemplate && e.NewIndex < e.OldIndex)
            {
                if (!radioButtonFile.Checked)
                {
                    e.NewIndex--;
                }
            }
            else if (oldPage == wizardPageFile && e.NewIndex > e.OldIndex)
            {
                e.NewIndex++;
            }
            else if (oldPage == wizardPageName && e.NewIndex < e.OldIndex)
            {
                if (radioButtonFile.Checked)
                {
                    e.NewIndex--;
                }
            }
        }

        private void radioButton_CheckedChanged(object sender, EventArgs e)
        {
            wizardForm.NextEnabled = true;
            wizardForm.FinishEnabled = false;
        }

        private void wizardForm_Load(object sender, EventArgs e)
        {
            wizardForm.SelectedPage = wizardPageSelect;
            wizardForm.NextEnabled = false;
            wizardForm.FinishEnabled = false;
            textBoxLocation.Text = m_EffectDir;
        }

        private void textBoxFile_TextChanged(object sender, EventArgs e)
        {
            wizardForm.NextEnabled = (!string.IsNullOrEmpty(textBoxFile.Text)) && File.Exists(textBoxFile.Text);
        }

        private void buttonFile_Click(object sender, EventArgs e)
        {
            OpenFileDialog dialog = new OpenFileDialog();

            dialog.Filter = "HLSL Effect Files (*.fx)|*.fx";
            dialog.FilterIndex = 1;
            dialog.RestoreDirectory = true;

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                textBoxFile.Text = dialog.FileName;
                m_EffectName = Path.GetFileNameWithoutExtension(dialog.FileName);
                m_MaterialName = m_EffectName + "_Material";
            }
        }

        private void listViewEffect_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listViewEffect.SelectedIndices.Count > 0)
            {
                textBoxName.Text = (string)listViewEffect.SelectedItems[0].Tag + ".fx";
            }
            else
            {
                textBoxName.Text = "";
                wizardForm.FinishEnabled = false;
            }
        }

        private void buttonLocation_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            dialog.SelectedPath = textBoxLocation.Text;
            dialog.ShowNewFolderButton = true;
            if (dialog.ShowDialog() == DialogResult.OK)
            {
                textBoxLocation.Text = dialog.SelectedPath;
            }
        }

        private void textBoxEffect_TextChanged(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(textBoxEffect.Text))
                wizardForm.FinishEnabled = false;
        }

        private void textBoxName_TextChanged(object sender, EventArgs e)
        {
            wizardForm.NextEnabled = !string.IsNullOrEmpty(textBoxName.Text) && (listViewEffect.SelectedIndices.Count > 0);
            m_EffectName = Path.GetFileNameWithoutExtension(textBoxName.Text);
            m_MaterialName = m_EffectName + "_Material";
        }

        private void wizardForm_Finish(object sender, EventArgs e)
        {
            if (!File.Exists(m_FileName))
            {
                string destFileName = m_TemplatePath + (string)listViewEffect.SelectedItems[0].Tag + ".fx";
                File.Copy(destFileName, m_FileName);
            }
        }
    }
}


text:
require "test_helper"

# Single integration test.
class ExAuthNotExpectedCozSelectedThenDelTest < ActionDispatch::IntegrationTest
  include Capybara::DSL

  test "create scientific Name: ex auth not expected - selected then deleted" do
    names_count = Name.count
    visit_home_page
    fill_in "search-field",
            with: "create sci Name Ex Auth not expected cause sel then deleted"
    load_new_scientific_name_form
    set_name_parent
    fill_in("name_name_element", with: "Fred")
    fill_in_author_typeahead("author-by-abbrev", "name_author_id")
    fill_in_author_typeahead("ex-author-by-abbrev",
                             "name_ex_author_id", authors(:hooker))
    blank_string = " "
    fill_in("ex-author-by-abbrev", with: blank_string)
    save_new_record
    assert_successful_create_for([], ["Ex Authored by"])
    Name.count.must_equal names_count + 1
  end
end


text:
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Gard. & Forest 6:383. 1893 (Forest Fl. Japan 66, t. 22. 1894)

#### Original name
null

### Remarks
null


text:
test:
	xcodebuild \
		-sdk iphonesimulator \
		-workspace FakeWeb.xcworkspace \
		-scheme FakeWebTests \
		-configuration Debug \
		clean build \
		ONLY_ACTIVE_ARCH=NO \
		TEST_AFTER_BUILD=YES


text:
usage="Usage: slaves.sh command..."

# if no args specified, show usage
if [ $# -le 0 ]; then
  echo $usage
  exit 1
fi

# resolve links - $0 may be a softlink
this="$0"
while [ -h "$this" ]; do
  ls=`ls -ld "$this"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    this="$link"
  else
    this=`dirname "$this"`/"$link"
  fi
done

# the root of the Hadoop installation
HADOOP_HOME=`dirname "$this"`/..

# Allow alternate conf dir location.
HADOOP_CONF_DIR="${HADOOP_CONF_DIR:=$HADOOP_HOME/conf}"

if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
  source "${HADOOP_CONF_DIR}/hadoop-env.sh"
fi

if [ "$HADOOP_SLAVES" = "" ]; then
  export HADOOP_SLAVES="${HADOOP_CONF_DIR}/slaves"
fi

# By default, forward HADOOP_CONF_DIR environment variable to the
# remote slave. Remote slave must have following added to its
# /etc/ssh/sshd_config:
#   AcceptEnv HADOOP_CONF_DIR
# See'man ssh_config for more on SendEnv and AcceptEnv.
if [ "$HADOOP_SSH_OPTS" = "" ]; then
  export HADOOP_SSH_OPTS="-o ConnectTimeout=1 -o SendEnv=HADOOP_CONF_DIR"
fi

for slave in `cat "$HADOOP_SLAVES"`; do
 ssh $HADOOP_SSH_OPTS $slave $"${@// /\\ }" \
   2>&1 | sed "s/^/$slave: /" &
 if [ "$HADOOP_SLAVE_SLEEP" != "" ]; then
   sleep $HADOOP_SLAVE_SLEEP
 fi
done

wait


text:
package edu.emory.cci.aiw.i2b2etl.dest.metadata;

import edu.emory.cci.aiw.i2b2etl.dest.metadata.conceptid.InvalidConceptCodeException;
import edu.emory.cci.aiw.i2b2etl.dest.table.ProviderDimension;
import java.util.TreeMap;

/**
 *
 * @author Andrew Post
 */
class ProviderConceptTreeBuilder implements OntologyBuilder, SubtreeBuilder {

    private final Metadata metadata;
    private Concept root;
    private TreeMap<Character, Concept> alpha;
    private final boolean skipProviderHierarchy;

    ProviderConceptTreeBuilder(Metadata metadata) {
        assert metadata != null : "metadata cannot be null";
        this.metadata = metadata;
        this.skipProviderHierarchy = this.metadata.getSettings().getSkipProviderHierarchy();
    }

    /**
     * Create a hierarchy of providers organized by first letter of their full
     * name.
     *
     * @return the root of the hierarchy.
     *
     * @throws OntologyBuildException if an error occurs building the hierarchy.
     */
    @Override
    public void build(Concept parent) throws OntologyBuildException {
        if (!this.skipProviderHierarchy) {
            try {
                root = this.metadata.getOrCreateHardCodedFolder("Provider");
                root.setFactTableColumn("provider_id");
                root.setTableName("provider_dimension");
                root.setColumnName("provider_path");
                if (parent != null) {
                    root.setAlreadyLoaded(parent.isAlreadyLoaded());
                    parent.add(root);
                }
                alpha = createAlphaCategoryConcepts();
            } catch (InvalidConceptCodeException ex) {
                throw new OntologyBuildException("Could not build provider concept tree", ex);
            }
        }
    }

    void add(ProviderDimension pd) throws InvalidConceptCodeException {
        if (!this.skipProviderHierarchy) {
            String fullName = pd.getConcept().getDisplayName();
            Concept parent = alpha.get(fullName.toUpperCase().charAt(0));
            if (parent == null) {
                parent = this.metadata.getOrCreateHardCodedFolder("Provider", "Other");
                parent.setFactTableColumn("provider_id");
                parent.setTableName("provider_dimension");
                parent.setColumnName("provider_path");
                parent.setAlreadyLoaded(root.isAlreadyLoaded());
                root.add(parent);
            }
            Concept child = pd.getConcept();
            child.setAlreadyLoaded(child.isAlreadyLoaded());
            parent.add(child);
        }
    }

    @Override
    public Concept[] getRoots() {
        if (this.root != null) {
            return new Concept[]{this.root};
        } else {
            return EMPTY_CONCEPT_ARRAY;
        }
    }

    private TreeMap<Character, Concept> createAlphaCategoryConcepts() throws InvalidConceptCodeException {
        String ca = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        TreeMap<Character, Concept> alpha = new TreeMap<>();
        for (char c : ca.toCharArray()) {
            Concept ontologyNode = this.metadata.getOrCreateHardCodedFolder("Provider", String.valueOf(c));
            ontologyNode.setFactTableColumn("provider_id");
            ontologyNode.setTableName("provider_dimension");
            ontologyNode.setColumnName("provider_path");
            ontologyNode.setAlreadyLoaded(root.isAlreadyLoaded());
            alpha.put(c, ontologyNode);
            root.add(ontologyNode);
        }
        return alpha;
    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <title>SettingsController</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../css/github.css" type="text/css" media="screen" />

            Class
            SettingsController

                <

                    AdministrativeInterfaceController

app/controllers/settings_controller.rb

Methods

E

                edit

I

                index

S

                set_user_data_center,

                show

U

                update

Instance Public methods

              edit()

            Link

GET /settings/1/edit

                Source:
                show

# File app/controllers/settings_controller.rb, line 15
def edit
end

              index()

            Link

GET /settings

                Source:
                show

# File app/controllers/settings_controller.rb, line 6
def index
  @settings = Setting.by_data_center(current_user.data_center).all
end

              set_user_data_center()

            Link

                Source:
                show

# File app/controllers/settings_controller.rb, line 27
def set_user_data_center
  data_center = DataCenter.find_by(id: params[:user][:data_center_id])
  authorize data_center
  current_user.update(data_center: data_center)
  redirect_to :back #, notice: I18n.t('activerecord.notices.models.user.data_center.success.update', data_center: data_center.name)
end

              show()

            Link

GET /settings/1

                Source:
                show

# File app/controllers/settings_controller.rb, line 11
def show
end

              update()

            Link

PATCH/PUT /settings/1

                Source:
                show

# File app/controllers/settings_controller.rb, line 19
def update
  if @setting.set_cached_setting(setting_params[:value])
    redirect_to @setting, notice: I18n.t('activerecord.notices.models.setting.success.update')
  else
    render :edit
  end
end


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Ku.Core.CMS.Domain.Dto.Mall;
using Ku.Core.CMS.Domain.Entity.Mall;
using Ku.Core.CMS.IService.Mall;
using Ku.Core.CMS.Web.Base;
using Ku.Core.CMS.Web.Security;
using Ku.Core.Infrastructure.Exceptions;

namespace Ku.Core.CMS.Web.Backend.Pages.Mall.Product.Unit
{
    /// <summary>
    /// 计量单位 编辑页面
    /// </summary>
    [Auth("mall.productunit")]
    public class EditModel : BasePage
    {
        private readonly IProductUnitService _service;

        public EditModel(IProductUnitService service)
        {
            this._service = service;
        }

        [BindProperty]
        public ProductUnitDto Dto { set; get; }

        /// <summary>
        /// 取得数据
        /// </summary>
        [Auth("edit")]
        public async Task OnGetAsync(long? id)
        {
            if (id.HasValue)
            {
                Dto = await _service.GetByIdAsync(id.Value);
                if (Dto == null)
                {
                    throw new KuDataNotFoundException();
                }
                ViewData["Mode"] = "Edit";
            }
            else
            {
                Dto = new ProductUnitDto();
                ViewData["Mode"] = "Add";
            }
        }

        /// <summary>
        /// 保存
        /// </summary>
        [Auth("edit")]
        public async Task<IActionResult> OnPostAsync()
        {
            if (!ModelState.IsValid)
            {
                throw new KuArgNullException();
            }

            await _service.SaveAsync(Dto);
            return Json(true);
        }
    }
}


text:
exports.BattleScripts = {
	init: function () {
		this.modData('Pokedex', 'archeops').abilities['1'] = 'Vital Spirit';
		this.modData('Pokedex', 'porygonz').types = ['Normal', 'Ghost'];
		this.modData('Pokedex', 'weezing').types = ['Poison', 'Steel'];
		this.modData('Pokedex', 'moltres').abilities['1'] = 'Magic Guard';
		this.modData('Pokedex', 'abomasnowmega').abilities['0'] = 'Technician';
		this.modData('Pokedex', 'cradily').abilities['1'] = 'Sand Stream';
		this.modData('Pokedex', 'froslass').abilities['1'] = 'Prankster';
		this.modData('Learnsets', 'absol').learnset.partingshot = ['6T'];
		this.modData('Pokedex', 'goodra').abilities['1'] = 'Protean';
		this.modData('Pokedex', 'entei').abilities['1'] = 'Defiant';
		this.modData('Pokedex', 'milotic').abilities['H'] = 'Multiscale';
		this.modData('Pokedex', 'empoleon').abilities['1'] = 'Lightning Rod';
		this.modData('Learnsets', 'reuniclus').learnset.voltswitch = ['6T'];
		this.modData('Pokedex', 'steelixmega').abilities['0'] = 'Arena Trap';
		this.modData('Pokedex', 'audinomega').abilities['0'] = 'Simple';
		this.modData('Learnsets', 'ampharos').learnset.wish = ['6T'];
		this.modData('Pokedex', 'absolmega').types = ['Dark', 'Fairy'];
		this.modData('Pokedex', 'weavile').abilities['1'] = 'Moxie';
		this.modData('Learnsets', 'pangoro').learnset.suckerpunch = ['6T'];
		this.modData('Pokedex', 'rotomfan').types = ['Electric', 'Steel'];
		this.modData('Learnsets', 'rotomfan').learnset.flashcannon = this.data.Learnsets.rotomfan.learnset.airslash;
		this.modData('Learnsets', 'rotomfan').learnset.airslash = null;
		this.modData('Learnsets', 'mantine').learnset.roost = ['6T'];
		this.modData('Learnsets', 'pidgeot').learnset.focusblast = ['6T'];
		this.modData('Pokedex', 'granbull').abilities['1'] = 'Fur Coat';
		this.modData('Pokedex', 'aggronmega').types = ['Steel', 'Dragon'];
		this.modData('Learnsets', 'floatzel').learnset.bellydrum = ['6T'];
		this.modData('Pokedex', 'forretress').abilities['1'] = 'Water Absorb';
		this.modData('Learnsets', 'bronzong').learnset.recover = ['6T'];
		this.modData('Learnsets', 'sandslash').learnset.thousandarrows = ['6T'];
	}
};


text:
class LocalStorageMock {
  constructor() {
    this.store = {};
  }

  clear() {
    this.store = {};
  }

  getItem(key) {
    return this.store[key];
  }

  setItem(key, value) {
    this.store[key] = value && value.toString();
  }

  removeItem (key) {
    delete this.store[key];
  }
};

global.localStorage = new LocalStorageMock;