package com.google.schemaorg.core;

import com.google.schemaorg.JsonLdContext;
import com.google.schemaorg.SchemaOrgType;
import com.google.schemaorg.core.datatype.Date;
import com.google.schemaorg.core.datatype.Text;
import com.google.schemaorg.core.datatype.URL;
import com.google.schemaorg.goog.PopularityScoreSpecification;
import javax.annotation.Nullable;

public interface Motel extends LodgingBusiness {

    public interface Builder extends LodgingBusiness.Builder {

        @Override
        Builder addJsonLdContext(@Nullable JsonLdContext context);

        @Override
        Builder addJsonLdContext(@Nullable JsonLdContext.Builder context);

        @Override
        Builder setJsonLdId(@Nullable String value);

        @Override
        Builder setJsonLdReverse(String property, Thing obj);

        @Override
        Builder setJsonLdReverse(String property, Thing.Builder builder);

        /**
         * Add a value to property additionalProperty.
         */
        Builder addAdditionalProperty(PropertyValue value);

        /**
         * Add a value to property additionalProperty.
         */
        Builder addAdditionalProperty(PropertyValue.Builder value);

        /**
         * Add a value to property additionalProperty.
         */
        Builder addAdditionalProperty(String value);

        /**
         * Add a value to property additionalType.
         */
        Builder addAdditionalType(URL value);

        /**
         * Add a value to property additionalType.
         */
        Builder addAdditionalType(String value);

        /**
         * Add a value to property address.
         */
        Builder addAddress(PostalAddress value);

        /**
         * Add a value to property address.
         */
        Builder addAddress(PostalAddress.Builder value);

        /**
         * Add a value to property address.
         */
        Builder addAddress(Text value);

        /**
         * Add a value to property address.
         */
        Builder addAddress(String value);

        /**
         * Add a value to property aggregateRating.
         */
        Builder addAggregateRating(AggregateRating value);

        /**
         * Add a value to property aggregateRating.
         */
        Builder addAggregateRating(AggregateRating.Builder value);

        /**
         * Add a value to property aggregateRating.
         */
        Builder addAggregateRating(String value);

        /**
         * Add a value to property alternateName.
         */
        Builder addAlternateName(Text value);

        /**
         * Add a value to property alternateName.
         */
        Builder addAlternateName(String value);

        /**
         * Add a value to property alumni.
         */
        Builder addAlumni(Person value);

        /**
         * Add a value to property alumni.
         */
        Builder addAlumni(Person.Builder value);

        /**
         * Add a value to property alumni.
         */
        Builder addAlumni(String value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(AdministrativeArea value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(AdministrativeArea.Builder value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(GeoShape value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(GeoShape.Builder value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(Place value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(Place.Builder value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(Text value);

        /**
         * Add a value to property areaServed.
         */
        Builder addAreaServed(String value);

        /**
         * Add a value to property award.
         */
        Builder addAward(Text value);

        /**
         * Add a value to property award.
         */
        Builder addAward(String value);

        /**
         * Add a value to property awards.
         */
        Builder addAwards(Text value);

        /**
         * Add a value to property awards.
         */
        Builder addAwards(String value);

        /**
         * Add a value to property branchCode.
         */
        Builder addBranchCode(Text value);

        /**
         * Add a value to property branchCode.
         */
        Builder addBranchCode(String value);

        /**
         * Add a value to property branchOf.
         */
        Builder addBranchOf(Organization value);

        /**
         * Add a value to property branchOf.
         */
        Builder addBranchOf(Organization.Builder value);

        /**
         * Add a value to property branchOf.
         */
        Builder addBranchOf(String value);

        /**
         * Add a value to property brand.
         */
        Builder addBrand(Brand value);

        /**
         * Add a value to property brand.
         */
        Builder addBrand(Brand.Builder value);

        /**
         * Add a value to property brand.
         */
        Builder addBrand(Organization value);

        /**
         * Add a value to property brand.
         */
        Builder addBrand(Organization.Builder value);

        /**
         * Add a value to property brand.
         */
        Builder addBrand(String value);

        /**
         * Add a value to property contactPoint.
         */
        Builder addContactPoint(ContactPoint value);

        /**
         * Add a value to property contactPoint.
         */
        Builder addContactPoint(ContactPoint.Builder value);

        /**
         * Add a value to property contactPoint.
         */
        Builder addContactPoint(String value);

        /**
         * Add a value to property contactPoints.
         */
        Builder addContactPoints(ContactPoint value);

        /**
         * Add a value to property contactPoints.
         */
        Builder addContactPoints(ContactPoint.Builder value);

        /**
         * Add a value to property contactPoints.
         */
        Builder addContactPoints(String value);

        /**
         * Add a value to property containedIn.
         */
        Builder addContainedIn(Place value);

        /**
         * Add a value to property containedIn.
         */
        Builder addContainedIn(Place.Builder value);

        /**
         * Add a value to property containedIn.
         */
        Builder addContainedIn(String value);

        /**
         * Add a value to property containedInPlace.
         */
        Builder addContainedInPlace(Place value);

        /**
         * Add a value to property containedInPlace.
         */
        Builder addContainedInPlace(Place.Builder value);

        /**
         * Add a value to property containedInPlace.
         */
        Builder addContainedInPlace(String value);

        /**
         * Add a value to property containsPlace.
         */
        Builder addContainsPlace(Place value);

        /**
         * Add a value to property containsPlace.
         */
        Builder addContainsPlace(Place.Builder value);

        /**
         * Add a value to property containsPlace.
         */
        Builder addContainsPlace(String value);

        /**
         * Add a value to property currenciesAccepted.
         */
        Builder addCurrenciesAccepted(Text value);

        /**
         * Add a value to property currenciesAccepted.
         */
        Builder addCurrenciesAccepted(String value);

        /**
         * Add a value to property department.
         */
        Builder addDepartment(Organization value);

        /**
         * Add a value to property department.
         */
        Builder addDepartment(Organization.Builder value);

        /**
         * Add a value to property department.
         */
        Builder addDepartment(String value);

        /**
         * Add a value to property description.
         */
        Builder addDescription(Text value);

        /**
         * Add a value to property description.
         */
        Builder addDescription(String value);

        /**
         * Add a value to property dissolutionDate.
         */
        Builder addDissolutionDate(Date value);

        /**
         * Add a value to property dissolutionDate.
         */
        Builder addDissolutionDate(String value);

        /**
         * Add a value to property duns.
         */
        Builder addDuns(Text value);

        /**
         * Add a value to property duns.
         */
        Builder addDuns(String value);

        /**
         * Add a value to property email.
         */
        Builder addEmail(Text value);

        /**
         * Add a value to property email.
         */
        Builder addEmail(String value);

        /**
         * Add a value to property employee.
         */
        Builder addEmployee(Person value);

        /**
         * Add a value to property employee.
         */
        Builder addEmployee(Person.Builder value);

        /**
         * Add a value to property employee.
         */
        Builder addEmployee(String value);

        /**
         * Add a value to property employees.
         */
        Builder addEmployees(Person value);

        /**
         * Add a value to property employees.
         */
        Builder addEmployees(Person.Builder value);

        /**
         * Add a value to property employees.
         */
        Builder addEmployees(String value);

        /**
         * Add a value to property event.
         */
        Builder addEvent(Event value);

        /**
         * Add a value to property event.
         */
        Builder addEvent(Event.Builder value);

        /**
         * Add a value to property event.
         */
        Builder addEvent(String value);

        /**
         * Add a value to property events.
         */
        Builder addEvents(Event value);

        /**
         * Add a value to property events.
         */
        Builder addEvents(Event.Builder value);

        /**
         * Add a value to property events.
         */
        Builder addEvents(String value);

        /**
         * Add a value to property faxNumber.
         */
        Builder addFaxNumber(Text value);

        /**
         * Add a value to property faxNumber.
         */
        Builder addFaxNumber(String value);

        /**
         * Add a value to property founder.
         */
        Builder addFounder(Person value);

        /**
         * Add a value to property founder.
         */
        Builder addFounder(Person.Builder value);

        /**
         * Add a value to property founder.
         */
        Builder addFounder(String value);

        /**
         * Add a value to property founders.
         */
        Builder addFounders(Person value);

        /**
         * Add a value to property founders.
         */
        Builder addFounders(Person.Builder value);

        /**
         * Add a value to property founders.
         */
        Builder addFounders(String value);

        /**
         * Add a value to property foundingDate.
         */
        Builder addFoundingDate(Date value);

        /**
         * Add a value to property foundingDate.
         */
        Builder addFoundingDate(String value);

        /**
         * Add a value to property foundingLocation.
         */
        Builder addFoundingLocation(Place value);

        /**
         * Add a value to property foundingLocation.
         */
        Builder addFoundingLocation(Place.Builder value);

        /**
         * Add a value to property foundingLocation.
         */
        Builder addFoundingLocation(String value);

        /**
         * Add a value to property geo.
         */
        Builder addGeo(GeoCoordinates value);

        /**
         * Add a value to property geo.
         */
        Builder addGeo(GeoCoordinates.Builder value);

        /**
         * Add a value to property geo.
         */
        Builder addGeo(GeoShape value);

        /**
         * Add a value to property geo.
         */
        Builder addGeo(GeoShape.Builder value);

        /**
         * Add a value to property geo.
         */
        Builder addGeo(String value);

        /**
         * Add a value to property globalLocationNumber.
         */
        Builder addGlobalLocationNumber(Text value);

        /**
         * Add a value to property globalLocationNumber.
         */
        Builder addGlobalLocationNumber(String value);

        /**
         * Add a value to property hasMap.
         */
        Builder addHasMap(Map value);

        /**
         * Add a value to property hasMap.
         */
        Builder addHasMap(Map.Builder value);

        /**
         * Add a value to property hasMap.
         */
        Builder addHasMap(URL value);

        /**
         * Add a value to property hasMap.
         */
        Builder addHasMap(String value);

        /**
         * Add a value to property hasOfferCatalog.
         */
        Builder addHasOfferCatalog(OfferCatalog value);

        /**
         * Add a value to property hasOfferCatalog.
         */
        Builder addHasOfferCatalog(OfferCatalog.Builder value);

        /**
         * Add a value to property hasOfferCatalog.
         */
        Builder addHasOfferCatalog(String value);

        /**
         * Add a value to property hasPOS.
         */
        Builder addHasPOS(Place value);

        /**
         * Add a value to property hasPOS.
         */
        Builder addHasPOS(Place.Builder value);

        /**
         * Add a value to property hasPOS.
         */
        Builder addHasPOS(String value);

        /**
         * Add a value to property image.
         */
        Builder addImage(ImageObject value);

        /**
         * Add a value to property image.
         */
        Builder addImage(ImageObject.Builder value);

        /**
         * Add a value to property image.
         */
        Builder addImage(URL value);

        /**
         * Add a value to property image.
         */
        Builder addImage(String value);

        /**
         * Add a value to property isicV4.
         */
        Builder addIsicV4(Text value);

        /**
         * Add a value to property isicV4.
         */
        Builder addIsicV4(String value);

        /**
         * Add a value to property legalName.
         */
        Builder addLegalName(Text value);

        /**
         * Add a value to property legalName.
         */
        Builder addLegalName(String value);

        /**
         * Add a value to property location.
         */
        Builder addLocation(Place value);

        /**
         * Add a value to property location.
         */
        Builder addLocation(Place.Builder value);

        /**
         * Add a value to property location.
         */
        Builder addLocation(PostalAddress value);

        /**
         * Add a value to property location.
         */
        Builder addLocation(PostalAddress.Builder value);

        /**
         * Add a value to property location.
         */
        Builder addLocation(Text value);

        /**
         * Add a value to property location.
         */
        Builder addLocation(String value);

        /**
         * Add a value to property logo.
         */
        Builder addLogo(ImageObject value);

        /**
         * Add a value to property logo.
         */
        Builder addLogo(ImageObject.Builder value);

        /**
         * Add a value to property logo.
         */
        Builder addLogo(URL value);

        /**
         * Add a value to property logo.
         */
        Builder addLogo(String value);

        /**
         * Add a value to property mainEntityOfPage.
         */
        Builder addMainEntityOfPage(CreativeWork value);

        /**
         * Add a value to property mainEntityOfPage.
         */
        Builder addMainEntityOfPage(CreativeWork.Builder value);

        /**
         * Add a value to property mainEntityOfPage.
         */
        Builder addMainEntityOfPage(URL value);

        /**
         * Add a value to property mainEntityOfPage.
         */
        Builder addMainEntityOfPage(String value);

        /**
         * Add a value to property makesOffer.
         */
        Builder addMakesOffer(Offer value);

        /**
         * Add a value to property makesOffer.
         */
        Builder addMakesOffer(Offer.Builder value);

        /**
         * Add a value to property makesOffer.
         */
        Builder addMakesOffer(String value);

        /**
         * Add a value to property map.
         */
        Builder addMap(URL value);

        /**
         * Add a value to property map.
         */
        Builder addMap(String value);

        /**
         * Add a value to property maps.
         */
        Builder addMaps(URL value);

        /**
         * Add a value to property maps.
         */
        Builder addMaps(String value);

        /**
         * Add a value to property member.
         */
        Builder addMember(Organization value);

        /**
         * Add a value to property member.
         */
        Builder addMember(Organization.Builder value);

        /**
         * Add a value to property member.
         */
        Builder addMember(Person value);

        /**
         * Add a value to property member.
         */
        Builder addMember(Person.Builder value);

        /**
         * Add a value to property member.
         */
        Builder addMember(String value);

        /**
         * Add a value to property memberOf.
         */
        Builder addMemberOf(Organization value);

        /**
         * Add a value to property memberOf.
         */
        Builder addMemberOf(Organization.Builder value);

        /**
         * Add a value to property memberOf.
         */
        Builder addMemberOf(ProgramMembership value);

        /**
         * Add a value to property memberOf.
         */
        Builder addMemberOf(ProgramMembership.Builder value);

        /**
         * Add a value to property memberOf.
         */
        Builder addMemberOf(String value);

        /**
         * Add a value to property members.
         */
        Builder addMembers(Organization value);

        /**
         * Add a value to property members.
         */
        Builder addMembers(Organization.Builder value);

        /**
         * Add a value to property members.
         */
        Builder addMembers(Person value);

        /**
         * Add a value to property members.
         */
        Builder addMembers(Person.Builder value);

        /**
         * Add a value to property members.
         */
        Builder addMembers(String value);

        /**
         * Add a value to property naics.
         */
        Builder addNaics(Text value);

        /**
         * Add a value to property naics.
         */
        Builder addNaics(String value);

        /**
         * Add a value to property name.
         */
        Builder addName(Text value);

        /**
         * Add a value to property name.
         */
        Builder addName(String value);

        /**
         * Add a value to property numberOfEmployees.
         */
        Builder addNumberOfEmployees(QuantitativeValue value);

        /**
         * Add a value to property numberOfEmployees.
         */
        Builder addNumberOfEmployees(QuantitativeValue.Builder value);

        /**
         * Add a value to property numberOfEmployees.
         */
        Builder addNumberOfEmployees(String value);

        /**
         * Add a value to property openingHours.
         */
        Builder addOpeningHours(Text value);

        /**
         * Add a value to property openingHours.
         */
        Builder addOpeningHours(String value);

        /**
         * Add a value to property openingHoursSpecification.
         */
        Builder addOpeningHoursSpecification(OpeningHoursSpecification value);

        /**
         * Add a value to property openingHoursSpecification.
         */
        Builder addOpeningHoursSpecification(OpeningHoursSpecification.Builder value);

        /**
         * Add a value to property openingHoursSpecification.
         */
        Builder addOpeningHoursSpecification(String value);

        /**
         * Add a value to property owns.
         */
        Builder addOwns(OwnershipInfo value);

        /**
         * Add a value to property owns.
         */
        Builder addOwns(OwnershipInfo.Builder value);

        /**
         * Add a value to property owns.
         */
        Builder addOwns(Product value);

        /**
         * Add a value to property owns.
         */
        Builder addOwns(Product.Builder value);

        /**
         * Add a value to property owns.
         */
        Builder addOwns(String value);

        /**
         * Add a value to property parentOrganization.
         */
        Builder addParentOrganization(Organization value);

        /**
         * Add a value to property parentOrganization.
         */
        Builder addParentOrganization(Organization.Builder value);

        /**
         * Add a value to property parentOrganization.
         */
        Builder addParentOrganization(String value);

        /**
         * Add a value to property paymentAccepted.
         */
        Builder addPaymentAccepted(Text value);

        /**
         * Add a value to property paymentAccepted.
         */
        Builder addPaymentAccepted(String value);

        /**
         * Add a value to property photo.
         */
        Builder addPhoto(ImageObject value);

        /**
         * Add a value to property photo.
         */
        Builder addPhoto(ImageObject.Builder value);

        /**
         * Add a value to property photo.
         */
        Builder addPhoto(Photograph value);

        /**
         * Add a value to property photo.
         */
        Builder addPhoto(Photograph.Builder value);

        /**
         * Add a value to property photo.
         */
        Builder addPhoto(String value);

        /**
         * Add a value to property photos.
         */
        Builder addPhotos(ImageObject value);

        /**
         * Add a value to property photos.
         */
        Builder addPhotos(ImageObject.Builder value);

        /**
         * Add a value to property photos.
         */
        Builder addPhotos(Photograph value);

        /**
         * Add a value to property photos.
         */
        Builder addPhotos(Photograph.Builder value);

        /**
         * Add a value to property photos.
         */
        Builder addPhotos(String value);

        /**
         * Add a value to property potentialAction.
         */
        Builder addPotentialAction(Action value);

        /**
         * Add a value to property potentialAction.
         */
        Builder addPotentialAction(Action.Builder value);

        /**
         * Add a value to property potentialAction.
         */
        Builder addPotentialAction(String value);

        /**
         * Add a value to property priceRange.
         */
        Builder addPriceRange(Text value);

        /**
         * Add a value to property priceRange.
         */
        Builder addPriceRange(String value);

        /**
         * Add a value to property review.
         */
        Builder addReview(Review value);

        /**
         * Add a value to property review.
         */
        Builder addReview(Review.Builder value);

        /**
         * Add a value to property review.
         */
        Builder addReview(String value);

        /**
         * Add a value to property reviews.
         */
        Builder addReviews(Review value);

        /**
         * Add a value to property reviews.
         */
        Builder addReviews(Review.Builder value);

        /**
         * Add a value to property reviews.
         */

        /**
         * Add a value to property sameAs.
         */
        Builder addSameAs(URL value);

        /**
         * Add a value to property sameAs.
         */
        Builder addSameAs(String value);

        /**
         * Add a value to property seeks.
         */
        Builder addSeeks(Demand value);

        /**
         * Add a value to property seeks.
         */
        Builder addSeeks(Demand.Builder value);

        /**
         * Add a value to property seeks.
         */
        Builder addSeeks(String value);

        /**
         * Add a value to property serviceArea.
         */
        Builder addServiceArea(AdministrativeArea value);

        /**
         * Add a value to property serviceArea.
         */
        Builder addServiceArea(AdministrativeArea.Builder value);

        /**
         * Add a value to property serviceArea.
         */
        Builder addServiceArea(GeoShape value);

        /**
         * Add a value to property serviceArea.
         */
        Builder addServiceArea(GeoShape.Builder value);

        /**
         * Add a value to property serviceArea.
         */
        Builder addServiceArea(Place value);

        /**
         * Add a value to property serviceArea.
         */
        Builder addServiceArea(Place.Builder value);

        /**
         * Add a value to property serviceArea.
         */
        Builder addServiceArea(String value);

        /**
         * Add a value to property subOrganization.
         */
        Builder addSubOrganization(Organization value);

        /**
         * Add a value to property subOrganization.
         */
        Builder addSubOrganization(Organization.Builder value);

        /**
         * Add a value to property subOrganization.
         */
        Builder addSubOrganization(String value);

        /**
         * Add a value to property taxID.
         */
        Builder addTaxID(Text value);

        /**
         * Add a value to property taxID.
         */
        Builder addTaxID(String value);

        /**
         * Add a value to property telephone.
         */
        Builder addTelephone(Text value);

        /**
         * Add a value to property telephone.
         */
        Builder addTelephone(String value);

        /**
         * Add a value to property url.
         */
        Builder addUrl(URL value);

        /**
         * Add a value to property url.
         */
        Builder addUrl(String value);

        /**
         * Add a value to property vatID.
         */
        Builder addVatID(Text value);

        /**
         * Add a value to property vatID.
         */
        Builder addVatID(String value);

        /**
         * Add a value to property detailedDescription.
         */
        Builder addDetailedDescription(Article value);

        /**
         * Add a value to property detailedDescription.
         */
        Builder addDetailedDescription(Article.Builder value);

        /**
         * Add a value to property detailedDescription.
         */
        Builder addDetailedDescription(String value);

        /**
         * Add a value to property popularityScore.
         */
        Builder addPopularityScore(PopularityScoreSpecification value);

        /**
         * Add a value to property popularityScore.
         */
        Builder addPopularityScore(PopularityScoreSpecification.Builder value);

        /**
         * Add a value to property popularityScore.
         */
        Builder addPopularityScore(String value);

        /**
         * Add a value to property.
         *
         * @param name The property name.
         * @param value The value of the property.
         */
        Builder addProperty(String name, SchemaOrgType value);

        /**
         * Add a value to property.
         *
         * @param name The property name.
         * @param builder The schema.org object builder for the property value.
         */
        Builder addProperty(String name, Thing.Builder builder);

        /**
         * Add a value to property.
         *
         * @param name The property name.
         * @param value The string value of the property.
         */
        Builder addProperty(String name, String value);

        /**
         * Build a {@link Motel} object.
         */
        Motel build();
    }
}


while ((line = reader.readLine()) != null) {
                message.append(line).append("\n");
            }

package cc.hyperium.commands.defaults;

import cc.hyperium.commands.BaseCommand;
import cc.hyperium.handlers.handlers.chat.GeneralChatHandler;
import net.minecraft.client.Minecraft;
import java.awt.*;
import java.awt.datatransfer.StringSelection;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;

public class CommandLogs implements BaseCommand {

    @Override
    public String getName() {
        return "logs";
    }

    @Override
    public String getUsage() {
        return "Usage: /logs";
    }

    @Override
    public void onExecute(String[] args) {
        StringBuilder message = new StringBuilder();
        try {
            FileReader in = new FileReader(new File(Minecraft.getMinecraft().mcDataDir, "logs" + File.separator + "latest.log"));
            BufferedReader reader = new BufferedReader(in);
            String line;

            reader.close();
            in.close();
        } catch (IOException e) {
            GeneralChatHandler.instance().sendMessage("Error whilst reading log.");
            e.printStackTrace();
            return;
        }
        message = new StringBuilder(message.toString().replaceAll(System.getProperty("user.name"), "{USERNAME}"));
        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(message.toString()), null);
        GeneralChatHandler.instance().sendMessage("Data copied to clipboard. Please paste in hastebin.com (This has been opened), save and send in Discord");
        Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
        if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {
            try {
                desktop.browse(new URL("https://hastebin.com").toURI());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}


try {
                desktop.browse(new URL("https://hastebin.com").toURI());
            } catch (Exception e) {
                e.printStackTrace();
            }

package cc.hyperium.commands.defaults;

import cc.hyperium.commands.BaseCommand;
import cc.hyperium.handlers.handlers.chat.GeneralChatHandler;
import net.minecraft.client.Minecraft;
import java.awt.*;
import java.awt.datatransfer.StringSelection;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;

public class CommandLogs implements BaseCommand {

    @Override
    public String getName() {
        return "logs";
    }

    @Override
    public String getUsage() {
        return "Usage: /logs";
    }

    @Override
    public void onExecute(String[] args) {
        StringBuilder message = new StringBuilder();
        try {
            FileReader in = new FileReader(new File(Minecraft.getMinecraft().mcDataDir, "logs" + File.separator + "latest.log"));
            BufferedReader reader = new BufferedReader(in);
            String line;
            while ((line = reader.readLine()) != null) {
                message.append(line).append("\n");
            }
            reader.close();
            in.close();
        } catch (IOException e) {
            GeneralChatHandler.instance().sendMessage("Error whilst reading log.");
            e.printStackTrace();
            return;
        }
        message = new StringBuilder(message.toString().replaceAll(System.getProperty("user.name"), "{USERNAME}"));
        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(message.toString()), null);
        GeneralChatHandler.instance().sendMessage("Data copied to clipboard. Please paste in hastebin.com (This has been opened), save and send in Discord");
        Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;
        if (desktop != null && desktop.isSupported(Desktop.Action.BROWSE)) {


@Bean
    public HawtioPlugin samplePlugin() {
        return new HawtioPlugin("sample-plugin", "plugins", "", new String[] { "sample-plugin/sample-plugin.js" });
    }

package io.hawt.example.spring.boot;

import io.hawt.config.ConfigFacade;
import io.hawt.springboot.HawtioPlugin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class SampleSpringBootService {

    public static void main(String[] args) {
        SpringApplication.run(SampleSpringBootService.class, args);
    }

    /**
     * Loading an example plugin.
     */

    /**
     * Set things up to be in offline mode.
     */
    @Bean
    public ConfigFacade configFacade() {
        return ConfigFacade.getSingleton();
    }
}


for (int i = 0; i < nProducerPartitions; i++) {
            if (localityMap.isConnected(i, receiverIndex, nConsumerPartitions)) {
                expectedPartitions.set(i);
            }
        }

package org.apache.hyracks.dataflow.std.connectors;

import java.util.BitSet;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.IPartitionCollector;
import org.apache.hyracks.api.comm.IPartitionWriterFactory;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.value.ITuplePartitionComputerFactory;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.api.job.IConnectorDescriptorRegistry;
import org.apache.hyracks.dataflow.std.base.AbstractMToNConnectorDescriptor;
import org.apache.hyracks.dataflow.std.collectors.NonDeterministicChannelReader;
import org.apache.hyracks.dataflow.std.collectors.NonDeterministicFrameReader;
import org.apache.hyracks.dataflow.std.collectors.PartitionCollector;

public class LocalityAwareMToNPartitioningConnectorDescriptor extends AbstractMToNConnectorDescriptor {

    private static final long serialVersionUID = 1L;

    private ILocalityMap localityMap;

    private ITuplePartitionComputerFactory tpcf;

    public LocalityAwareMToNPartitioningConnectorDescriptor(IConnectorDescriptorRegistry spec, ITuplePartitionComputerFactory tpcf, ILocalityMap localityMap) {
        super(spec);
        this.localityMap = localityMap;
        this.tpcf = tpcf;
    }

    @Override
    public IFrameWriter createPartitioner(IHyracksTaskContext ctx, RecordDescriptor recordDesc, IPartitionWriterFactory edwFactory, int index, int nProducerPartitions, int nConsumerPartitions) throws HyracksDataException {
        return new LocalityAwarePartitionDataWriter(ctx, edwFactory, recordDesc, tpcf.createPartitioner(ctx), nConsumerPartitions, localityMap, index);
    }

    /*
     * (non-Javadoc)
     *
     * @see org.apache.hyracks.api.dataflow.IConnectorDescriptor#
     * createPartitionCollector
     * (org.apache.hyracks.api.context.IHyracksTaskContext,
     * org.apache.hyracks.api.dataflow.value.RecordDescriptor, int, int, int)
     */
    @Override
    public IPartitionCollector createPartitionCollector(IHyracksTaskContext ctx, RecordDescriptor recordDesc, int receiverIndex, int nProducerPartitions, int nConsumerPartitions) throws HyracksDataException {
        BitSet expectedPartitions = new BitSet(nProducerPartitions);

        NonDeterministicChannelReader channelReader = new NonDeterministicChannelReader(nProducerPartitions, expectedPartitions);
        NonDeterministicFrameReader frameReader = new NonDeterministicFrameReader(channelReader);
        return new PartitionCollector(ctx, getConnectorId(), receiverIndex, expectedPartitions, frameReader, channelReader);
    }
}


@NonNull
    public static NettyNetworkHandler getInstance() {
        return NettyNetworkHandler.instance;
    }

package org.kitteh.irc.client.library.defaults.feature.network;

import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.proxy.Socks4ProxyHandler;
import io.netty.handler.proxy.Socks5ProxyHandler;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.kitteh.irc.client.library.Client;
import org.kitteh.irc.client.library.feature.network.NetworkHandler;
import org.kitteh.irc.client.library.feature.network.Resolver;
import org.kitteh.irc.client.library.feature.sts.StsClientState;
import org.kitteh.irc.client.library.feature.sts.StsMachine;
import org.kitteh.irc.client.library.feature.sts.StsPolicy;
import org.kitteh.irc.client.library.util.HostWithPort;
import org.kitteh.irc.client.library.util.Sanity;
import org.kitteh.irc.client.library.util.ToStringer;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.UnknownHostException;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;

/**
 * Netty connectivity management.
 */
public class NettyNetworkHandler implements NetworkHandler {

    private static final NettyNetworkHandler instance = new NettyNetworkHandler();

    /**
     * Gets the single instance of this class.
     *
     * @return instance
     */

    @Nullable
    private EventLoopGroup eventLoopGroup;

    private final Set<Client.WithManagement> clients = new HashSet<>();

    private Resolver resolver = new JavaResolver();

    private NettyNetworkHandler() {
        // NOOP
    }

    /**
     * Removes a client connection, and should be called by the connection.
     *
     * @param client client for whom to remove the connection
     */
    private synchronized void removeClientConnection(Client.@NonNull WithManagement client) {
        this.clients.remove(client);
        if (this.clients.isEmpty()) {
            if (this.eventLoopGroup != null) {
                this.eventLoopGroup.shutdownGracefully();
            }
            this.eventLoopGroup = null;
        }
    }

    @Override
    @NonNull
    public synchronized NettyConnection connect(Client.@NonNull WithManagement client) {
        // STS Override
        if (client.getStsMachine().isPresent() && !client.isSecureConnection()) {
            String hostname = client.getServerAddress().getHost();
            final StsMachine machine = client.getStsMachine().get();
            Optional<StsPolicy> policy = machine.getStorageManager().getEntry(hostname);
            if (policy.isPresent()) {
                machine.setStsPolicy(policy.get());
                machine.setCurrentState(StsClientState.STS_POLICY_CACHED);
            }
        }
        if (this.eventLoopGroup == null) {
            this.eventLoopGroup = new NioEventLoopGroup();
        }
        final Bootstrap bootstrap = new Bootstrap().channel(NioSocketChannel.class).group(this.eventLoopGroup).handler(new ChannelInitializer<SocketChannel>() {

            @Override
            public void initChannel(SocketChannel channel) {
                if (client.getProxyType().isPresent() && client.getProxyAddress().isPresent()) {
                    ChannelPipeline pipe = channel.pipeline();
                    HostWithPort proxyHostWithPort = client.getProxyAddress().get();
                    switch(client.getProxyType().get()) {
                        case SOCKS_5:
                            pipe.addLast(new Socks5ProxyHandler(new InetSocketAddress(proxyHostWithPort.getHost(), proxyHostWithPort.getPort())));
                            break;
                        case SOCKS_4:
                            pipe.addLast(new Socks4ProxyHandler(new InetSocketAddress(proxyHostWithPort.getHost(), proxyHostWithPort.getPort())));
                            break;
                        default:
                            throw new IllegalArgumentException("Unsupported proxy type: " + client.getProxyType());
                    }
                }
            }
        }).option(ChannelOption.TCP_NODELAY, true);
        SocketAddress bind = client.getBindAddress();
        final String host = client.getServerAddress().getHost();
        SocketAddress server;
        try {
            InetAddress address = this.resolver.getAddress(host);
            server = new InetSocketAddress(address, client.getServerAddress().getPort());
        } catch (UnknownHostException e) {
            server = InetSocketAddress.createUnresolved(host, client.getServerAddress().getPort());
        }
        NettyConnection clientConnection = new NettyConnection(client, bootstrap.connect(server, bind), this::removeClientConnection);
        this.clients.add(client);
        return clientConnection;
    }

    @Override
    @NonNull
    public Resolver getResolver() {
        return this.resolver;
    }

    @Override
    public void setResolver(@NonNull Resolver resolver) {
        this.resolver = Sanity.nullCheck(resolver, "Resolver");
    }

    @Override
    @NonNull
    public String toString() {
        return new ToStringer(this).toString();
    }
}


try {
            InetAddress address = this.resolver.getAddress(host);
            server = new InetSocketAddress(address, client.getServerAddress().getPort());
        } catch (UnknownHostException e) {
            server = InetSocketAddress.createUnresolved(host, client.getServerAddress().getPort());
        }

package org.kitteh.irc.client.library.defaults.feature.network;

import io.netty.bootstrap.Bootstrap;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelOption;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioSocketChannel;
import io.netty.handler.proxy.Socks4ProxyHandler;
import io.netty.handler.proxy.Socks5ProxyHandler;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.kitteh.irc.client.library.Client;
import org.kitteh.irc.client.library.feature.network.NetworkHandler;
import org.kitteh.irc.client.library.feature.network.Resolver;
import org.kitteh.irc.client.library.feature.sts.StsClientState;
import org.kitteh.irc.client.library.feature.sts.StsMachine;
import org.kitteh.irc.client.library.feature.sts.StsPolicy;
import org.kitteh.irc.client.library.util.HostWithPort;
import org.kitteh.irc.client.library.util.Sanity;
import org.kitteh.irc.client.library.util.ToStringer;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.net.UnknownHostException;
import java.util.HashSet;
import java.util.Optional;
import java.util.Set;

/**
 * Netty connectivity management.
 */
public class NettyNetworkHandler implements NetworkHandler {

    private static final NettyNetworkHandler instance = new NettyNetworkHandler();

    /**
     * Gets the single instance of this class.
     *
     * @return instance
     */
    @NonNull
    public static NettyNetworkHandler getInstance() {
        return NettyNetworkHandler.instance;
    }

    @Nullable
    private EventLoopGroup eventLoopGroup;

    private final Set<Client.WithManagement> clients = new HashSet<>();

    private Resolver resolver = new JavaResolver();

    private NettyNetworkHandler() {
        // NOOP
    }

    /**
     * Removes a client connection, and should be called by the connection.
     *
     * @param client client for whom to remove the connection
     */
    private synchronized void removeClientConnection(Client.@NonNull WithManagement client) {
        this.clients.remove(client);
        if (this.clients.isEmpty()) {
            if (this.eventLoopGroup != null) {
                this.eventLoopGroup.shutdownGracefully();
            }
            this.eventLoopGroup = null;
        }
    }

    @Override
    @NonNull
    public synchronized NettyConnection connect(Client.@NonNull WithManagement client) {
        // STS Override
        if (client.getStsMachine().isPresent() && !client.isSecureConnection()) {
            String hostname = client.getServerAddress().getHost();
            final StsMachine machine = client.getStsMachine().get();
            Optional<StsPolicy> policy = machine.getStorageManager().getEntry(hostname);
            if (policy.isPresent()) {
                machine.setStsPolicy(policy.get());
                machine.setCurrentState(StsClientState.STS_POLICY_CACHED);
            }
        }
        if (this.eventLoopGroup == null) {
            this.eventLoopGroup = new NioEventLoopGroup();
        }
        final Bootstrap bootstrap = new Bootstrap().channel(NioSocketChannel.class).group(this.eventLoopGroup).handler(new ChannelInitializer<SocketChannel>() {

            @Override
            public void initChannel(SocketChannel channel) {
                if (client.getProxyType().isPresent() && client.getProxyAddress().isPresent()) {
                    ChannelPipeline pipe = channel.pipeline();
                    HostWithPort proxyHostWithPort = client.getProxyAddress().get();
                    switch(client.getProxyType().get()) {
                        case SOCKS_5:
                            pipe.addLast(new Socks5ProxyHandler(new InetSocketAddress(proxyHostWithPort.getHost(), proxyHostWithPort.getPort())));
                            break;
                        case SOCKS_4:
                            pipe.addLast(new Socks4ProxyHandler(new InetSocketAddress(proxyHostWithPort.getHost(), proxyHostWithPort.getPort())));
                            break;
                        default:
                            throw new IllegalArgumentException("Unsupported proxy type: " + client.getProxyType());
                    }
                }
            }
        }).option(ChannelOption.TCP_NODELAY, true);
        SocketAddress bind = client.getBindAddress();
        final String host = client.getServerAddress().getHost();
        SocketAddress server;

        NettyConnection clientConnection = new NettyConnection(client, bootstrap.connect(server, bind), this::removeClientConnection);
        this.clients.add(client);
        return clientConnection;
    }

    @Override
    @NonNull
    public Resolver getResolver() {
        return this.resolver;
    }

    @Override
    public void setResolver(@NonNull Resolver resolver) {
        this.resolver = Sanity.nullCheck(resolver, "Resolver");
    }

    @Override
    @NonNull
    public String toString() {
        return new ToStringer(this).toString();
    }
}


static void copyNativeStats(@NonNull DeleteStatsProto fromNativeStats, @NonNull RemoveStats.Builder toStatsBuilder) {
        Objects.requireNonNull(fromNativeStats);
        Objects.requireNonNull(toStatsBuilder);
        toStatsBuilder.setNativeLatencyMillis(fromNativeStats.getLatencyMs()).setDeleteType(fromNativeStats.getDeleteType().getNumber()).setDeletedDocumentCount(fromNativeStats.getNumDocumentsDeleted());
    }

package com.android.server.appsearch.external.localstorage;

import android.annotation.NonNull;
import com.android.server.appsearch.external.localstorage.stats.InitializeStats;
import com.android.server.appsearch.external.localstorage.stats.OptimizeStats;
import com.android.server.appsearch.external.localstorage.stats.PutDocumentStats;
import com.android.server.appsearch.external.localstorage.stats.RemoveStats;
import com.android.server.appsearch.external.localstorage.stats.SearchStats;
import com.google.android.icing.proto.DeleteStatsProto;
import com.google.android.icing.proto.InitializeStatsProto;
import com.google.android.icing.proto.OptimizeStatsProto;
import com.google.android.icing.proto.PutDocumentStatsProto;
import com.google.android.icing.proto.QueryStatsProto;
import java.util.Objects;

/**
 * Class contains helper functions for logging.
 *
 * <p>E.g. we need to have helper functions to copy numbers from IcingLib to stats classes.
 *
 * @hide
 */
public final class AppSearchLoggerHelper {

    private AppSearchLoggerHelper() {
    }

    /**
     * Copies native PutDocument stats to builder.
     *
     * @param fromNativeStats stats copied from
     * @param toStatsBuilder stats copied to
     */
    static void copyNativeStats(@NonNull PutDocumentStatsProto fromNativeStats, @NonNull PutDocumentStats.Builder toStatsBuilder) {
        Objects.requireNonNull(fromNativeStats);
        Objects.requireNonNull(toStatsBuilder);
        toStatsBuilder.setNativeLatencyMillis(fromNativeStats.getLatencyMs()).setNativeDocumentStoreLatencyMillis(fromNativeStats.getDocumentStoreLatencyMs()).setNativeIndexLatencyMillis(fromNativeStats.getIndexLatencyMs()).setNativeIndexMergeLatencyMillis(fromNativeStats.getIndexMergeLatencyMs()).setNativeDocumentSizeBytes(fromNativeStats.getDocumentSize()).setNativeNumTokensIndexed(fromNativeStats.getTokenizationStats().getNumTokensIndexed()).setNativeExceededMaxNumTokens(fromNativeStats.getTokenizationStats().getExceededMaxTokenNum());
    }

    /**
     * Copies native Initialize stats to builder.
     *
     * @param fromNativeStats stats copied from
     * @param toStatsBuilder stats copied to
     */
    static void copyNativeStats(@NonNull InitializeStatsProto fromNativeStats, @NonNull InitializeStats.Builder toStatsBuilder) {
        Objects.requireNonNull(fromNativeStats);
        Objects.requireNonNull(toStatsBuilder);
        toStatsBuilder.setNativeLatencyMillis(fromNativeStats.getLatencyMs()).setDocumentStoreRecoveryCause(fromNativeStats.getDocumentStoreRecoveryCause().getNumber()).setIndexRestorationCause(fromNativeStats.getIndexRestorationCause().getNumber()).setSchemaStoreRecoveryCause(fromNativeStats.getSchemaStoreRecoveryCause().getNumber()).setDocumentStoreRecoveryLatencyMillis(fromNativeStats.getDocumentStoreRecoveryLatencyMs()).setIndexRestorationLatencyMillis(fromNativeStats.getIndexRestorationLatencyMs()).setSchemaStoreRecoveryLatencyMillis(fromNativeStats.getSchemaStoreRecoveryLatencyMs()).setDocumentStoreDataStatus(fromNativeStats.getDocumentStoreDataStatus().getNumber()).setDocumentCount(fromNativeStats.getNumDocuments()).setSchemaTypeCount(fromNativeStats.getNumSchemaTypes());
    }

    /**
     * Copies native Query stats to builder.
     *
     * @param fromNativeStats Stats copied from.
     * @param toStatsBuilder Stats copied to.
     */
    static void copyNativeStats(@NonNull QueryStatsProto fromNativeStats, @NonNull SearchStats.Builder toStatsBuilder) {
        Objects.requireNonNull(fromNativeStats);
        Objects.requireNonNull(toStatsBuilder);
        toStatsBuilder.setNativeLatencyMillis(fromNativeStats.getLatencyMs()).setTermCount(fromNativeStats.getNumTerms()).setQueryLength(fromNativeStats.getQueryLength()).setFilteredNamespaceCount(fromNativeStats.getNumNamespacesFiltered()).setFilteredSchemaTypeCount(fromNativeStats.getNumSchemaTypesFiltered()).setRequestedPageSize(fromNativeStats.getRequestedPageSize()).setCurrentPageReturnedResultCount(fromNativeStats.getNumResultsReturnedCurrentPage()).setIsFirstPage(fromNativeStats.getIsFirstPage()).setParseQueryLatencyMillis(fromNativeStats.getParseQueryLatencyMs()).setRankingStrategy(fromNativeStats.getRankingStrategy().getNumber()).setScoredDocumentCount(fromNativeStats.getNumDocumentsScored()).setScoringLatencyMillis(fromNativeStats.getScoringLatencyMs()).setRankingLatencyMillis(fromNativeStats.getRankingLatencyMs()).setResultWithSnippetsCount(fromNativeStats.getNumResultsWithSnippets()).setDocumentRetrievingLatencyMillis(fromNativeStats.getDocumentRetrievalLatencyMs());
    }

    /**
     * Copies native Delete stats to builder.
     *
     * @param fromNativeStats Stats copied from.
     * @param toStatsBuilder Stats copied to.
     */

    /**
     * Copies native {@link OptimizeStatsProto} to builder.
     *
     * @param fromNativeStats Stats copied from.
     * @param toStatsBuilder Stats copied to.
     */
    static void copyNativeStats(@NonNull OptimizeStatsProto fromNativeStats, @NonNull OptimizeStats.Builder toStatsBuilder) {
        Objects.requireNonNull(fromNativeStats);
        Objects.requireNonNull(toStatsBuilder);
        toStatsBuilder.setNativeLatencyMillis(fromNativeStats.getLatencyMs()).setDocumentStoreOptimizeLatencyMillis(fromNativeStats.getDocumentStoreOptimizeLatencyMs()).setIndexRestorationLatencyMillis(fromNativeStats.getIndexRestorationLatencyMs()).setOriginalDocumentCount(fromNativeStats.getNumOriginalDocuments()).setDeletedDocumentCount(fromNativeStats.getNumDeletedDocuments()).setExpiredDocumentCount(fromNativeStats.getNumExpiredDocuments()).setStorageSizeBeforeBytes(fromNativeStats.getStorageSizeBefore()).setStorageSizeAfterBytes(fromNativeStats.getStorageSizeAfter()).setTimeSinceLastOptimizeMillis(fromNativeStats.getTimeSinceLastOptimizeMs());
    }
}


public void setMsgType(String msgType) {
        this.msgType = msgType;
    }

package me.chanjar.weixin.cp.bean;

import me.chanjar.weixin.cp.bean.messagebuilder.*;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 消息
 * @author Daniel Qian
 */
public class WxCpMessage implements Serializable {

    private String toUser;

    private String toParty;

    private String toTag;

    private String agentId;

    private String msgType;

    private String content;

    private String mediaId;

    private String thumbMediaId;

    private String title;

    private String description;

    private String musicUrl;

    private String hqMusicUrl;

    private String safe;

    private List<WxArticle> articles = new ArrayList<WxArticle>();

    public String getToUser() {
        return toUser;
    }

    public void setToUser(String toUser) {
        this.toUser = toUser;
    }

    public String getToParty() {
        return toParty;
    }

    public void setToParty(String toParty) {
        this.toParty = toParty;
    }

    public String getToTag() {
        return toTag;
    }

    public void setToTag(String toTag) {
        this.toTag = toTag;
    }

    public String getAgentId() {
        return agentId;
    }

    public void setAgentId(String agentId) {
        this.agentId = agentId;
    }

    public String getMsgType() {
        return msgType;
    }

    public String getSafe() {
        return safe;
    }

    public void setSafe(String safe) {
        this.safe = safe;
    }

    /**
     * <pre>
     * 请使用
     * {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_TEXT}
     * {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_IMAGE}
     * {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_VOICE}
     * {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_MUSIC}
     * {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_VIDEO}
     * {@link me.chanjar.weixin.common.api.WxConsts#CUSTOM_MSG_NEWS}
     * </pre>
     * @param msgType
     */

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getMediaId() {
        return mediaId;
    }

    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }

    public String getThumbMediaId() {
        return thumbMediaId;
    }

    public void setThumbMediaId(String thumbMediaId) {
        this.thumbMediaId = thumbMediaId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getMusicUrl() {
        return musicUrl;
    }

    public void setMusicUrl(String musicUrl) {
        this.musicUrl = musicUrl;
    }

    public String getHqMusicUrl() {
        return hqMusicUrl;
    }

    public void setHqMusicUrl(String hqMusicUrl) {
        this.hqMusicUrl = hqMusicUrl;
    }

    public List<WxArticle> getArticles() {
        return articles;
    }

    public void setArticles(List<WxArticle> articles) {
        this.articles = articles;
    }

    public String toJson() {
        return WxCpGsonBuilder.INSTANCE.create().toJson(this);
    }

    public static class WxArticle {

        private String title;

        private String description;

        private String url;

        private String picUrl;

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getDescription() {
            return description;
        }

        public void setDescription(String description) {
            this.description = description;
        }

        public String getUrl() {
            return url;
        }

        public void setUrl(String url) {
            this.url = url;
        }

        public String getPicUrl() {
            return picUrl;
        }

        public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
        }
    }

    public static TextBuilder TEXT() {
        return new TextBuilder();
    }

    public static ImageBuilder IMAGE() {
        return new ImageBuilder();
    }

    public static VoiceBuilder VOICE() {
        return new VoiceBuilder();
    }

    public static VideoBuilder VIDEO() {
        return new VideoBuilder();
    }

    public static NewsBuilder NEWS() {
        return new NewsBuilder();
    }

    public static FileBuilder FILE() {
        return new FileBuilder();
    }
}


while (remaining > 0) {
            if (!sourceStream.next(e -> --remaining > 0)) {
                return false;
            }
        }

package org.teavm.classlib.java.util.stream.longimpl;

import java.util.function.LongPredicate;

public class TSkippingLongStreamImpl extends TSimpleLongStreamImpl {

    private TSimpleLongStreamImpl sourceStream;

    private int skip;

    private int remaining;

    public TSkippingLongStreamImpl(TSimpleLongStreamImpl sourceStream, int skip) {
        this.sourceStream = sourceStream;
        this.skip = skip;
        remaining = skip;
    }

    @Override
    public boolean next(LongPredicate consumer) {

        return sourceStream.next(consumer);
    }

    @Override
    protected int estimateSize() {
        int sourceSize = sourceStream.estimateSize();
        return sourceSize >= 0 ? Math.max(0, sourceSize - skip) : -1;
    }

    @Override
    public void close() throws Exception {
        sourceStream.close();
    }
}


public void addHeader(SerializableHeader h) {
        mHeaders.add(h);
    }

package fr.pcreations.labs.RESTDroid.core;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry;
import java.util.UUID;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import fr.pcreations.labs.RESTDroid.core.RequestListeners.OnFailedRequestListener;
import fr.pcreations.labs.RESTDroid.core.RequestListeners.OnFinishedRequestListener;
import fr.pcreations.labs.RESTDroid.core.RequestListeners.OnStartedRequestListener;
import fr.pcreations.labs.RESTDroid.core.RequestListeners.OnSucceededRequestListener;

/**
 * <b>Holder class for all request stuff. Provides some listener to handle specific logic in Activity when request starts, succeed or failed</b>
 *
 * @author Pierre Criulanscy
 *
 * @param <T>
 * 		The {@link ResourceRepresentation} class that request deals with
 *
 * @version 0.7.2
 */
public class RESTRequest<T extends Resource> implements Serializable {

    private static final long serialVersionUID = -3975518541858101876L;

    /**
     * ID of the request. Should be unique
     *
     * @see RESTRequest#getID()
     */
    private UUID mID;

    /**
     * The particular {@link HTTPVerb} for this request
     *
     * @see RESTRequest#getVerb()
     * @see RESTRequest#setVerb(HTTPVerb)
     */
    private HTTPVerb mVerb;

    /**
     * Url for this request
     *
     * @see RESTRequest#getUrl()
     * @see RESTRequest#setUrl(String)
     */
    private String mUrl;

    /**
     * Request result code
     *
     * @see RESTRequest#getResultCode()
     * @see RESTRequest#setResultCode(int)
     */
    private int mResultCode;

    /**
     * Boolean to know if request is pending
     *
     * @see RESTRequest#isPending()
     * @see RESTRequest#setPending(boolean)
     *
     * @since 0.6.0
     */
    private boolean mPending;

    /**
     * The server response
     *
     * @see RESTRequest#getResultStream()
     * @see RESTRequest#setResultStream(InputStream)
     *
     * @since 0.7.1
     */
    private transient ByteArrayOutputStream mByteArrayResultStream;

    /**
     * Defines extra parameters for request
     */
    private Bundle mExtraParams;

    /**
     * List of {@link SerializableHeader} for this request
     *
     * @see RESTRequest#getHeaders()
     * @see RESTRequest#addHeader(SerializableHeader)
     * @see RESTRequest#addHeader(String, String)
     */
    private List<SerializableHeader> mHeaders;

    /**
     * Instance of {@link ResourceRepresentation} attached to this request
     *
     * @see RESTRequest#getResourceRepresentation()
     * @see RESTRequest#setResourceRepresentation(ResourceRepresentation)
     */
    private T mResource;

    /**
     * The Class object of {@link ResourceRepresentation} attached to this request. Useful when {@link RESTRequest#mResource} is null
     *
     * @see RESTRequest#getResourceClass()
     */
    private Class<T> mResourceClass;

    /**
     *  Instance of {@link RequestListeners}
     *
     *  @see RESTRequest#setRequestListeners(Activity, Class)
     *  @see RESTRequest#getRequestListeners()
     *
     *  @since 0.7.1
     */
    private transient RequestListeners mRequestListeners;

    private Class<? extends FailBehavior> mFailBehaviorClass;

    private long mExpirationTime;

    /**
     * Constructor
     *
     * @param id
     * 		Unique ID of the request
     *
     * @param clazz
     * 		The Class object of the {@link ResourceRepresentation} attached to this request
     */
    public RESTRequest(UUID id, Class<T> clazz) {
        mID = id;
        mResourceClass = clazz;
        mPending = false;
        mHeaders = new ArrayList<SerializableHeader>();
    }

    /**
     * Constructor
     *
     * @param verb
     * @param id
     * @param url
     * @param extraParams
     */
    public RESTRequest(HTTPVerb verb, UUID id, String url, Bundle extraParams) {
        super();
        mVerb = verb;
        mID = id;
        mUrl = url;
        mPending = false;
        mExtraParams = extraParams;
        mHeaders = new ArrayList<SerializableHeader>();
    }

    /**
     * Pauses the listeners by setting their state to {@link ListenerState#UNSET}
     *
     * @see RESTRequest#resumeListeners()
     * @see RequestListeners
     */
    public void pauseListeners() {
        if (mRequestListeners != null) {
            for (Entry<OnStartedRequestListener, ListenerState> listener : mRequestListeners.getOnStartedRequestListeners().entrySet()) {
                listener.setValue(ListenerState.UNSET);
            }
            for (Entry<OnFailedRequestListener, ListenerState> listener : mRequestListeners.getOnFailedRequestListeners().entrySet()) {
                listener.setValue(ListenerState.UNSET);
            }
            for (Entry<OnSucceededRequestListener, ListenerState> listener : mRequestListeners.getOnSucceedRequestListeners().entrySet()) {
                listener.setValue(ListenerState.UNSET);
            }
        }
    }

    /**
     * Resumes the listeners. If listener state is set to {@link ListenerState#UNSET}, state is updated to {@link ListenerState#SET}. If the state is {@link ListenerState#TRIGGER_ME} the listener is triggered and is state updated to {@link ListenerState#TRIGGERED}
     *
     * @return
     * 		True if listener(s) was triggered, false otherwise
     *
     * @see RESTRequest#pauseListeners()
     * @see RequestListeners
     */
    public boolean resumeListeners() {
        boolean listenerTriggered = false;
        if (mRequestListeners != null) {
            for (Entry<OnStartedRequestListener, ListenerState> listener : mRequestListeners.getOnStartedRequestListeners().entrySet()) {
                switch(listener.getValue()) {
                    case TRIGGER_ME:
                        listener.setValue(ListenerState.TRIGGERED);
                        listener.getKey().onStartedRequest();
                        listenerTriggered = true;
                        break;
                    case UNSET:
                        listener.setValue(ListenerState.SET);
                        break;
                    default:
                        break;
                }
            }
            for (Entry<OnFailedRequestListener, ListenerState> listener : mRequestListeners.getOnFailedRequestListeners().entrySet()) {
                switch(listener.getValue()) {
                    case TRIGGER_ME:
                        listener.setValue(ListenerState.TRIGGERED);
                        listener.getKey().onFailedRequest(mResultCode);
                        listenerTriggered = true;
                        break;
                    case UNSET:
                        listener.setValue(ListenerState.SET);
                        break;
                    default:
                        break;
                }
            }
            for (Entry<OnSucceededRequestListener, ListenerState> listener : mRequestListeners.getOnSucceedRequestListeners().entrySet()) {
                switch(listener.getValue()) {
                    case TRIGGER_ME:
                        listener.setValue(ListenerState.TRIGGERED);
                        listener.getKey().onSucceededRequest(mResultCode);
                        listenerTriggered = true;
                        break;
                    case UNSET:
                        listener.setValue(ListenerState.SET);
                        break;
                    default:
                        break;
                }
            }
        }
        return listenerTriggered;
    }

    /**
     * Getter for the unique ID of the request
     *
     * @return
     * 		The unique ID of the request
     *
     * @see RESTRequest#mID
     */
    public UUID getID() {
        return mID;
    }

    /**
     * Getter for request's list of {@link SerializableHeader}
     *
     * @return
     * 		All the {@link SerializableHeader} of the request
     *
     * @see RESTRequest#mHeaders
     * @see RESTRequest#addHeader(SerializableHeader)
     * @see RESTRequest#addHeader(String, String)
     * @see SerializableHeader
     */
    public List<SerializableHeader> getHeaders() {
        return mHeaders;
    }

    /**
     * Triggers {@link OnStartedRequestListener} if state is set to {@link ListenerState#SET} and updates state to {@link ListenerState#TRIGGERED}. If the listener is unset, state is updated to {@link ListenerState#TRIGGER_ME}
     *
     * @return
     * 		True if a listener was triggered, false otherwise
     *
     * @see RequestListeners#mOnStartedRequestListeners
     */
    public boolean triggerOnStartedRequestListeners() {
        boolean listenerFired = false;
        if (mRequestListeners != null) {
            for (Entry<OnStartedRequestListener, ListenerState> listener : mRequestListeners.getOnStartedRequestListeners().entrySet()) {
                switch(listener.getValue()) {
                    case SET:
                        listener.setValue(ListenerState.TRIGGERED);
                        listenerFired = true;
                        listener.getKey().onStartedRequest();
                        break;
                    case UNSET:
                        listener.setValue(ListenerState.TRIGGER_ME);
                        break;
                    default:
                        Log.e("CAN'T TRIGGER STARTED REQUEST LISTENER", listener.getValue().toString());
                }
            }
        }
        return listenerFired;
    }

    /**
     * Triggers {@link OnFinishedRequestListener} if state is set to {@link ListenerState#SET} and updates state to {@link ListenerState#TRIGGERED}. If the listener is unset, state is updated to {@link ListenerState#TRIGGER_ME}
     *
     * @return
     * 		True if a listener was triggered, false otherwise
     *
     * @see RequestListeners#mOnSucceededRequestListeners
     */
    public boolean triggerOnSucceededRequestListeners() {
        boolean listenerFired = false;
        if (mRequestListeners != null) {
            for (Entry<OnSucceededRequestListener, ListenerState> listener : mRequestListeners.getOnSucceedRequestListeners().entrySet()) {
                switch(listener.getValue()) {
                    case SET:
                        listener.setValue(ListenerState.TRIGGERED);
                        listenerFired = true;
                        listener.getKey().onSucceededRequest(mResultCode);
                        break;
                    case UNSET:
                        listener.setValue(ListenerState.TRIGGER_ME);
                        break;
                    default:
                        break;
                }
            }
        }
        return listenerFired;
    }

    /**
     * Triggers {@link OnFailedRequestListener} if state is set to {@link ListenerState#SET} and updates state to {@link ListenerState#TRIGGERED}. If the listener is unset, state is updated to {@link ListenerState#TRIGGER_ME}
     *
     * @return
     * 		True if a listener was triggered, false otherwise
     *
     * @see RequestListeners#mOnFailedRequestListeners
     */
    public boolean triggerOnFailedRequestListeners() {
        boolean listenerFired = false;
        if (mRequestListeners != null) {
            for (Entry<OnFailedRequestListener, ListenerState> listener : mRequestListeners.getOnFailedRequestListeners().entrySet()) {
                switch(listener.getValue()) {
                    case SET:
                        listener.setValue(ListenerState.TRIGGERED);
                        listenerFired = true;
                        listener.getKey().onFailedRequest(mResultCode);
                        break;
                    case UNSET:
                        listener.setValue(ListenerState.TRIGGER_ME);
                        break;
                    default:
                        break;
                }
            }
        }
        return listenerFired;
    }

    /**
     * Triggers {@link OnFinishedRequestListener} if state is set to {@link ListenerState#SET} and updates state to {@link ListenerState#TRIGGERED}. If the listener is unset, state is updated to {@link ListenerState#TRIGGER_ME}
     *
     * @return
     * 		True if a listener was triggered, false otherwise
     *
     * @see RequestListeners#mOnFinishedRequestListeners
     */
    public boolean triggerOnFinishedRequestListeners() {
        boolean listenerFired = false;
        if (mRequestListeners != null) {
            for (Entry<OnFinishedRequestListener, ListenerState> listener : mRequestListeners.getOnFinishedRequestListeners().entrySet()) {
                switch(listener.getValue()) {
                    case SET:
                        listener.setValue(ListenerState.TRIGGERED);
                        listenerFired = true;
                        listener.getKey().onFinishedRequest(mResultCode);
                        break;
                    case UNSET:
                        listener.setValue(ListenerState.TRIGGER_ME);
                        break;
                    default:
                        break;
                }
            }
        }
        return listenerFired;
    }

    /**
     * Getter for url
     *
     * @return
     * 		The {@link RESTRequest}'s url
     *
     * @see RESTRequest#mUrl
     * @see RESTRequest#setUrl(String)
     */
    public String getUrl() {
        return mUrl;
    }

    /**
     * Setter for url
     *
     * @param url
     * 		The {@link RESTRequest}'s url
     *
     * @see RESTRequest#mUrl
     * @see RESTRequest#getUrl()
     */
    public void setUrl(String url) {
        this.mUrl = url;
    }

    /**
     * Getter for {@link RESTRequest#mResultCode}
     *
     * @return
     * 		The request result code
     *
     * @see RESTRequest#mResultCode
     * @see RESTRequest#setResultCode(int)
     */
    public int getResultCode() {
        return mResultCode;
    }

    /**
     * Set the request's result code
     *
     * @param resultCode
     * 		The result code to set
     *
     * @see RESTRequest#mResultCode
     * @see RESTRequest#getResultCode()
     */
    public void setResultCode(int resultCode) {
        mResultCode = resultCode;
    }

    /**
     * Getter for {@link RESTRequest#mPending}
     *
     * @return
     * 		True if the request is pending, false otherwise
     *
     * @see RESTRequest#mPending
     * @see RESTRequest#setPending(boolean)
     *
     * @since 0.6.0
     */
    public boolean isPending() {
        return mPending;
    }

    /**
     * Setter for {@link RESTRequest#mPending}
     *
     * @param pending
     * 		The pending state
     *
     * @see RESTRequest#mPending
     * @see RESTRequest#isPending()
     *
     * @since 0.6.0
     */
    public void setPending(boolean pending) {
        mPending = pending;
    }

    /**
     * Getter for {@link RESTRequest#mByteArrayResultStream}. Returns a new InputStream each time
     *
     * @return
     * 		The server's result stream
     *
     * @see RESTRequest#mByteArrayResultStream
     * @see RESTRequest#setResultStream(InputStream)
     *
     * @since 0.7.1
     */
    public InputStream getResultStream() {
        if (null == mByteArrayResultStream)
            return null;
        InputStream is = new ByteArrayInputStream(mByteArrayResultStream.toByteArray());
        return is;
    }

    /**
     * Setter for {@link RESTRequest#mByteArrayResultStream}
     *
     * @param mResultStream
     * 		The server's result stream
     * @throws IOException
     *
     * @see RESTRequest#mByteArrayResultStream
     * @see RESTRequest#getResultStream()
     *
     * @since 0.7.1
     */
    public void setResultStream(InputStream mResultStream) throws IOException {
        if (null != mResultStream) {
            mByteArrayResultStream = new ByteArrayOutputStream();
            byte[] buffer = new byte[1024];
            int len;
            while ((len = mResultStream.read(buffer)) > -1) {
                mByteArrayResultStream.write(buffer, 0, len);
            }
            mByteArrayResultStream.flush();
        }
    }

    /**
     * Getter for {@link HTTPVerb}
     *
     * @return
     * 		The {@link RESTRequest}'s {@link HTTPVerb}
     *
     * @see HTTPVerb
     * @see RESTRequest#mVerb
     * @see RESTRequest#setVerb(HTTPVerb)
     */
    public HTTPVerb getVerb() {
        return mVerb;
    }

    /**
     * Setter for {@link HTTPVerb}
     *
     * @param mVerb
     * 		The {@link RESTRequest}'s {@link HTTPVerb}
     *
     * @see HTTPVerb
     * @see RESTRequest#mVerb
     * @see RESTRequest#getVerb()
     */
    public void setVerb(HTTPVerb mVerb) {
        this.mVerb = mVerb;
    }

    /**
     * Getter for {@link ResourceRepresentation}
     *
     * @return
     * 		The {@link RESTRequest}'s {@link ResourceRepresentation}
     *
     * @see ResourceRepresentation
     * @see RESTRequest#mResource
     * @see RESTRequest#setResourceRepresentation(ResourceRepresentation)
     */
    public T getResource() {
        return mResource;
    }

    /**
     * Getter for Class object of {@link RESTRequest}'s {@link ResourceRepresentation}
     *
     * @return
     * 		Class object of {@link RESTRequest}'s {@link ResourceRepresentation}
     *
     * @see ResourceRepresentation
     * @see RESTRequest#mResourceClass
     */
    public Class<T> getResourceClass() {
        return mResourceClass;
    }

    /**
     * Setter for {@link ResourceRepresentation}
     *
     * @param mResourceRepresentation
     * 		Instance of {@link ResourceRepresentation}
     *
     * @see ResourceRepresentation
     * @see RESTRequest#mResource
     * @see RESTRequest#getResourceRepresentation()
     */
    @SuppressWarnings("unchecked")
    public void setResource(Resource mResourceRepresentation) {
        this.mResource = (T) mResourceRepresentation;
    }

    /**
     * Getter for extra parameters
     *
     * @return
     * 		{@link RESTRequest}'s extra	parameters
     *
     * @see RESTRequest#mExtraParams
     * @see RESTRequest#setExtraParams(Bundle)
     */
    public Bundle getExtraParams() {
        return mExtraParams;
    }

    /**
     * Setter for extra parameters
     *
     * @param extraParams
     * 		Extra parameters to store in {@link RESTRequest}
     *
     * @see RESTRequest#mExtraParams
     */
    public void setExtraParams(Bundle extraParams) {
        mExtraParams = extraParams;
    }

    /**
     * Getter for {@link RESTRequest#mRequestListeners}
     *
     * @return
     * 		{@link RESTRequest#mRequestListeners}
     *
     * @see RESTRequest#mRequestListeners
     * @see RequestListeners
     * @see RESTRequest#setRequestListeners(Activity, Class)
     *
     * @since 0.7.1
     */
    public RequestListeners getRequestListeners() {
        return mRequestListeners;
    }

    /**
     * Setter for {@link RESTRequest#mRequestListeners}. Dynamically instanciate new instance of the specified {@link RequestListeners} class.
     *
     * @param a
     * 		Context activity where the {@link RequestListeners} inner class is defined
     * @param clazz
     * 		{@link RESTRequest} Class object holding by this {@link RequestListeners} class
     *
     * @since 0.7.1
     */
    public <L> void setRequestListeners(Activity a, Class<L> clazz) {
        try {
            Constructor<L> ctor = clazz.getConstructor(a.getClass());
            mRequestListeners = (RequestListeners) ctor.newInstance(a);
            mRequestListeners.setRequest(this);
        } catch (NoSuchMethodException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IllegalArgumentException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (InstantiationException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

    /**
     * Add {@link SerializableHeader} to {@link RESTRequest}
     *
     * @param h
     * 		Instance of {@link SerializableHeader}
     *
     * @see SerializableHeader
     * @see RESTRequest#mHeaders
     * @see RESTRequest#getHeaders()
     * @see RESTRequest#addHeader(String, String)
     */

    /**
     * Add {@link SerializableHeader} from name and value
     *
     * @param name
     * 		Header's name
     *
     * @param value
     * 		Header's value
     *
     * @see SerializableHeader
     * @see RESTRequest#mHeaders
     * @see RESTRequest#getHeaders()
     * @see RESTRequest#addHeader(SerializableHeader)
     */
    public void addHeader(String name, String value) {
        mHeaders.add(new SerializableHeader(name, value));
    }

    public void setExpirationTime(long expirationTime) {
        mExpirationTime = expirationTime;
    }

    public long getExpirationTime() {
        return mExpirationTime;
    }

    public Class<? extends FailBehavior> getFailBehaviorClass() {
        return mFailBehaviorClass;
    }

    public void setFailBehaviorClass(Class<? extends FailBehavior> failBehaviorClass) {
        this.mFailBehaviorClass = failBehaviorClass;
    }

    public String toString() {
        String str = "";
        str += null != mID ? "Request[id] = " + mID.toString() : "Request[id] = null";
        str += null != mVerb ? "[verb] = " + mVerb.name() : "[verb] = null";
        str += null != mUrl ? "[url] = " + mUrl : "[url] = null";
        str += null != mResource ? mResource.toString() : "[ResourceRepresentation] = null";
        return str;
    }
}