func (o *Issue) ToSparse(fields ...string) elemental.SparseIdentifiable {

	if len(fields) == 0 {
		// nolint: goimports
		return &SparseIssue{
			Audience:              &o.Audience,
			Claims:                o.Claims,
			Data:                  &o.Data,
			Metadata:              &o.Metadata,
			Opaque:                &o.Opaque,
			Quota:                 &o.Quota,
			Realm:                 &o.Realm,
			RestrictedNamespace:   &o.RestrictedNamespace,
			RestrictedNetworks:    &o.RestrictedNetworks,
			RestrictedPermissions: &o.RestrictedPermissions,
			Token:                 &o.Token,
			Validity:              &o.Validity,
		}
	}

	sp := &SparseIssue{}
	for _, f := range fields {
		switch f {
		case "audience":
			sp.Audience = &(o.Audience)
		case "claims":
			sp.Claims = o.Claims
		case "data":
			sp.Data = &(o.Data)
		case "metadata":
			sp.Metadata = &(o.Metadata)
		case "opaque":
			sp.Opaque = &(o.Opaque)
		case "quota":
			sp.Quota = &(o.Quota)
		case "realm":
			sp.Realm = &(o.Realm)
		case "restrictedNamespace":
			sp.RestrictedNamespace = &(o.RestrictedNamespace)
		case "restrictedNetworks":
			sp.RestrictedNetworks = &(o.RestrictedNetworks)
		case "restrictedPermissions":
			sp.RestrictedPermissions = &(o.RestrictedPermissions)
		case "token":
			sp.Token = &(o.Token)
		case "validity":
			sp.Validity = &(o.Validity)
		}
	}

	return sp
}
// ToSparse returns the sparse version of the model.
// The returned object will only contain the given fields. No field means entire field set.
ToSparse returns the sparse version of the model.
The returned object will only contain the given fields. No field means entire field set.
// ToSparse returns the sparse version of the model . // The returned object will only contain the given fields . No field means entire field set .
func (o *Issue) ToSparse(fields ...string) elemental.SparseIdentifiable {
	if len(fields) == 0 {
		return &SparseIssue{
			Audience:              &o.Audience,
			Claims:                o.Claims,
			Data:                  &o.Data,
			Metadata:              &o.Metadata,
			Opaque:                &o.Opaque,
			Quota:                 &o.Quota,
			Realm:                 &o.Realm,
			RestrictedNamespace:   &o.RestrictedNamespace,
			RestrictedNetworks:    &o.RestrictedNetworks,
			RestrictedPermissions: &o.RestrictedPermissions,
			Token:                 &o.Token,
			Validity:              &o.Validity,
		}
	}
	sp := &SparseIssue{}
	for _, f := range fields {
		switch f {
		case "audience":
			sp.Audience = &(o.Audience)
		case "claims":
			sp.Claims = o.Claims
		case "data":
			sp.Data = &(o.Data)
		case "metadata":
			sp.Metadata = &(o.Metadata)
		case "opaque":
			sp.Opaque = &(o.Opaque)
		case "quota":
			sp.Quota = &(o.Quota)
		case "realm":
			sp.Realm = &(o.Realm)
		case "restrictedNamespace":
			sp.RestrictedNamespace = &(o.RestrictedNamespace)
		case "restrictedNetworks":
			sp.RestrictedNetworks = &(o.RestrictedNetworks)
		case "restrictedPermissions":
			sp.RestrictedPermissions = &(o.RestrictedPermissions)
		case "token":
			sp.Token = &(o.Token)
		case "validity":
			sp.Validity = &(o.Validity)
		}
	}
	return sp
}
func ( o * Issue ) ToSparse ( fields ... string ) elemental . SparseIdentifiable { if len ( fields ) == 0 { return & SparseIssue { Audience : & o . Audience , Claims : o . Claims , Data : & o . Data , Metadata : & o . Metadata , Opaque : & o . Opaque , Quota : & o . Quota , Realm : & o . Realm , RestrictedNamespace : & o . RestrictedNamespace , RestrictedNetworks : & o . RestrictedNetworks , RestrictedPermissions : & o . RestrictedPermissions , Token : & o . Token , Validity : & o . Validity , } } sp := & SparseIssue { } for _ , f := range fields { switch f { case " " : sp . Audience = & ( o . Audience ) case " " : sp . Claims = o . Claims case " " : sp . Data = & ( o . Data ) case " " : sp . Metadata = & ( o . Metadata ) case " " : sp . Opaque = & ( o . Opaque ) case " " : sp . Quota = & ( o . Quota ) case " " : sp . Realm = & ( o . Realm ) case " " : sp . RestrictedNamespace = & ( o . RestrictedNamespace ) case " " : sp . RestrictedNetworks = & ( o . RestrictedNetworks ) case " " : sp . RestrictedPermissions = & ( o . RestrictedPermissions ) case " " : sp . Token = & ( o . Token ) case " " : sp . Validity = & ( o . Validity ) } } return sp }
ToSparse returns the sparse version of the model.
ToSparse returns the sparse version of the model .
// nolint: goimports