/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Glue { namespace Model { /** */ class CreateSchemaRequest : public GlueRequest { public: AWS_GLUE_API CreateSchemaRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateSchema"; } AWS_GLUE_API Aws::String SerializePayload() const override; AWS_GLUE_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

This is a wrapper shape to contain the registry identity fields. If this is * not provided, the default registry will be used. The ARN format for the same * will be: arn:aws:glue:us-east-2:<customer * id>:registry/default-registry:random-5-letter-id.

*/ inline const RegistryId& GetRegistryId() const{ return m_registryId; } /** *

This is a wrapper shape to contain the registry identity fields. If this is * not provided, the default registry will be used. The ARN format for the same * will be: arn:aws:glue:us-east-2:<customer * id>:registry/default-registry:random-5-letter-id.

*/ inline bool RegistryIdHasBeenSet() const { return m_registryIdHasBeenSet; } /** *

This is a wrapper shape to contain the registry identity fields. If this is * not provided, the default registry will be used. The ARN format for the same * will be: arn:aws:glue:us-east-2:<customer * id>:registry/default-registry:random-5-letter-id.

*/ inline void SetRegistryId(const RegistryId& value) { m_registryIdHasBeenSet = true; m_registryId = value; } /** *

This is a wrapper shape to contain the registry identity fields. If this is * not provided, the default registry will be used. The ARN format for the same * will be: arn:aws:glue:us-east-2:<customer * id>:registry/default-registry:random-5-letter-id.

*/ inline void SetRegistryId(RegistryId&& value) { m_registryIdHasBeenSet = true; m_registryId = std::move(value); } /** *

This is a wrapper shape to contain the registry identity fields. If this is * not provided, the default registry will be used. The ARN format for the same * will be: arn:aws:glue:us-east-2:<customer * id>:registry/default-registry:random-5-letter-id.

*/ inline CreateSchemaRequest& WithRegistryId(const RegistryId& value) { SetRegistryId(value); return *this;} /** *

This is a wrapper shape to contain the registry identity fields. If this is * not provided, the default registry will be used. The ARN format for the same * will be: arn:aws:glue:us-east-2:<customer * id>:registry/default-registry:random-5-letter-id.

*/ inline CreateSchemaRequest& WithRegistryId(RegistryId&& value) { SetRegistryId(std::move(value)); return *this;} /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline const Aws::String& GetSchemaName() const{ return m_schemaName; } /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline bool SchemaNameHasBeenSet() const { return m_schemaNameHasBeenSet; } /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline void SetSchemaName(const Aws::String& value) { m_schemaNameHasBeenSet = true; m_schemaName = value; } /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline void SetSchemaName(Aws::String&& value) { m_schemaNameHasBeenSet = true; m_schemaName = std::move(value); } /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline void SetSchemaName(const char* value) { m_schemaNameHasBeenSet = true; m_schemaName.assign(value); } /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline CreateSchemaRequest& WithSchemaName(const Aws::String& value) { SetSchemaName(value); return *this;} /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline CreateSchemaRequest& WithSchemaName(Aws::String&& value) { SetSchemaName(std::move(value)); return *this;} /** *

Name of the schema to be created of max length of 255, and may only contain * letters, numbers, hyphen, underscore, dollar sign, or hash mark. No * whitespace.

*/ inline CreateSchemaRequest& WithSchemaName(const char* value) { SetSchemaName(value); return *this;} /** *

The data format of the schema definition. Currently AVRO, * JSON and PROTOBUF are supported.

*/ inline const DataFormat& GetDataFormat() const{ return m_dataFormat; } /** *

The data format of the schema definition. Currently AVRO, * JSON and PROTOBUF are supported.

*/ inline bool DataFormatHasBeenSet() const { return m_dataFormatHasBeenSet; } /** *

The data format of the schema definition. Currently AVRO, * JSON and PROTOBUF are supported.

*/ inline void SetDataFormat(const DataFormat& value) { m_dataFormatHasBeenSet = true; m_dataFormat = value; } /** *

The data format of the schema definition. Currently AVRO, * JSON and PROTOBUF are supported.

*/ inline void SetDataFormat(DataFormat&& value) { m_dataFormatHasBeenSet = true; m_dataFormat = std::move(value); } /** *

The data format of the schema definition. Currently AVRO, * JSON and PROTOBUF are supported.

*/ inline CreateSchemaRequest& WithDataFormat(const DataFormat& value) { SetDataFormat(value); return *this;} /** *

The data format of the schema definition. Currently AVRO, * JSON and PROTOBUF are supported.

*/ inline CreateSchemaRequest& WithDataFormat(DataFormat&& value) { SetDataFormat(std::move(value)); return *this;} /** *

The compatibility mode of the schema. The possible values are:

  • *

    NONE: No compatibility mode applies. You can use this choice in * development scenarios or if you do not know the compatibility mode that you want * to apply to schemas. Any new version added will be accepted without undergoing a * compatibility check.

  • DISABLED: This compatibility * choice prevents versioning for a particular schema. You can use this choice to * prevent future versioning of a schema.

  • BACKWARD: This * compatibility choice is recommended as it allows data receivers to read both the * current and one previous schema version. This means that for instance, a new * schema version cannot drop data fields or change the type of these fields, so * they can't be read by readers using the previous version.

  • * BACKWARD_ALL: This compatibility choice allows data receivers to read * both the current and all previous schema versions. You can use this choice when * you need to delete fields or add optional fields, and check compatibility * against all previous schema versions.

  • FORWARD: This * compatibility choice allows data receivers to read both the current and one next * schema version, but not necessarily later versions. You can use this choice when * you need to add fields or delete optional fields, but only check compatibility * against the last schema version.

  • FORWARD_ALL: This * compatibility choice allows data receivers to read written by producers of any * new registered schema. You can use this choice when you need to add fields or * delete optional fields, and check compatibility against all previous schema * versions.

  • FULL: This compatibility choice allows data * receivers to read data written by producers using the previous or next version * of the schema, but not necessarily earlier or later versions. You can use this * choice when you need to add or remove optional fields, but only check * compatibility against the last schema version.

  • * FULL_ALL: This compatibility choice allows data receivers to read data * written by producers using all previous schema versions. You can use this choice * when you need to add or remove optional fields, and check compatibility against * all previous schema versions.

*/ inline const Compatibility& GetCompatibility() const{ return m_compatibility; } /** *

The compatibility mode of the schema. The possible values are:

  • *

    NONE: No compatibility mode applies. You can use this choice in * development scenarios or if you do not know the compatibility mode that you want * to apply to schemas. Any new version added will be accepted without undergoing a * compatibility check.

  • DISABLED: This compatibility * choice prevents versioning for a particular schema. You can use this choice to * prevent future versioning of a schema.

  • BACKWARD: This * compatibility choice is recommended as it allows data receivers to read both the * current and one previous schema version. This means that for instance, a new * schema version cannot drop data fields or change the type of these fields, so * they can't be read by readers using the previous version.

  • * BACKWARD_ALL: This compatibility choice allows data receivers to read * both the current and all previous schema versions. You can use this choice when * you need to delete fields or add optional fields, and check compatibility * against all previous schema versions.

  • FORWARD: This * compatibility choice allows data receivers to read both the current and one next * schema version, but not necessarily later versions. You can use this choice when * you need to add fields or delete optional fields, but only check compatibility * against the last schema version.

  • FORWARD_ALL: This * compatibility choice allows data receivers to read written by producers of any * new registered schema. You can use this choice when you need to add fields or * delete optional fields, and check compatibility against all previous schema * versions.

  • FULL: This compatibility choice allows data * receivers to read data written by producers using the previous or next version * of the schema, but not necessarily earlier or later versions. You can use this * choice when you need to add or remove optional fields, but only check * compatibility against the last schema version.

  • * FULL_ALL: This compatibility choice allows data receivers to read data * written by producers using all previous schema versions. You can use this choice * when you need to add or remove optional fields, and check compatibility against * all previous schema versions.

*/ inline bool CompatibilityHasBeenSet() const { return m_compatibilityHasBeenSet; } /** *

The compatibility mode of the schema. The possible values are:

  • *

    NONE: No compatibility mode applies. You can use this choice in * development scenarios or if you do not know the compatibility mode that you want * to apply to schemas. Any new version added will be accepted without undergoing a * compatibility check.

  • DISABLED: This compatibility * choice prevents versioning for a particular schema. You can use this choice to * prevent future versioning of a schema.

  • BACKWARD: This * compatibility choice is recommended as it allows data receivers to read both the * current and one previous schema version. This means that for instance, a new * schema version cannot drop data fields or change the type of these fields, so * they can't be read by readers using the previous version.

  • * BACKWARD_ALL: This compatibility choice allows data receivers to read * both the current and all previous schema versions. You can use this choice when * you need to delete fields or add optional fields, and check compatibility * against all previous schema versions.

  • FORWARD: This * compatibility choice allows data receivers to read both the current and one next * schema version, but not necessarily later versions. You can use this choice when * you need to add fields or delete optional fields, but only check compatibility * against the last schema version.

  • FORWARD_ALL: This * compatibility choice allows data receivers to read written by producers of any * new registered schema. You can use this choice when you need to add fields or * delete optional fields, and check compatibility against all previous schema * versions.

  • FULL: This compatibility choice allows data * receivers to read data written by producers using the previous or next version * of the schema, but not necessarily earlier or later versions. You can use this * choice when you need to add or remove optional fields, but only check * compatibility against the last schema version.

  • * FULL_ALL: This compatibility choice allows data receivers to read data * written by producers using all previous schema versions. You can use this choice * when you need to add or remove optional fields, and check compatibility against * all previous schema versions.

*/ inline void SetCompatibility(const Compatibility& value) { m_compatibilityHasBeenSet = true; m_compatibility = value; } /** *

The compatibility mode of the schema. The possible values are:

  • *

    NONE: No compatibility mode applies. You can use this choice in * development scenarios or if you do not know the compatibility mode that you want * to apply to schemas. Any new version added will be accepted without undergoing a * compatibility check.

  • DISABLED: This compatibility * choice prevents versioning for a particular schema. You can use this choice to * prevent future versioning of a schema.

  • BACKWARD: This * compatibility choice is recommended as it allows data receivers to read both the * current and one previous schema version. This means that for instance, a new * schema version cannot drop data fields or change the type of these fields, so * they can't be read by readers using the previous version.

  • * BACKWARD_ALL: This compatibility choice allows data receivers to read * both the current and all previous schema versions. You can use this choice when * you need to delete fields or add optional fields, and check compatibility * against all previous schema versions.

  • FORWARD: This * compatibility choice allows data receivers to read both the current and one next * schema version, but not necessarily later versions. You can use this choice when * you need to add fields or delete optional fields, but only check compatibility * against the last schema version.

  • FORWARD_ALL: This * compatibility choice allows data receivers to read written by producers of any * new registered schema. You can use this choice when you need to add fields or * delete optional fields, and check compatibility against all previous schema * versions.

  • FULL: This compatibility choice allows data * receivers to read data written by producers using the previous or next version * of the schema, but not necessarily earlier or later versions. You can use this * choice when you need to add or remove optional fields, but only check * compatibility against the last schema version.

  • * FULL_ALL: This compatibility choice allows data receivers to read data * written by producers using all previous schema versions. You can use this choice * when you need to add or remove optional fields, and check compatibility against * all previous schema versions.

*/ inline void SetCompatibility(Compatibility&& value) { m_compatibilityHasBeenSet = true; m_compatibility = std::move(value); } /** *

The compatibility mode of the schema. The possible values are:

  • *

    NONE: No compatibility mode applies. You can use this choice in * development scenarios or if you do not know the compatibility mode that you want * to apply to schemas. Any new version added will be accepted without undergoing a * compatibility check.

  • DISABLED: This compatibility * choice prevents versioning for a particular schema. You can use this choice to * prevent future versioning of a schema.

  • BACKWARD: This * compatibility choice is recommended as it allows data receivers to read both the * current and one previous schema version. This means that for instance, a new * schema version cannot drop data fields or change the type of these fields, so * they can't be read by readers using the previous version.

  • * BACKWARD_ALL: This compatibility choice allows data receivers to read * both the current and all previous schema versions. You can use this choice when * you need to delete fields or add optional fields, and check compatibility * against all previous schema versions.

  • FORWARD: This * compatibility choice allows data receivers to read both the current and one next * schema version, but not necessarily later versions. You can use this choice when * you need to add fields or delete optional fields, but only check compatibility * against the last schema version.

  • FORWARD_ALL: This * compatibility choice allows data receivers to read written by producers of any * new registered schema. You can use this choice when you need to add fields or * delete optional fields, and check compatibility against all previous schema * versions.

  • FULL: This compatibility choice allows data * receivers to read data written by producers using the previous or next version * of the schema, but not necessarily earlier or later versions. You can use this * choice when you need to add or remove optional fields, but only check * compatibility against the last schema version.

  • * FULL_ALL: This compatibility choice allows data receivers to read data * written by producers using all previous schema versions. You can use this choice * when you need to add or remove optional fields, and check compatibility against * all previous schema versions.

*/ inline CreateSchemaRequest& WithCompatibility(const Compatibility& value) { SetCompatibility(value); return *this;} /** *

The compatibility mode of the schema. The possible values are:

  • *

    NONE: No compatibility mode applies. You can use this choice in * development scenarios or if you do not know the compatibility mode that you want * to apply to schemas. Any new version added will be accepted without undergoing a * compatibility check.

  • DISABLED: This compatibility * choice prevents versioning for a particular schema. You can use this choice to * prevent future versioning of a schema.

  • BACKWARD: This * compatibility choice is recommended as it allows data receivers to read both the * current and one previous schema version. This means that for instance, a new * schema version cannot drop data fields or change the type of these fields, so * they can't be read by readers using the previous version.

  • * BACKWARD_ALL: This compatibility choice allows data receivers to read * both the current and all previous schema versions. You can use this choice when * you need to delete fields or add optional fields, and check compatibility * against all previous schema versions.

  • FORWARD: This * compatibility choice allows data receivers to read both the current and one next * schema version, but not necessarily later versions. You can use this choice when * you need to add fields or delete optional fields, but only check compatibility * against the last schema version.

  • FORWARD_ALL: This * compatibility choice allows data receivers to read written by producers of any * new registered schema. You can use this choice when you need to add fields or * delete optional fields, and check compatibility against all previous schema * versions.

  • FULL: This compatibility choice allows data * receivers to read data written by producers using the previous or next version * of the schema, but not necessarily earlier or later versions. You can use this * choice when you need to add or remove optional fields, but only check * compatibility against the last schema version.

  • * FULL_ALL: This compatibility choice allows data receivers to read data * written by producers using all previous schema versions. You can use this choice * when you need to add or remove optional fields, and check compatibility against * all previous schema versions.

*/ inline CreateSchemaRequest& WithCompatibility(Compatibility&& value) { SetCompatibility(std::move(value)); return *this;} /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline const Aws::String& GetDescription() const{ return m_description; } /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; } /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; } /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); } /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); } /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline CreateSchemaRequest& WithDescription(const Aws::String& value) { SetDescription(value); return *this;} /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline CreateSchemaRequest& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;} /** *

An optional description of the schema. If description is not provided, there * will not be any automatic default value for this.

*/ inline CreateSchemaRequest& WithDescription(const char* value) { SetDescription(value); return *this;} /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline const Aws::Map& GetTags() const{ return m_tags; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline void SetTags(const Aws::Map& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline void SetTags(Aws::Map&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& WithTags(const Aws::Map& value) { SetTags(value); return *this;} /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& WithTags(Aws::Map&& value) { SetTags(std::move(value)); return *this;} /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; } /** *

Amazon Web Services tags that contain a key value pair and may be searched by * console, command line, or API. If specified, follows the Amazon Web Services * tags-on-create pattern.

*/ inline CreateSchemaRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; } /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline const Aws::String& GetSchemaDefinition() const{ return m_schemaDefinition; } /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline bool SchemaDefinitionHasBeenSet() const { return m_schemaDefinitionHasBeenSet; } /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline void SetSchemaDefinition(const Aws::String& value) { m_schemaDefinitionHasBeenSet = true; m_schemaDefinition = value; } /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline void SetSchemaDefinition(Aws::String&& value) { m_schemaDefinitionHasBeenSet = true; m_schemaDefinition = std::move(value); } /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline void SetSchemaDefinition(const char* value) { m_schemaDefinitionHasBeenSet = true; m_schemaDefinition.assign(value); } /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline CreateSchemaRequest& WithSchemaDefinition(const Aws::String& value) { SetSchemaDefinition(value); return *this;} /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline CreateSchemaRequest& WithSchemaDefinition(Aws::String&& value) { SetSchemaDefinition(std::move(value)); return *this;} /** *

The schema definition using the DataFormat setting for * SchemaName.

*/ inline CreateSchemaRequest& WithSchemaDefinition(const char* value) { SetSchemaDefinition(value); return *this;} private: RegistryId m_registryId; bool m_registryIdHasBeenSet = false; Aws::String m_schemaName; bool m_schemaNameHasBeenSet = false; DataFormat m_dataFormat; bool m_dataFormatHasBeenSet = false; Compatibility m_compatibility; bool m_compatibilityHasBeenSet = false; Aws::String m_description; bool m_descriptionHasBeenSet = false; Aws::Map m_tags; bool m_tagsHasBeenSet = false; Aws::String m_schemaDefinition; bool m_schemaDefinitionHasBeenSet = false; }; } // namespace Model } // namespace Glue } // namespace Aws