All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.bedrockagent.model.ApiSchema.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockagent.model



/**
 * Contains details about the OpenAPI schema for the action group. For more information, see [Action group OpenAPI schemas](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html). You can either include the schema directly in the `payload` field or you can upload it to an S3 bucket and specify the S3 bucket location in the `s3` field.
 */
public sealed class ApiSchema {
    /**
     * The JSON or YAML-formatted payload defining the OpenAPI schema for the action group. For more information, see [Action group OpenAPI schemas](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html).
     */
    public data class Payload(val value: kotlin.String) : aws.sdk.kotlin.services.bedrockagent.model.ApiSchema() {
    }

    /**
     * Contains details about the S3 object containing the OpenAPI schema for the action group. For more information, see [Action group OpenAPI schemas](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html).
     */
    public data class S3(val value: aws.sdk.kotlin.services.bedrockagent.model.S3Identifier) : aws.sdk.kotlin.services.bedrockagent.model.ApiSchema() {
    }

    public object SdkUnknown : aws.sdk.kotlin.services.bedrockagent.model.ApiSchema() {
    }

    /**
     * Casts this [ApiSchema] as a [Payload] and retrieves its [kotlin.String] value. Throws an exception if the [ApiSchema] is not a
     * [Payload].
     */
    public fun asPayload(): kotlin.String = (this as ApiSchema.Payload).value

    /**
     * Casts this [ApiSchema] as a [Payload] and retrieves its [kotlin.String] value. Returns null if the [ApiSchema] is not a [Payload].
     */
    public fun asPayloadOrNull(): kotlin.String? = (this as? ApiSchema.Payload)?.value

    /**
     * Casts this [ApiSchema] as a [S3] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.S3Identifier] value. Throws an exception if the [ApiSchema] is not a
     * [S3].
     */
    public fun asS3(): aws.sdk.kotlin.services.bedrockagent.model.S3Identifier = (this as ApiSchema.S3).value

    /**
     * Casts this [ApiSchema] as a [S3] and retrieves its [aws.sdk.kotlin.services.bedrockagent.model.S3Identifier] value. Returns null if the [ApiSchema] is not a [S3].
     */
    public fun asS3OrNull(): aws.sdk.kotlin.services.bedrockagent.model.S3Identifier? = (this as? ApiSchema.S3)?.value
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy