/// <summary>Constructor for deserialization.</summary>
 /// <param name="json">a <see cref="Carbon.Json.JsonObject" /> to deserialize from.</param>
 internal NewCategoryValue_CategoryValueNameValueDescriptionApiVersionValue(Carbon.Json.JsonObject json)
 {
     // deserialize the contents
     _name  = If(json?.PropertyT <Carbon.Json.JsonString>("Name"), out var __jsonName) ? (string)__jsonName : (string)Name;
     _value = If(json?.PropertyT <Carbon.Json.JsonString>("Value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;
     _spec  = If(json?.PropertyT <Carbon.Json.JsonObject>("Spec"), out var __jsonSpec) ? Nutanix.Powershell.Models.CategoryValue.FromJson(__jsonSpec) : Spec;
 }
Beispiel #2
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="DiskAddress" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal DiskAddress(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _adapterType = If(json?.PropertyT <Carbon.Json.JsonString>("adapter_type"), out var __jsonAdapterType) ? (string)__jsonAdapterType : (string)AdapterType;
            _deviceIndex = If(json?.PropertyT <Carbon.Json.JsonNumber>("device_index"), out var __jsonDeviceIndex) ? (int)__jsonDeviceIndex : DeviceIndex;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="ImageVersionResources" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal ImageVersionResources(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _productName    = If(json?.PropertyT <Carbon.Json.JsonString>("product_name"), out var __jsonProductName) ? (string)__jsonProductName : (string)ProductName;
            _productVersion = If(json?.PropertyT <Carbon.Json.JsonString>("product_version"), out var __jsonProductVersion) ? (string)__jsonProductVersion : (string)ProductVersion;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="NetworkRuleIcmpTypeCodeListItemType" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal NetworkRuleIcmpTypeCodeListItemType(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _type = If(json?.PropertyT <Carbon.Json.JsonNumber>("type"), out var __jsonType) ? (int?)__jsonType : Type;
            _code = If(json?.PropertyT <Carbon.Json.JsonNumber>("code"), out var __jsonCode) ? (int?)__jsonCode : Code;
            AfterFromJson(json);
        }
Beispiel #5
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="VmBootConfig" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal VmBootConfig(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _bootDevice          = If(json?.PropertyT <Carbon.Json.JsonObject>("boot_device"), out var __jsonBootDevice) ? Nutanix.Powershell.Models.VmBootDevice.FromJson(__jsonBootDevice) : BootDevice;
            _bootDeviceOrderList = If(json?.PropertyT <Carbon.Json.JsonArray>("boot_device_order_list"), out var __jsonBootDeviceOrderList) ? If(__jsonBootDeviceOrderList, out var __w) ? new System.Func <string[]>(() => System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(__w, (__v) => __v is Carbon.Json.JsonString __u ? (string)__u : null)))() : null : BootDeviceOrderList;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="PlacementDetail" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal PlacementDetail(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _clusterIp        = If(json?.PropertyT <Carbon.Json.JsonString>("cluster_ip"), out var __jsonClusterIp) ? (string)__jsonClusterIp : (string)ClusterIp;
            _clusterReference = If(json?.PropertyT <Carbon.Json.JsonObject>("cluster_reference"), out var __jsonClusterReference) ? Nutanix.Powershell.Models.ClusterReference.FromJson(__jsonClusterReference) : ClusterReference;
            AfterFromJson(json);
        }
Beispiel #7
0
 /// <summary>
 /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="SubnetIntentInput" />.
 /// </summary>
 /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
 internal SubnetIntentInput(Carbon.Json.JsonObject json)
 {
     bool returnNow = false;
     BeforeFromJson(json, ref returnNow);
     if (returnNow)
     {
         return;
     }
     _apiVersion = If( json?.PropertyT<Carbon.Json.JsonString>("api_version"), out var __jsonApiVersion) ? (string)__jsonApiVersion : (string)ApiVersion;
     _metadata = If( json?.PropertyT<Carbon.Json.JsonObject>("metadata"), out var __jsonMetadata) ? Nutanix.Powershell.Models.SubnetMetadata.FromJson(__jsonMetadata) : Metadata;
     _spec = If( json?.PropertyT<Carbon.Json.JsonObject>("spec"), out var __jsonSpec) ? Nutanix.Powershell.Models.Subnet.FromJson(__jsonSpec) : Spec;
     AfterFromJson(json);
 }
Beispiel #8
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="Credentials" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal Credentials(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _password = If(json?.PropertyT <Carbon.Json.JsonString>("password"), out var __jsonPassword) ? (string)__jsonPassword : (string)Password;
            _username = If(json?.PropertyT <Carbon.Json.JsonString>("username"), out var __jsonUsername) ? (string)__jsonUsername : (string)Username;
            AfterFromJson(json);
        }
Beispiel #9
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="EntitySpecCategoryListItemType" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal EntitySpecCategoryListItemType(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _categoryName  = If(json?.PropertyT <Carbon.Json.JsonString>("category_name"), out var __jsonCategoryName) ? (string)__jsonCategoryName : (string)CategoryName;
            _categoryValue = If(json?.PropertyT <Carbon.Json.JsonString>("category_value"), out var __jsonCategoryValue) ? (string)__jsonCategoryValue : (string)CategoryValue;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="ImageMigrateInput" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal ImageMigrateInput(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _clusterReference   = If(json?.PropertyT <Carbon.Json.JsonObject>("cluster_reference"), out var __jsonClusterReference) ? Nutanix.Powershell.Models.ClusterReference.FromJson(__jsonClusterReference) : ClusterReference;
            _imageReferenceList = If(json?.PropertyT <Carbon.Json.JsonArray>("image_reference_list"), out var __jsonImageReferenceList) ? If(__jsonImageReferenceList, out var __v) ? new System.Func <Nutanix.Powershell.Models.IImageReference[]>(() => System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(__v, (__u) => Nutanix.Powershell.Models.ImageReference.FromJson(__u))))() : null : ImageReferenceList;
            AfterFromJson(json);
        }
Beispiel #11
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="PublicKey" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal PublicKey(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _name = If(json?.PropertyT <Carbon.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name;
            _key  = If(json?.PropertyT <Carbon.Json.JsonString>("key"), out var __jsonKey) ? (string)__jsonKey : (string)Key;
            AfterFromJson(json);
        }
Beispiel #12
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="AccessControlPolicyListIntentResponse" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal AccessControlPolicyListIntentResponse(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _apiVersion = If(json?.PropertyT <Carbon.Json.JsonString>("api_version"), out var __jsonApiVersion) ? (string)__jsonApiVersion : (string)ApiVersion;
            _entities   = If(json?.PropertyT <Carbon.Json.JsonString>("entities"), out var __jsonEntities) ? (string)__jsonEntities : (string)Entities;
            AfterFromJson(json);
        }
Beispiel #13
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="TaskPollInput" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal TaskPollInput(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _pollTimeoutSeconds = If(json?.PropertyT <Carbon.Json.JsonNumber>("poll_timeout_seconds"), out var __jsonPollTimeoutSeconds) ? (int)__jsonPollTimeoutSeconds : PollTimeoutSeconds;
            _taskUuidList       = If(json?.PropertyT <Carbon.Json.JsonArray>("task_uuid_list"), out var __jsonTaskUuidList) ? If(__jsonTaskUuidList, out var __v) ? new System.Func <string[]>(() => System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(__v, (__u) => __u is Carbon.Json.JsonString __t ? (string)__t : null)))() : null : TaskUuidList;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="DirectoryServiceUser" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal DirectoryServiceUser(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _directoryServiceReference = If(json?.PropertyT <Carbon.Json.JsonObject>("directory_service_reference"), out var __jsonDirectoryServiceReference) ? Nutanix.Powershell.Models.DirectoryServiceReference.FromJson(__jsonDirectoryServiceReference) : DirectoryServiceReference;
            _userPrincipalName         = If(json?.PropertyT <Carbon.Json.JsonString>("user_principal_name"), out var __jsonUserPrincipalName) ? (string)__jsonUserPrincipalName : (string)UserPrincipalName;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="VmGuestPowerStateTransitionConfig" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal VmGuestPowerStateTransitionConfig(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _enableScriptExec          = If(json?.PropertyT <Carbon.Json.JsonBoolean>("enable_script_exec"), out var __jsonEnableScriptExec) ? (bool?)__jsonEnableScriptExec : EnableScriptExec;
            _shouldFailOnScriptFailure = If(json?.PropertyT <Carbon.Json.JsonBoolean>("should_fail_on_script_failure"), out var __jsonShouldFailOnScriptFailure) ? (bool?)__jsonShouldFailOnScriptFailure : ShouldFailOnScriptFailure;
            AfterFromJson(json);
        }
Beispiel #16
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="SspConfigInput" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal SspConfigInput(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _directoryServiceServiceAccount = If(json?.PropertyT <Carbon.Json.JsonObject>("directory_service_service_account"), out var __jsonDirectoryServiceServiceAccount) ? Nutanix.Powershell.Models.Credentials.FromJson(__jsonDirectoryServiceServiceAccount) : DirectoryServiceServiceAccount;
            _shouldSkipMigration            = If(json?.PropertyT <Carbon.Json.JsonBoolean>("should_skip_migration"), out var __jsonShouldSkipMigration) ? (bool?)__jsonShouldSkipMigration : ShouldSkipMigration;
            AfterFromJson(json);
        }
Beispiel #17
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="IpAddress" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal IpAddress(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _type = If(json?.PropertyT <Carbon.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type;
            _ip   = If(json?.PropertyT <Carbon.Json.JsonString>("ip"), out var __jsonIp) ? (string)__jsonIp : (string)Ip;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="CloudCredentials" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal CloudCredentials(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _name      = If(json?.PropertyT <Carbon.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name;
            _resources = If(json?.PropertyT <Carbon.Json.JsonObject>("resources"), out var __jsonResources) ? Nutanix.Powershell.Models.CloudCredentialsResources.FromJson(__jsonResources) : Resources;
            AfterFromJson(json);
        }
Beispiel #19
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="Checksum" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal Checksum(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _checksumAlgorithm = If(json?.PropertyT <Carbon.Json.JsonString>("checksum_algorithm"), out var __jsonChecksumAlgorithm) ? (string)__jsonChecksumAlgorithm : (string)ChecksumAlgorithm;
            _checksumValue     = If(json?.PropertyT <Carbon.Json.JsonString>("checksum_value"), out var __jsonChecksumValue) ? (string)__jsonChecksumValue : (string)ChecksumValue;
            AfterFromJson(json);
        }
Beispiel #20
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="IpSubnet" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal IpSubnet(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _ip           = If(json?.PropertyT <Carbon.Json.JsonString>("ip"), out var __jsonIp) ? (string)__jsonIp : (string)Ip;
            _prefixLength = If(json?.PropertyT <Carbon.Json.JsonNumber>("prefix_length"), out var __jsonPrefixLength) ? (int?)__jsonPrefixLength : PrefixLength;
            AfterFromJson(json);
        }
Beispiel #21
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="VmPowerStateMechanism" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal VmPowerStateMechanism(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _guestTransitionConfig = If(json?.PropertyT <Carbon.Json.JsonObject>("guest_transition_config"), out var __jsonGuestTransitionConfig) ? Nutanix.Powershell.Models.VmGuestPowerStateTransitionConfig.FromJson(__jsonGuestTransitionConfig) : GuestTransitionConfig;
            _mechanism             = If(json?.PropertyT <Carbon.Json.JsonString>("mechanism"), out var __jsonMechanism) ? (string)__jsonMechanism : (string)Mechanism;
            AfterFromJson(json);
        }
Beispiel #22
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="VmDiskDeviceProperties" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal VmDiskDeviceProperties(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _deviceType  = If(json?.PropertyT <Carbon.Json.JsonString>("device_type"), out var __jsonDeviceType) ? (string)__jsonDeviceType : (string)DeviceType;
            _diskAddress = If(json?.PropertyT <Carbon.Json.JsonObject>("disk_address"), out var __jsonDiskAddress) ? Nutanix.Powershell.Models.DiskAddress.FromJson(__jsonDiskAddress) : DiskAddress;
            AfterFromJson(json);
        }
Beispiel #23
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="HttpProxyWhitelist" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal HttpProxyWhitelist(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _target     = If(json?.PropertyT <Carbon.Json.JsonString>("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;
            _targetType = If(json?.PropertyT <Carbon.Json.JsonString>("target_type"), out var __jsonTargetType) ? (string)__jsonTargetType : (string)TargetType;
            AfterFromJson(json);
        }
Beispiel #24
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="TaskPollResponse" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal TaskPollResponse(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _entities        = If(json?.PropertyT <Carbon.Json.JsonArray>("entities"), out var __jsonEntities) ? If(__jsonEntities, out var __v) ? new System.Func <Nutanix.Powershell.Models.ITask[]>(() => System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(__v, (__u) => Nutanix.Powershell.Models.Task.FromJson(__u))))() : null : Entities;
            _hasPollTimedOut = If(json?.PropertyT <Carbon.Json.JsonBoolean>("has_poll_timed_out"), out var __jsonHasPollTimedOut) ? (bool?)__jsonHasPollTimedOut : HasPollTimedOut;
            AfterFromJson(json);
        }
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="MulticlusterConfigDefStatus" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal MulticlusterConfigDefStatus(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _messageList = If(json?.PropertyT <Carbon.Json.JsonArray>("message_list"), out var __jsonMessageList) ? If(__jsonMessageList, out var __v) ? new System.Func <Nutanix.Powershell.Models.IMessageResource[]>(() => System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(__v, (__u) => Nutanix.Powershell.Models.MessageResource.FromJson(__u))))() : null : MessageList;
            _state       = If(json?.PropertyT <Carbon.Json.JsonString>("state"), out var __jsonState) ? (string)__jsonState : (string)State;
            AfterFromJson(json);
        }
Beispiel #26
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="VmBootDevice" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal VmBootDevice(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _diskAddress = If(json?.PropertyT <Carbon.Json.JsonObject>("disk_address"), out var __jsonDiskAddress) ? Nutanix.Powershell.Models.DiskAddress.FromJson(__jsonDiskAddress) : DiskAddress;
            _macAddress  = If(json?.PropertyT <Carbon.Json.JsonString>("mac_address"), out var __jsonMacAddress) ? (string)__jsonMacAddress : (string)MacAddress;
            AfterFromJson(json);
        }
Beispiel #27
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="PortRange" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal PortRange(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _endPort   = If(json?.PropertyT <Carbon.Json.JsonNumber>("end_port"), out var __jsonEndPort) ? (int?)__jsonEndPort : EndPort;
            _startPort = If(json?.PropertyT <Carbon.Json.JsonNumber>("start_port"), out var __jsonStartPort) ? (int?)__jsonStartPort : StartPort;
            AfterFromJson(json);
        }
Beispiel #28
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="CitrixResourceLocationSpec" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal CitrixResourceLocationSpec(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _name = If(json?.PropertyT <Carbon.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name;
            _id   = If(json?.PropertyT <Carbon.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id;
            AfterFromJson(json);
        }
Beispiel #29
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="ClientAuth" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal ClientAuth(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _name    = If(json?.PropertyT <Carbon.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name;
            _caChain = null /* deserializeFromContainerMember doesn't support 'application/json' C:\Users\anton\.autorest\@[email protected]\node_modules\@microsoft.azure\autorest.incubator\dist\csharp\schema\byte-array.js*/;
            _status  = If(json?.PropertyT <Carbon.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;
            AfterFromJson(json);
        }
Beispiel #30
0
        /// <summary>
        /// Deserializes a Carbon.Json.JsonObject into a new instance of <see cref="TaskReference" />.
        /// </summary>
        /// <param name="json">A Carbon.Json.JsonObject instance to deserialize from.</param>
        internal TaskReference(Carbon.Json.JsonObject json)
        {
            bool returnNow = false;

            BeforeFromJson(json, ref returnNow);
            if (returnNow)
            {
                return;
            }
            _name = If(json?.PropertyT <Carbon.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name;
            _kind = If(json?.PropertyT <Carbon.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind;
            _uuid = If(json?.PropertyT <Carbon.Json.JsonString>("uuid"), out var __jsonUuid) ? (string)__jsonUuid : (string)Uuid;
            AfterFromJson(json);
        }