// CODE GENERATED BY github.com/golingon/lingon. DO NOT EDIT.

package local_file

import "github.com/golingon/lingon/pkg/terra"

var _ terra.DataSource = (*DataSource)(nil)

// DataSource represents the Terraform data resource local_file.
type DataSource struct {
	Name string
	Args DataArgs
}

// DataSource returns the Terraform object type for [DataSource].
func (lf *DataSource) DataSource() string {
	return "local_file"
}

// LocalName returns the local name for [DataSource].
func (lf *DataSource) LocalName() string {
	return lf.Name
}

// Configuration returns the configuration (args) for [DataSource].
func (lf *DataSource) Configuration() interface{} {
	return lf.Args
}

// Attributes returns the attributes for [DataSource].
func (lf *DataSource) Attributes() dataLocalFileAttributes {
	return dataLocalFileAttributes{ref: terra.ReferenceDataSource(lf)}
}

// DataArgs contains the configurations for local_file.
type DataArgs struct {
	// Filename: string, required
	Filename terra.StringValue `hcl:"filename,attr" validate:"required"`
}

type dataLocalFileAttributes struct {
	ref terra.Reference
}

// Content returns a reference to field content of local_file.
func (lf dataLocalFileAttributes) Content() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content"))
}

// ContentBase64 returns a reference to field content_base64 of local_file.
func (lf dataLocalFileAttributes) ContentBase64() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content_base64"))
}

// ContentBase64Sha256 returns a reference to field content_base64sha256 of local_file.
func (lf dataLocalFileAttributes) ContentBase64Sha256() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content_base64sha256"))
}

// ContentBase64Sha512 returns a reference to field content_base64sha512 of local_file.
func (lf dataLocalFileAttributes) ContentBase64Sha512() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content_base64sha512"))
}

// ContentMd5 returns a reference to field content_md5 of local_file.
func (lf dataLocalFileAttributes) ContentMd5() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content_md5"))
}

// ContentSha1 returns a reference to field content_sha1 of local_file.
func (lf dataLocalFileAttributes) ContentSha1() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content_sha1"))
}

// ContentSha256 returns a reference to field content_sha256 of local_file.
func (lf dataLocalFileAttributes) ContentSha256() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content_sha256"))
}

// ContentSha512 returns a reference to field content_sha512 of local_file.
func (lf dataLocalFileAttributes) ContentSha512() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("content_sha512"))
}

// Filename returns a reference to field filename of local_file.
func (lf dataLocalFileAttributes) Filename() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("filename"))
}

// Id returns a reference to field id of local_file.
func (lf dataLocalFileAttributes) Id() terra.StringValue {
	return terra.ReferenceAsString(lf.ref.Append("id"))
}
