Class: MicrosoftGraph::Models::ApiApplication

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/api_application.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new apiApplication and sets the default values.



64
65
66
# File 'lib/models/api_application.rb', line 64

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a api_application

Raises:

  • (StandardError)


72
73
74
75
# File 'lib/models/api_application.rb', line 72

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ApiApplication.new
end

Instance Method Details

#accept_mapped_claimsObject

Gets the acceptMappedClaims property value. When true, allows an application to use claims mapping without specifying a custom signing key.

Returns:

  • a boolean



34
35
36
# File 'lib/models/api_application.rb', line 34

def accept_mapped_claims
    return @accept_mapped_claims
end

#accept_mapped_claims=(value) ⇒ Object

Sets the acceptMappedClaims property value. When true, allows an application to use claims mapping without specifying a custom signing key.

Parameters:

  • value

    Value to set for the acceptMappedClaims property.

Returns:

  • a void



42
43
44
# File 'lib/models/api_application.rb', line 42

def accept_mapped_claims=(value)
    @accept_mapped_claims = value
end

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



49
50
51
# File 'lib/models/api_application.rb', line 49

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



57
58
59
# File 'lib/models/api_application.rb', line 57

def additional_data=(value)
    @additional_data = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



80
81
82
83
84
85
86
87
88
89
# File 'lib/models/api_application.rb', line 80

def get_field_deserializers()
    return {
        "acceptMappedClaims" => lambda {|n| @accept_mapped_claims = n.get_boolean_value() },
        "knownClientApplications" => lambda {|n| @known_client_applications = n.get_collection_of_primitive_values(UUIDTools::UUID) },
        "oauth2PermissionScopes" => lambda {|n| @oauth2_permission_scopes = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PermissionScope.create_from_discriminator_value(pn) }) },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "preAuthorizedApplications" => lambda {|n| @pre_authorized_applications = n.get_collection_of_object_values(lambda {|pn| MicrosoftGraph::Models::PreAuthorizedApplication.create_from_discriminator_value(pn) }) },
        "requestedAccessTokenVersion" => lambda {|n| @requested_access_token_version = n.get_number_value() },
    }
end

#known_client_applicationsObject

Gets the knownClientApplications property value. Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Azure AD knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant.

Returns:

  • a guid



94
95
96
# File 'lib/models/api_application.rb', line 94

def known_client_applications
    return @known_client_applications
end

#known_client_applications=(value) ⇒ Object

Sets the knownClientApplications property value. Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Azure AD knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant.

Parameters:

  • value

    Value to set for the knownClientApplications property.

Returns:

  • a void



102
103
104
# File 'lib/models/api_application.rb', line 102

def known_client_applications=(value)
    @known_client_applications = value
end

#oauth2_permission_scopesObject

Gets the oauth2PermissionScopes property value. The definition of the delegated permissions exposed by the web API represented by this application registration. These delegated permissions may be requested by a client application, and may be granted by users or administrators during consent. Delegated permissions are sometimes referred to as OAuth 2.0 scopes.

Returns:

  • a permission_scope



109
110
111
# File 'lib/models/api_application.rb', line 109

def oauth2_permission_scopes
    return @oauth2_permission_scopes
end

#oauth2_permission_scopes=(value) ⇒ Object

Sets the oauth2PermissionScopes property value. The definition of the delegated permissions exposed by the web API represented by this application registration. These delegated permissions may be requested by a client application, and may be granted by users or administrators during consent. Delegated permissions are sometimes referred to as OAuth 2.0 scopes.

Parameters:

  • value

    Value to set for the oauth2PermissionScopes property.

Returns:

  • a void



117
118
119
# File 'lib/models/api_application.rb', line 117

def oauth2_permission_scopes=(value)
    @oauth2_permission_scopes = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



124
125
126
# File 'lib/models/api_application.rb', line 124

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



132
133
134
# File 'lib/models/api_application.rb', line 132

def odata_type=(value)
    @odata_type = value
end

#pre_authorized_applicationsObject

Gets the preAuthorizedApplications property value. Lists the client applications that are pre-authorized with the specified delegated permissions to access this application’s APIs. Users are not required to consent to any pre-authorized application (for the permissions specified). However, any additional permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent.

Returns:

  • a pre_authorized_application



139
140
141
# File 'lib/models/api_application.rb', line 139

def pre_authorized_applications
    return @pre_authorized_applications
end

#pre_authorized_applications=(value) ⇒ Object

Sets the preAuthorizedApplications property value. Lists the client applications that are pre-authorized with the specified delegated permissions to access this application’s APIs. Users are not required to consent to any pre-authorized application (for the permissions specified). However, any additional permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent.

Parameters:

  • value

    Value to set for the preAuthorizedApplications property.

Returns:

  • a void



147
148
149
# File 'lib/models/api_application.rb', line 147

def pre_authorized_applications=(value)
    @pre_authorized_applications = value
end

#requested_access_token_versionObject

Gets the requestedAccessTokenVersion property value. Specifies the access token version expected by this resource. This changes the version and format of the JWT produced independent of the endpoint or client used to request the access token. The endpoint used, v1.0 or v2.0, is chosen by the client and only impacts the version of id_tokens. Resources need to explicitly configure requestedAccessTokenVersion to indicate the supported access token format. Possible values for requestedAccessTokenVersion are 1, 2, or null. If the value is null, this defaults to 1, which corresponds to the v1.0 endpoint. If signInAudience on the application is configured as AzureADandPersonalMicrosoftAccount or PersonalMicrosoftAccount, the value for this property must be 2.

Returns:

  • a integer



154
155
156
# File 'lib/models/api_application.rb', line 154

def requested_access_token_version
    return @requested_access_token_version
end

#requested_access_token_version=(value) ⇒ Object

Sets the requestedAccessTokenVersion property value. Specifies the access token version expected by this resource. This changes the version and format of the JWT produced independent of the endpoint or client used to request the access token. The endpoint used, v1.0 or v2.0, is chosen by the client and only impacts the version of id_tokens. Resources need to explicitly configure requestedAccessTokenVersion to indicate the supported access token format. Possible values for requestedAccessTokenVersion are 1, 2, or null. If the value is null, this defaults to 1, which corresponds to the v1.0 endpoint. If signInAudience on the application is configured as AzureADandPersonalMicrosoftAccount or PersonalMicrosoftAccount, the value for this property must be 2.

Parameters:

  • value

    Value to set for the requestedAccessTokenVersion property.

Returns:

  • a void



162
163
164
# File 'lib/models/api_application.rb', line 162

def requested_access_token_version=(value)
    @requested_access_token_version = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


170
171
172
173
174
175
176
177
178
179
# File 'lib/models/api_application.rb', line 170

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_boolean_value("acceptMappedClaims", @accept_mapped_claims)
    writer.write_collection_of_primitive_values("knownClientApplications", @known_client_applications)
    writer.write_collection_of_object_values("oauth2PermissionScopes", @oauth2_permission_scopes)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_collection_of_object_values("preAuthorizedApplications", @pre_authorized_applications)
    writer.write_number_value("requestedAccessTokenVersion", @requested_access_token_version)
    writer.write_additional_data(@additional_data)
end