// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1

// DNSZoneApplyConfiguration represents a declarative configuration of the DNSZone type for use
// with apply.
//
// DNSZone is used to define a DNS hosted zone.
// A zone can be identified by an ID or tags.
type DNSZoneApplyConfiguration struct {
	// id is the identifier that can be used to find the DNS hosted zone.
	//
	// on AWS zone can be fetched using `ID` as id in [1]
	// on Azure zone can be fetched using `ID` as a pre-determined name in [2],
	// on GCP zone can be fetched using `ID` as a pre-determined name in [3].
	//
	// [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options
	// [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show
	// [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get
	ID *string `json:"id,omitempty"`
	// tags can be used to query the DNS hosted zone.
	//
	// on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters,
	//
	// [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options
	Tags map[string]string `json:"tags,omitempty"`
}

// DNSZoneApplyConfiguration constructs a declarative configuration of the DNSZone type for use with
// apply.
func DNSZone() *DNSZoneApplyConfiguration {
	return &DNSZoneApplyConfiguration{}
}

// WithID sets the ID field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the ID field is set to the value of the last call.
func (b *DNSZoneApplyConfiguration) WithID(value string) *DNSZoneApplyConfiguration {
	b.ID = &value
	return b
}

// WithTags puts the entries into the Tags field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, the entries provided by each call will be put on the Tags field,
// overwriting an existing map entries in Tags field with the same key.
func (b *DNSZoneApplyConfiguration) WithTags(entries map[string]string) *DNSZoneApplyConfiguration {
	if b.Tags == nil && len(entries) > 0 {
		b.Tags = make(map[string]string, len(entries))
	}
	for k, v := range entries {
		b.Tags[k] = v
	}
	return b
}
