public PSCognitiveServicesAccount(CognitiveServicesModels.CognitiveServicesAccount cognitiveServicesAccount)
 {
     this.ResourceGroupName = ParseResourceGroupFromId(cognitiveServicesAccount.Id);
     this.AccountName = cognitiveServicesAccount.Name;
     this.Id = cognitiveServicesAccount.Id;
     this.Endpoint = cognitiveServicesAccount.Endpoint;
     this.Location = cognitiveServicesAccount.Location;
     this.Sku = cognitiveServicesAccount.Sku;
     this.AccountType = (CognitiveServicesModels.Kind)Enum.Parse(typeof(CognitiveServicesModels.Kind), cognitiveServicesAccount.Kind);
     this.Etag = cognitiveServicesAccount.Etag;
     this.ResourceType = cognitiveServicesAccount.Type;
     this.ProvisioningState = cognitiveServicesAccount.ProvisioningState;
     this.Tags = cognitiveServicesAccount.Tags;
 }
 public PSCognitiveServicesAccountKeys(CognitiveServicesModels.CognitiveServicesAccountKeys cognitiveServicesAccountKeys)
 {
     this.Key1 = cognitiveServicesAccountKeys.Key1.ToString();
     this.Key2 = cognitiveServicesAccountKeys.Key2.ToString();
 }
 protected void WriteCognitiveServicesAccount(
     CognitiveServicesModels.CognitiveServicesAccount cognitiveServicesAccount)
 {
     if (cognitiveServicesAccount != null)
     {
         WriteObject(PSCognitiveServicesAccount.Create(cognitiveServicesAccount));
     }
 }
 public PSCognitiveServicesSkus(CognitiveServicesModels.CognitiveServicesAccountEnumerateSkusResult enumerateSkusResult)
 {
     this.List = enumerateSkusResult.Value.Select(x => x.Sku.Name.ToString());
 }
 public static PSCognitiveServicesAccount Create(CognitiveServicesModels.CognitiveServicesAccount cognitiveServicesAccount)
 {
     var result = new PSCognitiveServicesAccount(cognitiveServicesAccount);
     return result;
 }