ResourceWithOptionalLocation Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. core. management. Resource - com.
azure. resourcemanager. compute. models. ResourceWithOptionalLocation
- com.
- com.
- com.
public class ResourceWithOptionalLocation
extends Resource
The Resource model definition with location property as optional.
Constructor Summary
Constructor | Description |
---|---|
ResourceWithOptionalLocation() |
Creates an instance of Resource |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Resource |
fromJson(JsonReader jsonReader)
Reads an instance of Resource |
String |
id()
Get the id property: Fully qualified resource Id for the resource. |
String |
name()
Get the name property: The name of the resource. |
Json |
toJson(JsonWriter jsonWriter) |
String |
type()
Get the type property: The type of the resource. |
void |
validate()
Validates the instance. |
Resource |
withLocation(String location) |
Resource |
withTags(Map<String,String> tags) |
Methods inherited from ProxyResource
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
ResourceWithOptionalLocation
public ResourceWithOptionalLocation()
Creates an instance of ResourceWithOptionalLocation class.
Method Details
fromJson
public static ResourceWithOptionalLocation fromJson(JsonReader jsonReader)
Reads an instance of ResourceWithOptionalLocation from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
ResourceWithOptionalLocation.id()Returns:
name
public String name()
Get the name property: The name of the resource.
Overrides:
ResourceWithOptionalLocation.name()Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
ResourceWithOptionalLocation.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Overrides:
ResourceWithOptionalLocation.type()Returns:
validate
public void validate()
Validates the instance.
withLocation
public ResourceWithOptionalLocation withLocation(String location)
Overrides:
ResourceWithOptionalLocation.withLocation(String location)Parameters:
withTags
public ResourceWithOptionalLocation withTags(Map
Overrides:
ResourceWithOptionalLocation.withTags(Map<String,String> tags)Parameters:
Applies to
Azure SDK for Java