Class ApiContractProperties
- java.lang.Object
-
- com.azure.resourcemanager.apimanagement.models.ApiEntityBaseContract
-
- com.azure.resourcemanager.apimanagement.fluent.models.ApiContractProperties
-
- Direct Known Subclasses:
ApiCreateOrUpdateProperties
public class ApiContractProperties extends ApiEntityBaseContract
API Entity Properties.
-
-
Constructor Summary
Constructors Constructor Description ApiContractProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiVersionSetContractDetails
apiVersionSet()
Get the apiVersionSet property: Version set details.String
displayName()
Get the displayName property: API name.String
path()
Get the path property: Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance.List<Protocol>
protocols()
Get the protocols property: Describes on which protocols the operations in this API can be invoked.String
serviceUrl()
Get the serviceUrl property: Absolute URL of the backend service implementing this API.String
sourceApiId()
Get the sourceApiId property: API identifier of the source API.void
validate()
Validates the instance.ApiContractProperties
withApiRevision(String apiRevision)
Set the apiRevision property: Describes the revision of the API.ApiContractProperties
withApiRevisionDescription(String apiRevisionDescription)
Set the apiRevisionDescription property: Description of the API Revision.ApiContractProperties
withApiType(ApiType apiType)
Set the apiType property: Type of API.ApiContractProperties
withApiVersion(String apiVersion)
Set the apiVersion property: Indicates the version identifier of the API if the API is versioned.ApiContractProperties
withApiVersionDescription(String apiVersionDescription)
Set the apiVersionDescription property: Description of the API Version.ApiContractProperties
withApiVersionSet(ApiVersionSetContractDetails apiVersionSet)
Set the apiVersionSet property: Version set details.ApiContractProperties
withApiVersionSetId(String apiVersionSetId)
Set the apiVersionSetId property: A resource identifier for the related ApiVersionSet.ApiContractProperties
withAuthenticationSettings(AuthenticationSettingsContract authenticationSettings)
Set the authenticationSettings property: Collection of authentication settings included into this API.ApiContractProperties
withContact(ApiContactInformation contact)
Set the contact property: Contact information for the API.ApiContractProperties
withDescription(String description)
Set the description property: Description of the API.ApiContractProperties
withDisplayName(String displayName)
Set the displayName property: API name.ApiContractProperties
withIsCurrent(Boolean isCurrent)
Set the isCurrent property: Indicates if API revision is current api revision.ApiContractProperties
withLicense(ApiLicenseInformation license)
Set the license property: License information for the API.ApiContractProperties
withPath(String path)
Set the path property: Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance.ApiContractProperties
withProtocols(List<Protocol> protocols)
Set the protocols property: Describes on which protocols the operations in this API can be invoked.ApiContractProperties
withServiceUrl(String serviceUrl)
Set the serviceUrl property: Absolute URL of the backend service implementing this API.ApiContractProperties
withSourceApiId(String sourceApiId)
Set the sourceApiId property: API identifier of the source API.ApiContractProperties
withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames)
Set the subscriptionKeyParameterNames property: Protocols over which API is made available.ApiContractProperties
withSubscriptionRequired(Boolean subscriptionRequired)
Set the subscriptionRequired property: Specifies whether an API or Product subscription is required for accessing the API.ApiContractProperties
withTermsOfServiceUrl(String termsOfServiceUrl)
Set the termsOfServiceUrl property: A URL to the Terms of Service for the API.-
Methods inherited from class com.azure.resourcemanager.apimanagement.models.ApiEntityBaseContract
apiRevision, apiRevisionDescription, apiType, apiVersion, apiVersionDescription, apiVersionSetId, authenticationSettings, contact, description, isCurrent, isOnline, license, subscriptionKeyParameterNames, subscriptionRequired, termsOfServiceUrl
-
-
-
-
Method Detail
-
sourceApiId
public String sourceApiId()
Get the sourceApiId property: API identifier of the source API.- Returns:
- the sourceApiId value.
-
withSourceApiId
public ApiContractProperties withSourceApiId(String sourceApiId)
Set the sourceApiId property: API identifier of the source API.- Parameters:
sourceApiId
- the sourceApiId value to set.- Returns:
- the ApiContractProperties object itself.
-
displayName
public String displayName()
Get the displayName property: API name. Must be 1 to 300 characters long.- Returns:
- the displayName value.
-
withDisplayName
public ApiContractProperties withDisplayName(String displayName)
Set the displayName property: API name. Must be 1 to 300 characters long.- Parameters:
displayName
- the displayName value to set.- Returns:
- the ApiContractProperties object itself.
-
serviceUrl
public String serviceUrl()
Get the serviceUrl property: Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.- Returns:
- the serviceUrl value.
-
withServiceUrl
public ApiContractProperties withServiceUrl(String serviceUrl)
Set the serviceUrl property: Absolute URL of the backend service implementing this API. Cannot be more than 2000 characters long.- Parameters:
serviceUrl
- the serviceUrl value to set.- Returns:
- the ApiContractProperties object itself.
-
path
public String path()
Get the path property: Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.- Returns:
- the path value.
-
withPath
public ApiContractProperties withPath(String path)
Set the path property: Relative URL uniquely identifying this API and all of its resource paths within the API Management service instance. It is appended to the API endpoint base URL specified during the service instance creation to form a public URL for this API.- Parameters:
path
- the path value to set.- Returns:
- the ApiContractProperties object itself.
-
protocols
public List<Protocol> protocols()
Get the protocols property: Describes on which protocols the operations in this API can be invoked.- Returns:
- the protocols value.
-
withProtocols
public ApiContractProperties withProtocols(List<Protocol> protocols)
Set the protocols property: Describes on which protocols the operations in this API can be invoked.- Parameters:
protocols
- the protocols value to set.- Returns:
- the ApiContractProperties object itself.
-
apiVersionSet
public ApiVersionSetContractDetails apiVersionSet()
Get the apiVersionSet property: Version set details.- Returns:
- the apiVersionSet value.
-
withApiVersionSet
public ApiContractProperties withApiVersionSet(ApiVersionSetContractDetails apiVersionSet)
Set the apiVersionSet property: Version set details.- Parameters:
apiVersionSet
- the apiVersionSet value to set.- Returns:
- the ApiContractProperties object itself.
-
withDescription
public ApiContractProperties withDescription(String description)
Set the description property: Description of the API. May include HTML formatting tags.- Overrides:
withDescription
in classApiEntityBaseContract
- Parameters:
description
- the description value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withAuthenticationSettings
public ApiContractProperties withAuthenticationSettings(AuthenticationSettingsContract authenticationSettings)
Set the authenticationSettings property: Collection of authentication settings included into this API.- Overrides:
withAuthenticationSettings
in classApiEntityBaseContract
- Parameters:
authenticationSettings
- the authenticationSettings value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withSubscriptionKeyParameterNames
public ApiContractProperties withSubscriptionKeyParameterNames(SubscriptionKeyParameterNamesContract subscriptionKeyParameterNames)
Set the subscriptionKeyParameterNames property: Protocols over which API is made available.- Overrides:
withSubscriptionKeyParameterNames
in classApiEntityBaseContract
- Parameters:
subscriptionKeyParameterNames
- the subscriptionKeyParameterNames value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withApiType
public ApiContractProperties withApiType(ApiType apiType)
Set the apiType property: Type of API.- Overrides:
withApiType
in classApiEntityBaseContract
- Parameters:
apiType
- the apiType value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withApiRevision
public ApiContractProperties withApiRevision(String apiRevision)
Set the apiRevision property: Describes the revision of the API. If no value is provided, default revision 1 is created.- Overrides:
withApiRevision
in classApiEntityBaseContract
- Parameters:
apiRevision
- the apiRevision value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withApiVersion
public ApiContractProperties withApiVersion(String apiVersion)
Set the apiVersion property: Indicates the version identifier of the API if the API is versioned.- Overrides:
withApiVersion
in classApiEntityBaseContract
- Parameters:
apiVersion
- the apiVersion value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withIsCurrent
public ApiContractProperties withIsCurrent(Boolean isCurrent)
Set the isCurrent property: Indicates if API revision is current api revision.- Overrides:
withIsCurrent
in classApiEntityBaseContract
- Parameters:
isCurrent
- the isCurrent value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withApiRevisionDescription
public ApiContractProperties withApiRevisionDescription(String apiRevisionDescription)
Set the apiRevisionDescription property: Description of the API Revision.- Overrides:
withApiRevisionDescription
in classApiEntityBaseContract
- Parameters:
apiRevisionDescription
- the apiRevisionDescription value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withApiVersionDescription
public ApiContractProperties withApiVersionDescription(String apiVersionDescription)
Set the apiVersionDescription property: Description of the API Version.- Overrides:
withApiVersionDescription
in classApiEntityBaseContract
- Parameters:
apiVersionDescription
- the apiVersionDescription value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withApiVersionSetId
public ApiContractProperties withApiVersionSetId(String apiVersionSetId)
Set the apiVersionSetId property: A resource identifier for the related ApiVersionSet.- Overrides:
withApiVersionSetId
in classApiEntityBaseContract
- Parameters:
apiVersionSetId
- the apiVersionSetId value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withSubscriptionRequired
public ApiContractProperties withSubscriptionRequired(Boolean subscriptionRequired)
Set the subscriptionRequired property: Specifies whether an API or Product subscription is required for accessing the API.- Overrides:
withSubscriptionRequired
in classApiEntityBaseContract
- Parameters:
subscriptionRequired
- the subscriptionRequired value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withTermsOfServiceUrl
public ApiContractProperties withTermsOfServiceUrl(String termsOfServiceUrl)
Set the termsOfServiceUrl property: A URL to the Terms of Service for the API. MUST be in the format of a URL.- Overrides:
withTermsOfServiceUrl
in classApiEntityBaseContract
- Parameters:
termsOfServiceUrl
- the termsOfServiceUrl value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withContact
public ApiContractProperties withContact(ApiContactInformation contact)
Set the contact property: Contact information for the API.- Overrides:
withContact
in classApiEntityBaseContract
- Parameters:
contact
- the contact value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
withLicense
public ApiContractProperties withLicense(ApiLicenseInformation license)
Set the license property: License information for the API.- Overrides:
withLicense
in classApiEntityBaseContract
- Parameters:
license
- the license value to set.- Returns:
- the ApiEntityBaseContract object itself.
-
validate
public void validate()
Validates the instance.- Overrides:
validate
in classApiEntityBaseContract
- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
-