All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vendasta.accountgroup.v1.internal.LegacyProductDetails Maven / Gradle / Ivy

The newest version!
package com.vendasta.accountgroup.v1.internal;

import java.util.List;
import java.util.ArrayList;
import java.util.Date;
import java.util.Map;
import java.util.HashMap;
import java.util.Collections;
import java.util.Arrays;
import java.time.Duration;
import org.apache.commons.lang3.StringUtils;
import com.vendasta.accountgroup.v1.generated.ApiProto;

/**
 * 
 **/
public final class LegacyProductDetails {




	private final List keyPerson;
	private final List shareOfVoiceService;
	private final String faxNumber;
	private final List commonName;
	private final String cellNumber;
	private final List competitor;
	private final String adminNotes;
	private final List seoCategory;
	private final String email;
	private final String place;
	private final String tagline;
	private final boolean subscribedToCampaigns;
	

	private LegacyProductDetails (
		final List keyPerson,
		final List shareOfVoiceService,
		final String faxNumber,
		final List commonName,
		final String cellNumber,
		final List competitor,
		final String adminNotes,
		final List seoCategory,
		final String email,
		final String place,
		final String tagline,
		final boolean subscribedToCampaigns)
		
	{
		this.keyPerson = keyPerson;
		this.shareOfVoiceService = shareOfVoiceService;
		this.faxNumber = faxNumber;
		this.commonName = commonName;
		this.cellNumber = cellNumber;
		this.competitor = competitor;
		this.adminNotes = adminNotes;
		this.seoCategory = seoCategory;
		this.email = email;
		this.place = place;
		this.tagline = tagline;
		this.subscribedToCampaigns = subscribedToCampaigns;
		
	}
	
	/**
	 * 
      * @return The final value of keyPerson on the object
	 **/
	public List getKeyPerson() {
		return this.keyPerson;
	}
	
	/**
	 * 
      * @return The final value of shareOfVoiceService on the object
	 **/
	public List getShareOfVoiceService() {
		return this.shareOfVoiceService;
	}
	
	/**
	 * 
      * @return The final value of faxNumber on the object
	 **/
	public String getFaxNumber() {
		return this.faxNumber;
	}
	
	/**
	 * 
      * @return The final value of commonName on the object
	 **/
	public List getCommonName() {
		return this.commonName;
	}
	
	/**
	 * 
      * @return The final value of cellNumber on the object
	 **/
	public String getCellNumber() {
		return this.cellNumber;
	}
	
	/**
	 * 
      * @return The final value of competitor on the object
	 **/
	public List getCompetitor() {
		return this.competitor;
	}
	
	/**
	 * 
      * @return The final value of adminNotes on the object
	 **/
	public String getAdminNotes() {
		return this.adminNotes;
	}
	
	/**
	 * 
      * @return The final value of seoCategory on the object
	 **/
	public List getSeoCategory() {
		return this.seoCategory;
	}
	
	/**
	 * 
      * @return The final value of email on the object
	 **/
	public String getEmail() {
		return this.email;
	}
	
	/**
	 * 
      * @return The final value of place on the object
	 **/
	public String getPlace() {
		return this.place;
	}
	
	/**
	 * 
      * @return The final value of tagline on the object
	 **/
	public String getTagline() {
		return this.tagline;
	}
	
	/**
	 * 
      * @return The final value of subscribedToCampaigns on the object
	 **/
	public boolean getSubscribedToCampaigns() {
		return this.subscribedToCampaigns;
	}
	

	public static class Builder {
		private List keyPerson;
		private List shareOfVoiceService;
		private String faxNumber;
		private List commonName;
		private String cellNumber;
		private List competitor;
		private String adminNotes;
		private List seoCategory;
		private String email;
		private String place;
		private String tagline;
		private boolean subscribedToCampaigns;
		
		public Builder() {
			this.keyPerson = new ArrayList();
			this.shareOfVoiceService = new ArrayList();
			this.faxNumber = "";
			this.commonName = new ArrayList();
			this.cellNumber = "";
			this.competitor = new ArrayList();
			this.adminNotes = "";
			this.seoCategory = new ArrayList();
			this.email = "";
			this.place = "";
			this.tagline = "";
			this.subscribedToCampaigns = false;
			
		}
		
		/**
		  * Adds a value to the builder for keyPerson
		  * @param keyPerson Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setKeyPerson(List keyPerson) {
			this.keyPerson = keyPerson;
			return this;
		}
		
		/**
		  * Adds a value to the builder for shareOfVoiceService
		  * @param shareOfVoiceService Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setShareOfVoiceService(List shareOfVoiceService) {
			this.shareOfVoiceService = shareOfVoiceService;
			return this;
		}
		
		/**
		  * Adds a value to the builder for faxNumber
		  * @param faxNumber Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setFaxNumber(String faxNumber) {
			this.faxNumber = faxNumber;
			return this;
		}
		
		/**
		  * Adds a value to the builder for commonName
		  * @param commonName Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setCommonName(List commonName) {
			this.commonName = commonName;
			return this;
		}
		
		/**
		  * Adds a value to the builder for cellNumber
		  * @param cellNumber Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setCellNumber(String cellNumber) {
			this.cellNumber = cellNumber;
			return this;
		}
		
		/**
		  * Adds a value to the builder for competitor
		  * @param competitor Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setCompetitor(List competitor) {
			this.competitor = competitor;
			return this;
		}
		
		/**
		  * Adds a value to the builder for adminNotes
		  * @param adminNotes Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setAdminNotes(String adminNotes) {
			this.adminNotes = adminNotes;
			return this;
		}
		
		/**
		  * Adds a value to the builder for seoCategory
		  * @param seoCategory Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setSeoCategory(List seoCategory) {
			this.seoCategory = seoCategory;
			return this;
		}
		
		/**
		  * Adds a value to the builder for email
		  * @param email Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setEmail(String email) {
			this.email = email;
			return this;
		}
		
		/**
		  * Adds a value to the builder for place
		  * @param place Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setPlace(String place) {
			this.place = place;
			return this;
		}
		
		/**
		  * Adds a value to the builder for tagline
		  * @param tagline Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setTagline(String tagline) {
			this.tagline = tagline;
			return this;
		}
		
		/**
		  * Adds a value to the builder for subscribedToCampaigns
		  * @param subscribedToCampaigns Value to assign to the mutable Builder
		  * @return The Builder instance so that call chaining works
		 **/
		public Builder setSubscribedToCampaigns(boolean subscribedToCampaigns) {
			this.subscribedToCampaigns = subscribedToCampaigns;
			return this;
		}
		
		/**
		  * Takes the configuration in the mutable Builder and uses it to instantiate a final instance
		  * of the LegacyProductDetails class
		  * @return The instantiated final LegacyProductDetails
		 **/
		public LegacyProductDetails build() {
			return new LegacyProductDetails(
				this.keyPerson,
				this.shareOfVoiceService,
				this.faxNumber,
				this.commonName,
				this.cellNumber,
				this.competitor,
				this.adminNotes,
				this.seoCategory,
				this.email,
				this.place,
				this.tagline,
				this.subscribedToCampaigns);
		}
	}

	/**
	 * Returns a Builder for LegacyProductDetails, which is a mutable representation of the object.  Once the
	 * client has built up an object they can then create an immutable LegacyProductDetails object using the
	 * build function.
	 * @return A fresh Builder instance with no values set
	 **/
	public static Builder newBuilder() {
		return new Builder();
	}

	/**
	 * Provides a human-readable representation of this object.  Useful for debugging.
	 * @return A string representation of the LegacyProductDetails instance
	 **/
	 public String toString() {
		 String result = "LegacyProductDetails\n";
		 result += "-> keyPerson: (List)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.keyPerson).split("\n"))) + "\n"; 
		 result += "-> shareOfVoiceService: (List)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.shareOfVoiceService).split("\n"))) + "\n"; 
		 result += "-> faxNumber: (String)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.faxNumber).split("\n"))) + "\n"; 
		 result += "-> commonName: (List)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.commonName).split("\n"))) + "\n"; 
		 result += "-> cellNumber: (String)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.cellNumber).split("\n"))) + "\n"; 
		 result += "-> competitor: (List)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.competitor).split("\n"))) + "\n"; 
		 result += "-> adminNotes: (String)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.adminNotes).split("\n"))) + "\n"; 
		 result += "-> seoCategory: (List)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.seoCategory).split("\n"))) + "\n"; 
		 result += "-> email: (String)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.email).split("\n"))) + "\n"; 
		 result += "-> place: (String)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.place).split("\n"))) + "\n"; 
		 result += "-> tagline: (String)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.tagline).split("\n"))) + "\n"; 
		 result += "-> subscribedToCampaigns: (boolean)"
		     + StringUtils.join("\n  ", Arrays.asList(String.valueOf(this.subscribedToCampaigns).split("\n"))) + "\n"; 
		 
		 return result;
	 }
	/**
	* Allows for simple conversion between the low-level generated protobuf object to
	* LegacyProductDetails, which is much more usable.
	* @return An instance of LegacyProductDetails representing the input proto object
	**/
	public static LegacyProductDetails fromProto(ApiProto.LegacyProductDetails proto) {
		LegacyProductDetails out = null;
		if (proto != null) {
			LegacyProductDetails.Builder outBuilder = LegacyProductDetails.newBuilder()
			.setKeyPerson(proto.getKeyPersonList())
			.setShareOfVoiceService(proto.getShareOfVoiceServiceList())
			.setFaxNumber(proto.getFaxNumber())
			.setCommonName(proto.getCommonNameList())
			.setCellNumber(proto.getCellNumber())
			.setCompetitor(proto.getCompetitorList())
			.setAdminNotes(proto.getAdminNotes())
			.setSeoCategory(proto.getSeoCategoryList())
			.setEmail(proto.getEmail())
			.setPlace(proto.getPlace())
			.setTagline(proto.getTagline())
			.setSubscribedToCampaigns(proto.getSubscribedToCampaigns());
			out = outBuilder.build();
		}
		return out;
	}

	/**
	* Convenience method for handling lists of proto objects.  It calls .fromProto on each one
	* and returns a list of the converted results.
	* @return A list of LegacyProductDetails instances representing the input proto objects
	**/
	public static List fromProtos(List protos) {
		List out = new ArrayList();
		for(ApiProto.LegacyProductDetails proto : protos) {
			out.add(LegacyProductDetails.fromProto(proto));
		}
		return out;
	}

	/**
	 * Allows for simple conversion of an object to the low-level generated protobuf object.
	 * @return An instance of ApiProto.LegacyProductDetails which is a proto object ready for wire transmission
	 **/
	 public ApiProto.LegacyProductDetails toProto() {
		 LegacyProductDetails obj = this;
		 ApiProto.LegacyProductDetails.Builder outBuilder = ApiProto.LegacyProductDetails.newBuilder();
		 outBuilder.addAllKeyPerson(obj.getKeyPerson());
		 outBuilder.addAllShareOfVoiceService(obj.getShareOfVoiceService());
		 outBuilder.setFaxNumber(obj.getFaxNumber());
		 outBuilder.addAllCommonName(obj.getCommonName());
		 outBuilder.setCellNumber(obj.getCellNumber());
		 outBuilder.addAllCompetitor(obj.getCompetitor());
		 outBuilder.setAdminNotes(obj.getAdminNotes());
		 outBuilder.addAllSeoCategory(obj.getSeoCategory());
		 outBuilder.setEmail(obj.getEmail());
		 outBuilder.setPlace(obj.getPlace());
		 outBuilder.setTagline(obj.getTagline());
		 outBuilder.setSubscribedToCampaigns(obj.getSubscribedToCampaigns());
		 return outBuilder.build();
	 }

	 /**
	  * Convenience method for handling lists of objects.  It calls .toProto on each one and
	  * returns a list of the converted results.
	  * @return A list of ApiProto.LegacyProductDetails instances representing the input objects.
	  */
	public static List toProtos(List objects) {
		List out = new ArrayList();
		if(objects != null) {
			for (LegacyProductDetails obj : objects) {
				out.add(obj!=null?obj.toProto():null);
			}
		}
		return out;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy