Esempio n. 1
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("endpointComputeType");
     writer.WriteStringValue(EndpointComputeType.ToString());
     writer.WriteEndObject();
 }
Esempio n. 2
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(ContainerResourceRequirements))
     {
         if (ContainerResourceRequirements != null)
         {
             writer.WritePropertyName("containerResourceRequirements");
             writer.WriteObjectValue(ContainerResourceRequirements);
         }
         else
         {
             writer.WriteNull("containerResourceRequirements");
         }
     }
     if (Optional.IsDefined(AppInsightsEnabled))
     {
         writer.WritePropertyName("appInsightsEnabled");
         writer.WriteBooleanValue(AppInsightsEnabled.Value);
     }
     if (Optional.IsDefined(EgressPublicNetworkAccess))
     {
         writer.WritePropertyName("egressPublicNetworkAccess");
         writer.WriteStringValue(EgressPublicNetworkAccess.Value.ToString());
     }
     writer.WritePropertyName("endpointComputeType");
     writer.WriteStringValue(EndpointComputeType.ToString());
     if (Optional.IsDefined(InstanceType))
     {
         if (InstanceType != null)
         {
             writer.WritePropertyName("instanceType");
             writer.WriteStringValue(InstanceType);
         }
         else
         {
             writer.WriteNull("instanceType");
         }
     }
     if (Optional.IsDefined(LivenessProbe))
     {
         if (LivenessProbe != null)
         {
             writer.WritePropertyName("livenessProbe");
             writer.WriteObjectValue(LivenessProbe);
         }
         else
         {
             writer.WriteNull("livenessProbe");
         }
     }
     if (Optional.IsDefined(Model))
     {
         if (Model != null)
         {
             writer.WritePropertyName("model");
             writer.WriteStringValue(Model);
         }
         else
         {
             writer.WriteNull("model");
         }
     }
     if (Optional.IsDefined(ModelMountPath))
     {
         if (ModelMountPath != null)
         {
             writer.WritePropertyName("modelMountPath");
             writer.WriteStringValue(ModelMountPath);
         }
         else
         {
             writer.WriteNull("modelMountPath");
         }
     }
     if (Optional.IsDefined(PrivateNetworkConnection))
     {
         writer.WritePropertyName("privateNetworkConnection");
         writer.WriteBooleanValue(PrivateNetworkConnection.Value);
     }
     if (Optional.IsDefined(ReadinessProbe))
     {
         if (ReadinessProbe != null)
         {
             writer.WritePropertyName("readinessProbe");
             writer.WriteObjectValue(ReadinessProbe);
         }
         else
         {
             writer.WriteNull("readinessProbe");
         }
     }
     if (Optional.IsDefined(RequestSettings))
     {
         if (RequestSettings != null)
         {
             writer.WritePropertyName("requestSettings");
             writer.WriteObjectValue(RequestSettings);
         }
         else
         {
             writer.WriteNull("requestSettings");
         }
     }
     if (Optional.IsDefined(ScaleSettings))
     {
         if (ScaleSettings != null)
         {
             writer.WritePropertyName("scaleSettings");
             writer.WriteObjectValue(ScaleSettings);
         }
         else
         {
             writer.WriteNull("scaleSettings");
         }
     }
     if (Optional.IsDefined(CodeConfiguration))
     {
         if (CodeConfiguration != null)
         {
             writer.WritePropertyName("codeConfiguration");
             writer.WriteObjectValue(CodeConfiguration);
         }
         else
         {
             writer.WriteNull("codeConfiguration");
         }
     }
     if (Optional.IsDefined(Description))
     {
         if (Description != null)
         {
             writer.WritePropertyName("description");
             writer.WriteStringValue(Description);
         }
         else
         {
             writer.WriteNull("description");
         }
     }
     if (Optional.IsDefined(EnvironmentId))
     {
         if (EnvironmentId != null)
         {
             writer.WritePropertyName("environmentId");
             writer.WriteStringValue(EnvironmentId);
         }
         else
         {
             writer.WriteNull("environmentId");
         }
     }
     if (Optional.IsCollectionDefined(EnvironmentVariables))
     {
         if (EnvironmentVariables != null)
         {
             writer.WritePropertyName("environmentVariables");
             writer.WriteStartObject();
             foreach (var item in EnvironmentVariables)
             {
                 writer.WritePropertyName(item.Key);
                 writer.WriteStringValue(item.Value);
             }
             writer.WriteEndObject();
         }
         else
         {
             writer.WriteNull("environmentVariables");
         }
     }
     if (Optional.IsCollectionDefined(Properties))
     {
         if (Properties != null)
         {
             writer.WritePropertyName("properties");
             writer.WriteStartObject();
             foreach (var item in Properties)
             {
                 writer.WritePropertyName(item.Key);
                 writer.WriteStringValue(item.Value);
             }
             writer.WriteEndObject();
         }
         else
         {
             writer.WriteNull("properties");
         }
     }
     writer.WriteEndObject();
 }