| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.Management.Search.Models |
| | 12 | | { |
| | 13 | | using Microsoft.Rest; |
| | 14 | | using Microsoft.Rest.Azure; |
| | 15 | | using Newtonsoft.Json; |
| | 16 | | using System.Collections; |
| | 17 | | using System.Collections.Generic; |
| | 18 | | using System.Linq; |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// Base type for all Azure resources. |
| | 22 | | /// </summary> |
| | 23 | | public partial class Resource : IResource |
| | 24 | | { |
| | 25 | | /// <summary> |
| | 26 | | /// Initializes a new instance of the Resource class. |
| | 27 | | /// </summary> |
| 1204 | 28 | | public Resource() |
| | 29 | | { |
| | 30 | | CustomInit(); |
| 1204 | 31 | | } |
| | 32 | |
|
| | 33 | | /// <summary> |
| | 34 | | /// Initializes a new instance of the Resource class. |
| | 35 | | /// </summary> |
| | 36 | | /// <param name="id">The ID of the resource. This can be used with the |
| | 37 | | /// Azure Resource Manager to link resources together.</param> |
| | 38 | | /// <param name="name">The name of the resource.</param> |
| | 39 | | /// <param name="type">The resource type.</param> |
| | 40 | | /// <param name="location">The geographic location of the resource. |
| | 41 | | /// This must be one of the supported and registered Azure Geo Regions |
| | 42 | | /// (for example, West US, East US, Southeast Asia, and so forth). This |
| | 43 | | /// property is required when creating a new resource.</param> |
| | 44 | | /// <param name="tags">Tags to help categorize the resource in the |
| | 45 | | /// Azure portal.</param> |
| | 46 | | /// <param name="identity">The identity of the resource.</param> |
| 0 | 47 | | public Resource(string id = default(string), string name = default(string), string type = default(string), strin |
| | 48 | | { |
| 0 | 49 | | Id = id; |
| 0 | 50 | | Name = name; |
| 0 | 51 | | Type = type; |
| 0 | 52 | | Location = location; |
| 0 | 53 | | Tags = tags; |
| 0 | 54 | | Identity = identity; |
| | 55 | | CustomInit(); |
| 0 | 56 | | } |
| | 57 | |
|
| | 58 | | /// <summary> |
| | 59 | | /// An initialization method that performs custom operations like setting defaults |
| | 60 | | /// </summary> |
| | 61 | | partial void CustomInit(); |
| | 62 | |
|
| | 63 | | /// <summary> |
| | 64 | | /// Gets the ID of the resource. This can be used with the Azure |
| | 65 | | /// Resource Manager to link resources together. |
| | 66 | | /// </summary> |
| | 67 | | [JsonProperty(PropertyName = "id")] |
| 1204 | 68 | | public string Id { get; private set; } |
| | 69 | |
|
| | 70 | | /// <summary> |
| | 71 | | /// Gets the name of the resource. |
| | 72 | | /// </summary> |
| | 73 | | [JsonProperty(PropertyName = "name")] |
| 1204 | 74 | | public string Name { get; private set; } |
| | 75 | |
|
| | 76 | | /// <summary> |
| | 77 | | /// Gets the resource type. |
| | 78 | | /// </summary> |
| | 79 | | [JsonProperty(PropertyName = "type")] |
| 1204 | 80 | | public string Type { get; private set; } |
| | 81 | |
|
| | 82 | | /// <summary> |
| | 83 | | /// Gets or sets the geographic location of the resource. This must be |
| | 84 | | /// one of the supported and registered Azure Geo Regions (for example, |
| | 85 | | /// West US, East US, Southeast Asia, and so forth). This property is |
| | 86 | | /// required when creating a new resource. |
| | 87 | | /// </summary> |
| | 88 | | [JsonProperty(PropertyName = "location")] |
| 1806 | 89 | | public string Location { get; set; } |
| | 90 | |
|
| | 91 | | /// <summary> |
| | 92 | | /// Gets or sets tags to help categorize the resource in the Azure |
| | 93 | | /// portal. |
| | 94 | | /// </summary> |
| | 95 | | [JsonProperty(PropertyName = "tags")] |
| 0 | 96 | | public IDictionary<string, string> Tags { get; set; } |
| | 97 | |
|
| | 98 | | /// <summary> |
| | 99 | | /// Gets or sets the identity of the resource. |
| | 100 | | /// </summary> |
| | 101 | | [JsonProperty(PropertyName = "identity")] |
| 0 | 102 | | public Identity Identity { get; set; } |
| | 103 | |
|
| | 104 | | /// <summary> |
| | 105 | | /// Validate the object. |
| | 106 | | /// </summary> |
| | 107 | | /// <exception cref="ValidationException"> |
| | 108 | | /// Thrown if validation fails |
| | 109 | | /// </exception> |
| | 110 | | public virtual void Validate() |
| | 111 | | { |
| 602 | 112 | | if (Identity != null) |
| | 113 | | { |
| 0 | 114 | | Identity.Validate(); |
| | 115 | | } |
| 602 | 116 | | } |
| | 117 | | } |
| | 118 | | } |