Class AzureImageDetails
Implements
Namespace: Neon.Kube.Clients
Assembly: Neon.Kube.dll
Syntax
public class AzureImageDetails : IRoundtripData
Constructors
AzureImageDetails()
Constructs an uninitialized instance.
Declaration
public AzureImageDetails()
AzureImageDetails(JObject)
Protected constructor used internally to initialize derived classes.
Declaration
protected AzureImageDetails(JObject jObject)
Parameters
Type | Name | Description |
---|---|---|
JObject | jObject | The backing Newtonsoft.Json.Linq.JObject. |
Properties
ComputePlan
Declaration
[JsonProperty(PropertyName = "ComputePlan", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate, Required = Required.Always, Order = 0)]
public AzureComputePlan ComputePlan { get; set; }
Property Value
Type | Description |
---|---|
AzureComputePlan |
ImageReference
Declaration
[JsonProperty(PropertyName = "ImageReference", DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate, Required = Required.Always, Order = 0)]
public AzureImageReference ImageReference { get; set; }
Property Value
Type | Description |
---|---|
AzureImageReference |
__O
INTERNAL USE ONLY: This is the Newtonsoft.Json.Linq.JObject is used to back all serialized round-trip. This was made public for advanced unit testing but its use should generally be avoided for other purposes. Use ToJObject(). instead. "__O" is short for "object".
Declaration
[JsonIgnore]
public JObject __O { get; set; }
Property Value
Type | Description |
---|---|
JObject |
Methods
CreateFrom(JsonResponse)
Deserializes an instance from a JsonResponse.
Declaration
public static AzureImageDetails CreateFrom(JsonResponse response)
Parameters
Type | Name | Description |
---|---|---|
JsonResponse | response | The input JsonResponse. |
Returns
Type | Description |
---|---|
AzureImageDetails | The deserialized AzureImageDetails. |
CreateFrom(JObject)
Deserializes an instance from a Newtonsoft.Json.Linq.JObject.
Declaration
public static AzureImageDetails CreateFrom(JObject jObject)
Parameters
Type | Name | Description |
---|---|---|
JObject | jObject | The input Newtonsoft.Json.Linq.JObject. |
Returns
Type | Description |
---|---|
AzureImageDetails | The deserialized AzureImageDetails. |
CreateFrom(byte[])
Deserializes an instance from a UTF-8 encoded byte array.
Declaration
public static AzureImageDetails CreateFrom(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
byte[] | bytes | The input byte array. |
Returns
Type | Description |
---|---|
AzureImageDetails | The deserialized AzureImageDetails. |
CreateFrom(Stream, Encoding)
Deserializes an instance from a Stream.
Declaration
public static AzureImageDetails CreateFrom(Stream stream, Encoding encoding = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The input Stream. |
Encoding | encoding | Optionally specifies the inout encoding. This defaults to UTF8. |
Returns
Type | Description |
---|---|
AzureImageDetails | The deserialized AzureImageDetails. |
CreateFrom(string)
Deserializes an instance from JSON text.
Declaration
public static AzureImageDetails CreateFrom(string jsonText)
Parameters
Type | Name | Description |
---|---|---|
string | jsonText | The JSON text input. |
Returns
Type | Description |
---|---|
AzureImageDetails | The deserialized AzureImageDetails. |
CreateFromAsync(Stream, Encoding)
Asynchronously deserializes an instance from a Stream.
Declaration
public static Task<object> CreateFromAsync(Stream stream, Encoding encoding = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The input Stream. |
Encoding | encoding | Optionally specifies the inout encoding. This defaults to UTF8. |
Returns
Type | Description |
---|---|
Task<object> | The deserialized AzureImageDetails. |
DeepClone()
Returns a deep clone of the instance.
Declaration
public AzureImageDetails DeepClone()
Returns
Type | Description |
---|---|
AzureImageDetails | The cloned instance. |
Equals(object)
Determines whether the current instance equals another object.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The other object instance or |
Returns
Type | Description |
---|---|
bool |
|
Overrides
GetHashCode()
Calculates the hash code for the instance.
note
At least one of the class properties must be tagged with a [HashSource] for this to work.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | The calculated hash code. |
Overrides
Exceptions
Type | Condition |
---|---|
InvalidOperationException | Thrown when no class properties are tagged with a |
ToBytes()
Renders the instance as UTF-8 encoded JSON.
Declaration
public virtual byte[] ToBytes()
Returns
Type | Description |
---|---|
byte[] | The serialized JSON bytes. |
ToDerived<T>(bool)
Used to convert a base data model class into a derived class.
Declaration
public T ToDerived<T>(bool noClone = false) where T : AzureImageDetails, IRoundtripData
Parameters
Type | Name | Description |
---|---|---|
bool | noClone | By default, this method will create a deep clone of the underlying Newtonsoft.Json.Linq.JObject
and use this new instance when constructing the new object. This is the safest
approach but will cause a performance hit. You can pass |
Returns
Type | Description |
---|---|
T | The converted instance of type |
Type Parameters
Name | Description |
---|---|
T | The desired derived type. |
ToJObject()
Renders the instance as a new Newtonsoft.Json.Linq.JObject.
Declaration
public JObject ToJObject()
Returns
Type | Description |
---|---|
JObject | The rendered Newtonsoft.Json.Linq.JObject. |
ToString()
Renders the instance as JSON text.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The serialized JSON string. |
Overrides
ToString(bool)
Renders the instance as JSON text, optionally formatting the output.
Declaration
public string ToString(bool indented)
Parameters
Type | Name | Description |
---|---|---|
bool | indented | Optionally pass |
Returns
Type | Description |
---|---|
string | The serialized JSON string. |
WriteJsonTo(Stream)
Writes the instance as JSON to a Stream.
Declaration
public virtual void WriteJsonTo(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream |
WriteJsonToAsync(Stream)
Asynchronously writes the instance as JSON to a Stream.
Declaration
public virtual Task WriteJsonToAsync(Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream |
Returns
Type | Description |
---|---|
Task | The tracking Task. |
__Load(JObject, bool)
Loads the entity properties from the backing Newtonsoft.Json.Linq.JObject or from the optional Newtonsoft.Json.Linq.JObject passed.
Declaration
public virtual void __Load(JObject source = null, bool isDerived = false)
Parameters
Type | Name | Description |
---|---|---|
JObject | source | The optional source Newtonsoft.Json.Linq.JObject. |
bool | isDerived | Optionally indicates that were deserializing a derived class. |
__Save()
Persists the properties from this instance to the backing Newtonsoft.Json.Linq.JObject.
Declaration
public virtual JObject __Save()
Returns
Type | Description |
---|---|
JObject | The backing Newtonsoft.Json.Linq.JObject. |
Operators
operator ==(AzureImageDetails, AzureImageDetails)
Compares two instances for equality by performing a deep comparision of all object
properties including any hidden properties. Note that you may pass null
.
Declaration
public static bool operator ==(AzureImageDetails value1, AzureImageDetails value2)
Parameters
Type | Name | Description |
---|---|---|
AzureImageDetails | value1 | The first value or |
AzureImageDetails | value2 | The second value or |
Returns
Type | Description |
---|---|
bool |
|
operator !=(AzureImageDetails, AzureImageDetails)
Compares two instances for inequality by performing a deep comparision of all object
properties including any hidden properties. Note that you may pass null
.
Declaration
public static bool operator !=(AzureImageDetails value1, AzureImageDetails value2)
Parameters
Type | Name | Description |
---|---|---|
AzureImageDetails | value1 | The first value or |
AzureImageDetails | value2 | The second value or |
Returns
Type | Description |
---|---|
bool |
|