示例#1
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(Properties))
     {
         writer.WritePropertyName("properties");
         writer.WriteObjectValue(Properties);
     }
     writer.WritePropertyName("computeType");
     writer.WriteStringValue(ComputeType.ToString());
     if (Optional.IsDefined(ComputeLocation))
     {
         writer.WritePropertyName("computeLocation");
         writer.WriteStringValue(ComputeLocation);
     }
     if (Optional.IsDefined(Description))
     {
         writer.WritePropertyName("description");
         writer.WriteStringValue(Description);
     }
     if (Optional.IsDefined(ResourceId))
     {
         writer.WritePropertyName("resourceId");
         writer.WriteStringValue(ResourceId);
     }
     writer.WriteEndObject();
 }
示例#2
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(IsDefault))
     {
         writer.WritePropertyName("isDefault");
         writer.WriteBooleanValue(IsDefault.Value);
     }
     if (Optional.IsDefined(TrafficPercentile))
     {
         writer.WritePropertyName("trafficPercentile");
         writer.WriteNumberValue(TrafficPercentile.Value);
     }
     if (Optional.IsDefined(Type))
     {
         writer.WritePropertyName("type");
         writer.WriteStringValue(Type.Value.ToString());
     }
     if (Optional.IsDefined(Description))
     {
         writer.WritePropertyName("description");
         writer.WriteStringValue(Description);
     }
     if (Optional.IsCollectionDefined(KvTags))
     {
         writer.WritePropertyName("kvTags");
         writer.WriteStartObject();
         foreach (var item in KvTags)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     if (Optional.IsCollectionDefined(Properties))
     {
         writer.WritePropertyName("properties");
         writer.WriteStartObject();
         foreach (var item in Properties)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     writer.WritePropertyName("computeType");
     writer.WriteStringValue(ComputeType.ToString());
     if (Optional.IsDefined(DeploymentType))
     {
         writer.WritePropertyName("deploymentType");
         writer.WriteStringValue(DeploymentType.Value.ToString());
     }
     writer.WriteEndObject();
 }
示例#3
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(Description))
     {
         writer.WritePropertyName("description");
         writer.WriteStringValue(Description);
     }
     if (Optional.IsCollectionDefined(KvTags))
     {
         writer.WritePropertyName("kvTags");
         writer.WriteStartObject();
         foreach (var item in KvTags)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     if (Optional.IsCollectionDefined(Properties))
     {
         writer.WritePropertyName("properties");
         writer.WriteStartObject();
         foreach (var item in Properties)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     if (Optional.IsDefined(Keys))
     {
         writer.WritePropertyName("keys");
         writer.WriteObjectValue(Keys);
     }
     writer.WritePropertyName("computeType");
     writer.WriteStringValue(ComputeType.ToString());
     if (Optional.IsDefined(EnvironmentImageRequest))
     {
         writer.WritePropertyName("environmentImageRequest");
         writer.WriteObjectValue(EnvironmentImageRequest);
     }
     if (Optional.IsDefined(Location))
     {
         writer.WritePropertyName("location");
         writer.WriteStringValue(Location);
     }
     writer.WriteEndObject();
 }
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(NumReplicas))
     {
         writer.WritePropertyName("numReplicas");
         writer.WriteNumberValue(NumReplicas.Value);
     }
     if (Optional.IsDefined(DataCollection))
     {
         writer.WritePropertyName("dataCollection");
         writer.WriteObjectValue(DataCollection);
     }
     if (Optional.IsDefined(ComputeName))
     {
         writer.WritePropertyName("computeName");
         writer.WriteStringValue(ComputeName);
     }
     if (Optional.IsDefined(AppInsightsEnabled))
     {
         writer.WritePropertyName("appInsightsEnabled");
         writer.WriteBooleanValue(AppInsightsEnabled.Value);
     }
     if (Optional.IsDefined(AutoScaler))
     {
         writer.WritePropertyName("autoScaler");
         writer.WriteObjectValue(AutoScaler);
     }
     if (Optional.IsDefined(ContainerResourceRequirements))
     {
         writer.WritePropertyName("containerResourceRequirements");
         writer.WriteObjectValue(ContainerResourceRequirements);
     }
     if (Optional.IsDefined(MaxConcurrentRequestsPerContainer))
     {
         writer.WritePropertyName("maxConcurrentRequestsPerContainer");
         writer.WriteNumberValue(MaxConcurrentRequestsPerContainer.Value);
     }
     if (Optional.IsDefined(MaxQueueWaitMs))
     {
         writer.WritePropertyName("maxQueueWaitMs");
         writer.WriteNumberValue(MaxQueueWaitMs.Value);
     }
     if (Optional.IsDefined(Namespace))
     {
         writer.WritePropertyName("namespace");
         writer.WriteStringValue(Namespace);
     }
     if (Optional.IsDefined(ScoringTimeoutMs))
     {
         writer.WritePropertyName("scoringTimeoutMs");
         writer.WriteNumberValue(ScoringTimeoutMs.Value);
     }
     if (Optional.IsDefined(AuthEnabled))
     {
         writer.WritePropertyName("authEnabled");
         writer.WriteBooleanValue(AuthEnabled.Value);
     }
     if (Optional.IsDefined(LivenessProbeRequirements))
     {
         writer.WritePropertyName("livenessProbeRequirements");
         writer.WriteObjectValue(LivenessProbeRequirements);
     }
     if (Optional.IsDefined(AadAuthEnabled))
     {
         writer.WritePropertyName("aadAuthEnabled");
         writer.WriteBooleanValue(AadAuthEnabled.Value);
     }
     if (Optional.IsDefined(IsDefault))
     {
         writer.WritePropertyName("isDefault");
         writer.WriteBooleanValue(IsDefault.Value);
     }
     if (Optional.IsDefined(TrafficPercentile))
     {
         writer.WritePropertyName("trafficPercentile");
         writer.WriteNumberValue(TrafficPercentile.Value);
     }
     if (Optional.IsDefined(Type))
     {
         writer.WritePropertyName("type");
         writer.WriteStringValue(Type.Value.ToString());
     }
     if (Optional.IsDefined(Description))
     {
         writer.WritePropertyName("description");
         writer.WriteStringValue(Description);
     }
     if (Optional.IsCollectionDefined(KvTags))
     {
         writer.WritePropertyName("kvTags");
         writer.WriteStartObject();
         foreach (var item in KvTags)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     if (Optional.IsCollectionDefined(Properties))
     {
         writer.WritePropertyName("properties");
         writer.WriteStartObject();
         foreach (var item in Properties)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     if (Optional.IsDefined(Keys))
     {
         writer.WritePropertyName("keys");
         writer.WriteObjectValue(Keys);
     }
     writer.WritePropertyName("computeType");
     writer.WriteStringValue(ComputeType.ToString());
     if (Optional.IsDefined(EnvironmentImageRequest))
     {
         writer.WritePropertyName("environmentImageRequest");
         writer.WriteObjectValue(EnvironmentImageRequest);
     }
     if (Optional.IsDefined(Location))
     {
         writer.WritePropertyName("location");
         writer.WriteStringValue(Location);
     }
     writer.WriteEndObject();
 }
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(ContainerResourceRequirements))
     {
         writer.WritePropertyName("containerResourceRequirements");
         writer.WriteObjectValue(ContainerResourceRequirements);
     }
     if (Optional.IsDefined(Location))
     {
         writer.WritePropertyName("location");
         writer.WriteStringValue(Location);
     }
     if (Optional.IsDefined(AuthEnabled))
     {
         writer.WritePropertyName("authEnabled");
         writer.WriteBooleanValue(AuthEnabled.Value);
     }
     if (Optional.IsDefined(SslEnabled))
     {
         writer.WritePropertyName("sslEnabled");
         writer.WriteBooleanValue(SslEnabled.Value);
     }
     if (Optional.IsDefined(AppInsightsEnabled))
     {
         writer.WritePropertyName("appInsightsEnabled");
         writer.WriteBooleanValue(AppInsightsEnabled.Value);
     }
     if (Optional.IsDefined(DataCollection))
     {
         writer.WritePropertyName("dataCollection");
         writer.WriteObjectValue(DataCollection);
     }
     if (Optional.IsDefined(SslCertificate))
     {
         writer.WritePropertyName("sslCertificate");
         writer.WriteStringValue(SslCertificate);
     }
     if (Optional.IsDefined(SslKey))
     {
         writer.WritePropertyName("sslKey");
         writer.WriteStringValue(SslKey);
     }
     if (Optional.IsDefined(Cname))
     {
         writer.WritePropertyName("cname");
         writer.WriteStringValue(Cname);
     }
     if (Optional.IsDefined(PublicIp))
     {
         writer.WritePropertyName("publicIp");
         writer.WriteStringValue(PublicIp);
     }
     if (Optional.IsDefined(PublicFqdn))
     {
         writer.WritePropertyName("publicFqdn");
         writer.WriteStringValue(PublicFqdn);
     }
     if (Optional.IsCollectionDefined(Models))
     {
         writer.WritePropertyName("models");
         writer.WriteStartArray();
         foreach (var item in Models)
         {
             writer.WriteObjectValue(item);
         }
         writer.WriteEndArray();
     }
     if (Optional.IsDefined(EnvironmentImageRequest))
     {
         writer.WritePropertyName("environmentImageRequest");
         writer.WriteObjectValue(EnvironmentImageRequest);
     }
     if (Optional.IsDefined(VnetConfiguration))
     {
         writer.WritePropertyName("vnetConfiguration");
         writer.WriteObjectValue(VnetConfiguration);
     }
     if (Optional.IsDefined(EncryptionProperties))
     {
         writer.WritePropertyName("encryptionProperties");
         writer.WriteObjectValue(EncryptionProperties);
     }
     if (Optional.IsDefined(Description))
     {
         writer.WritePropertyName("description");
         writer.WriteStringValue(Description);
     }
     if (Optional.IsCollectionDefined(KvTags))
     {
         writer.WritePropertyName("kvTags");
         writer.WriteStartObject();
         foreach (var item in KvTags)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     if (Optional.IsCollectionDefined(Properties))
     {
         writer.WritePropertyName("properties");
         writer.WriteStartObject();
         foreach (var item in Properties)
         {
             writer.WritePropertyName(item.Key);
             writer.WriteStringValue(item.Value);
         }
         writer.WriteEndObject();
     }
     writer.WritePropertyName("computeType");
     writer.WriteStringValue(ComputeType.ToString());
     if (Optional.IsDefined(DeploymentType))
     {
         writer.WritePropertyName("deploymentType");
         writer.WriteStringValue(DeploymentType.Value.ToString());
     }
     writer.WriteEndObject();
 }