Class AuthorizationServerUpdateContract

java.lang.Object
com.azure.core.management.ProxyResource
com.azure.resourcemanager.apimanagement.models.AuthorizationServerUpdateContract
All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>

public final class AuthorizationServerUpdateContract extends com.azure.core.management.ProxyResource
External OAuth authorization server settings.
  • Constructor Details

    • AuthorizationServerUpdateContract

      public AuthorizationServerUpdateContract()
      Creates an instance of AuthorizationServerUpdateContract class.
  • Method Details

    • type

      public String type()
      Get the type property: The type of the resource.
      Overrides:
      type in class com.azure.core.management.ProxyResource
      Returns:
      the type value.
    • name

      public String name()
      Get the name property: The name of the resource.
      Overrides:
      name in class com.azure.core.management.ProxyResource
      Returns:
      the name value.
    • id

      public String id()
      Get the id property: Fully qualified resource Id for the resource.
      Overrides:
      id in class com.azure.core.management.ProxyResource
      Returns:
      the id value.
    • displayName

      public String displayName()
      Get the displayName property: User-friendly authorization server name.
      Returns:
      the displayName value.
    • withDisplayName

      public AuthorizationServerUpdateContract withDisplayName(String displayName)
      Set the displayName property: User-friendly authorization server name.
      Parameters:
      displayName - the displayName value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • useInTestConsole

      public Boolean useInTestConsole()
      Get the useInTestConsole property: If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
      Returns:
      the useInTestConsole value.
    • withUseInTestConsole

      public AuthorizationServerUpdateContract withUseInTestConsole(Boolean useInTestConsole)
      Set the useInTestConsole property: If true, the authorization server may be used in the developer portal test console. True by default if no value is provided.
      Parameters:
      useInTestConsole - the useInTestConsole value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • useInApiDocumentation

      public Boolean useInApiDocumentation()
      Get the useInApiDocumentation property: If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
      Returns:
      the useInApiDocumentation value.
    • withUseInApiDocumentation

      public AuthorizationServerUpdateContract withUseInApiDocumentation(Boolean useInApiDocumentation)
      Set the useInApiDocumentation property: If true, the authorization server will be used in the API documentation in the developer portal. False by default if no value is provided.
      Parameters:
      useInApiDocumentation - the useInApiDocumentation value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • clientRegistrationEndpoint

      public String clientRegistrationEndpoint()
      Get the clientRegistrationEndpoint property: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
      Returns:
      the clientRegistrationEndpoint value.
    • withClientRegistrationEndpoint

      public AuthorizationServerUpdateContract withClientRegistrationEndpoint(String clientRegistrationEndpoint)
      Set the clientRegistrationEndpoint property: Optional reference to a page where client or app registration for this authorization server is performed. Contains absolute URL to entity being referenced.
      Parameters:
      clientRegistrationEndpoint - the clientRegistrationEndpoint value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • authorizationEndpoint

      public String authorizationEndpoint()
      Get the authorizationEndpoint property: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
      Returns:
      the authorizationEndpoint value.
    • withAuthorizationEndpoint

      public AuthorizationServerUpdateContract withAuthorizationEndpoint(String authorizationEndpoint)
      Set the authorizationEndpoint property: OAuth authorization endpoint. See http://tools.ietf.org/html/rfc6749#section-3.2.
      Parameters:
      authorizationEndpoint - the authorizationEndpoint value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • grantTypes

      public List<GrantType> grantTypes()
      Get the grantTypes property: Form of an authorization grant, which the client uses to request the access token.
      Returns:
      the grantTypes value.
    • withGrantTypes

      public AuthorizationServerUpdateContract withGrantTypes(List<GrantType> grantTypes)
      Set the grantTypes property: Form of an authorization grant, which the client uses to request the access token.
      Parameters:
      grantTypes - the grantTypes value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • clientId

      public String clientId()
      Get the clientId property: Client or app id registered with this authorization server.
      Returns:
      the clientId value.
    • withClientId

      public AuthorizationServerUpdateContract withClientId(String clientId)
      Set the clientId property: Client or app id registered with this authorization server.
      Parameters:
      clientId - the clientId value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • clientSecret

      public String clientSecret()
      Get the clientSecret property: Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
      Returns:
      the clientSecret value.
    • withClientSecret

      public AuthorizationServerUpdateContract withClientSecret(String clientSecret)
      Set the clientSecret property: Client or app secret registered with this authorization server. This property will not be filled on 'GET' operations! Use '/listSecrets' POST request to get the value.
      Parameters:
      clientSecret - the clientSecret value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • description

      public String description()
      Get the description property: Description of the authorization server. Can contain HTML formatting tags.
      Returns:
      the description value.
    • withDescription

      public AuthorizationServerUpdateContract withDescription(String description)
      Set the description property: Description of the authorization server. Can contain HTML formatting tags.
      Parameters:
      description - the description value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • authorizationMethods

      public List<AuthorizationMethod> authorizationMethods()
      Get the authorizationMethods property: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
      Returns:
      the authorizationMethods value.
    • withAuthorizationMethods

      public AuthorizationServerUpdateContract withAuthorizationMethods(List<AuthorizationMethod> authorizationMethods)
      Set the authorizationMethods property: HTTP verbs supported by the authorization endpoint. GET must be always present. POST is optional.
      Parameters:
      authorizationMethods - the authorizationMethods value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • clientAuthenticationMethod

      public List<ClientAuthenticationMethod> clientAuthenticationMethod()
      Get the clientAuthenticationMethod property: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
      Returns:
      the clientAuthenticationMethod value.
    • withClientAuthenticationMethod

      public AuthorizationServerUpdateContract withClientAuthenticationMethod(List<ClientAuthenticationMethod> clientAuthenticationMethod)
      Set the clientAuthenticationMethod property: Method of authentication supported by the token endpoint of this authorization server. Possible values are Basic and/or Body. When Body is specified, client credentials and other parameters are passed within the request body in the application/x-www-form-urlencoded format.
      Parameters:
      clientAuthenticationMethod - the clientAuthenticationMethod value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • tokenBodyParameters

      public List<TokenBodyParameterContract> tokenBodyParameters()
      Get the tokenBodyParameters property: Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
      Returns:
      the tokenBodyParameters value.
    • withTokenBodyParameters

      public AuthorizationServerUpdateContract withTokenBodyParameters(List<TokenBodyParameterContract> tokenBodyParameters)
      Set the tokenBodyParameters property: Additional parameters required by the token endpoint of this authorization server represented as an array of JSON objects with name and value string properties, i.e. {"name" : "name value", "value": "a value"}.
      Parameters:
      tokenBodyParameters - the tokenBodyParameters value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • tokenEndpoint

      public String tokenEndpoint()
      Get the tokenEndpoint property: OAuth token endpoint. Contains absolute URI to entity being referenced.
      Returns:
      the tokenEndpoint value.
    • withTokenEndpoint

      public AuthorizationServerUpdateContract withTokenEndpoint(String tokenEndpoint)
      Set the tokenEndpoint property: OAuth token endpoint. Contains absolute URI to entity being referenced.
      Parameters:
      tokenEndpoint - the tokenEndpoint value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • supportState

      public Boolean supportState()
      Get the supportState property: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
      Returns:
      the supportState value.
    • withSupportState

      public AuthorizationServerUpdateContract withSupportState(Boolean supportState)
      Set the supportState property: If true, authorization server will include state parameter from the authorization request to its response. Client may use state parameter to raise protocol security.
      Parameters:
      supportState - the supportState value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • defaultScope

      public String defaultScope()
      Get the defaultScope property: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
      Returns:
      the defaultScope value.
    • withDefaultScope

      public AuthorizationServerUpdateContract withDefaultScope(String defaultScope)
      Set the defaultScope property: Access token scope that is going to be requested by default. Can be overridden at the API level. Should be provided in the form of a string containing space-delimited values.
      Parameters:
      defaultScope - the defaultScope value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • bearerTokenSendingMethods

      public List<BearerTokenSendingMethod> bearerTokenSendingMethods()
      Get the bearerTokenSendingMethods property: Specifies the mechanism by which access token is passed to the API.
      Returns:
      the bearerTokenSendingMethods value.
    • withBearerTokenSendingMethods

      public AuthorizationServerUpdateContract withBearerTokenSendingMethods(List<BearerTokenSendingMethod> bearerTokenSendingMethods)
      Set the bearerTokenSendingMethods property: Specifies the mechanism by which access token is passed to the API.
      Parameters:
      bearerTokenSendingMethods - the bearerTokenSendingMethods value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • resourceOwnerUsername

      public String resourceOwnerUsername()
      Get the resourceOwnerUsername property: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
      Returns:
      the resourceOwnerUsername value.
    • withResourceOwnerUsername

      public AuthorizationServerUpdateContract withResourceOwnerUsername(String resourceOwnerUsername)
      Set the resourceOwnerUsername property: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner username.
      Parameters:
      resourceOwnerUsername - the resourceOwnerUsername value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • resourceOwnerPassword

      public String resourceOwnerPassword()
      Get the resourceOwnerPassword property: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
      Returns:
      the resourceOwnerPassword value.
    • withResourceOwnerPassword

      public AuthorizationServerUpdateContract withResourceOwnerPassword(String resourceOwnerPassword)
      Set the resourceOwnerPassword property: Can be optionally specified when resource owner password grant type is supported by this authorization server. Default resource owner password.
      Parameters:
      resourceOwnerPassword - the resourceOwnerPassword value to set.
      Returns:
      the AuthorizationServerUpdateContract object itself.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
      Overrides:
      toJson in class com.azure.core.management.ProxyResource
      Throws:
      IOException
    • fromJson

      public static AuthorizationServerUpdateContract fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AuthorizationServerUpdateContract from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AuthorizationServerUpdateContract 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 AuthorizationServerUpdateContract.