Class OperationContractProperties
java.lang.Object
com.azure.resourcemanager.apimanagement.models.OperationEntityBaseContract
com.azure.resourcemanager.apimanagement.fluent.models.OperationContractProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<OperationEntityBaseContract>
Operation Contract Properties.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of OperationContractProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the displayName property: Operation Name.static OperationContractPropertiesfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of OperationContractProperties from the JsonReader.method()Get the method property: A Valid HTTP Operation Method.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Get the urlTemplate property: Relative URL template identifying the target resource for this operation.voidvalidate()Validates the instance.withDescription(String description) Set the description property: Description of the operation.withDisplayName(String displayName) Set the displayName property: Operation Name.withMethod(String method) Set the method property: A Valid HTTP Operation Method.withPolicies(String policies) Set the policies property: Operation Policies.withRequest(RequestContract request) Set the request property: An entity containing request details.withResponses(List<ResponseContract> responses) Set the responses property: Array of Operation responses.withTemplateParameters(List<ParameterContract> templateParameters) Set the templateParameters property: Collection of URL template parameters.withUrlTemplate(String urlTemplate) Set the urlTemplate property: Relative URL template identifying the target resource for this operation.Methods inherited from class com.azure.resourcemanager.apimanagement.models.OperationEntityBaseContract
description, policies, request, responses, templateParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
OperationContractProperties
public OperationContractProperties()Creates an instance of OperationContractProperties class.
-
-
Method Details
-
displayName
Get the displayName property: Operation Name.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: Operation Name.- Parameters:
displayName- the displayName value to set.- Returns:
- the OperationContractProperties object itself.
-
method
Get the method property: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.- Returns:
- the method value.
-
withMethod
Set the method property: A Valid HTTP Operation Method. Typical Http Methods like GET, PUT, POST but not limited by only them.- Parameters:
method- the method value to set.- Returns:
- the OperationContractProperties object itself.
-
urlTemplate
Get the urlTemplate property: Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}.- Returns:
- the urlTemplate value.
-
withUrlTemplate
Set the urlTemplate property: Relative URL template identifying the target resource for this operation. May include parameters. Example: /customers/{cid}/orders/{oid}/?date={date}.- Parameters:
urlTemplate- the urlTemplate value to set.- Returns:
- the OperationContractProperties object itself.
-
withTemplateParameters
public OperationContractProperties withTemplateParameters(List<ParameterContract> templateParameters) Set the templateParameters property: Collection of URL template parameters.- Overrides:
withTemplateParametersin classOperationEntityBaseContract- Parameters:
templateParameters- the templateParameters value to set.- Returns:
- the OperationEntityBaseContract object itself.
-
withDescription
Set the description property: Description of the operation. May include HTML formatting tags.- Overrides:
withDescriptionin classOperationEntityBaseContract- Parameters:
description- the description value to set.- Returns:
- the OperationEntityBaseContract object itself.
-
withRequest
Set the request property: An entity containing request details.- Overrides:
withRequestin classOperationEntityBaseContract- Parameters:
request- the request value to set.- Returns:
- the OperationEntityBaseContract object itself.
-
withResponses
Set the responses property: Array of Operation responses.- Overrides:
withResponsesin classOperationEntityBaseContract- Parameters:
responses- the responses value to set.- Returns:
- the OperationEntityBaseContract object itself.
-
withPolicies
Set the policies property: Operation Policies.- Overrides:
withPoliciesin classOperationEntityBaseContract- Parameters:
policies- the policies value to set.- Returns:
- the OperationEntityBaseContract object itself.
-
validate
public void validate()Validates the instance.- Overrides:
validatein classOperationEntityBaseContract- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<OperationEntityBaseContract>- Overrides:
toJsonin classOperationEntityBaseContract- Throws:
IOException
-
fromJson
public static OperationContractProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of OperationContractProperties from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of OperationContractProperties if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the OperationContractProperties.
-