func (secret *ASMSecretResource) UnmarshalJSON(b []byte) error {
	temp := ASMSecretResourceJSON{}

	if err := json.Unmarshal(b, &temp); err != nil {
		return err
	}

	if temp.DesiredStatus != nil {
		secret.SetDesiredStatus(resourcestatus.ResourceStatus(*temp.DesiredStatus))
	}
	if temp.KnownStatus != nil {
		secret.SetKnownStatus(resourcestatus.ResourceStatus(*temp.KnownStatus))
	}
	if temp.CreatedAt != nil && !temp.CreatedAt.IsZero() {
		secret.SetCreatedAt(*temp.CreatedAt)
	}
	if temp.RequiredSecrets != nil {
		secret.requiredSecrets = temp.RequiredSecrets
	}
	secret.taskARN = temp.TaskARN
	secret.executionCredentialsID = temp.ExecutionCredentialsID

	return nil
}
func (secret *ASMSecretResource) UnmarshalJSON(b []byte) error {
	temp := ASMSecretResourceJSON{}

	if err := json.Unmarshal(b, &temp); err != nil {
		return err
	}

	if temp.DesiredStatus != nil {
		secret.SetDesiredStatus(resourcestatus.ResourceStatus(*temp.DesiredStatus))
	}
	if temp.KnownStatus != nil {
		secret.SetKnownStatus(resourcestatus.ResourceStatus(*temp.KnownStatus))
	}
	if temp.CreatedAt != nil && !temp.CreatedAt.IsZero() {
		secret.SetCreatedAt(*temp.CreatedAt)
	}
	if temp.RequiredSecrets != nil {
		secret.requiredSecrets = temp.RequiredSecrets
	}
	secret.taskARN = temp.TaskARN
	secret.executionCredentialsID = temp.ExecutionCredentialsID

	return nil
}
func ( secret * ASMSecretResource ) UnmarshalJSON ( b [ ] byte ) error { temp := ASMSecretResourceJSON { } if err := json . Unmarshal ( b , & temp ) ; err != nil { return err } if temp . DesiredStatus != nil { secret . SetDesiredStatus ( resourcestatus . ResourceStatus ( * temp . DesiredStatus ) ) } if temp . KnownStatus != nil { secret . SetKnownStatus ( resourcestatus . ResourceStatus ( * temp . KnownStatus ) ) } if temp . CreatedAt != nil && ! temp . CreatedAt . IsZero ( ) { secret . SetCreatedAt ( * temp . CreatedAt ) } if temp . RequiredSecrets != nil { secret . requiredSecrets = temp . RequiredSecrets } secret . taskARN = temp . TaskARN secret . executionCredentialsID = temp . ExecutionCredentialsID return nil }
// UnmarshalJSON deserialises the raw JSON to a ASMSecretResource struct
UnmarshalJSON deserialises the raw JSON to a ASMSecretResource struct