func (v *VerifyMessageRequest) Validate() error {
	v.Args = []string{}

	if len(v.PactURLs) != 0 {
		v.Args = append(v.Args, v.PactURLs...)
	} else {
		return fmt.Errorf("Pact URLs is mandatory")
	}

	v.Args = append(v.Args, "--format", "json")

	if v.BrokerUsername != "" {
		v.Args = append(v.Args, "--broker-username", v.BrokerUsername)
	}

	if v.BrokerPassword != "" {
		v.Args = append(v.Args, "--broker-password", v.BrokerPassword)
	}

	if v.ProviderVersion != "" {
		v.Args = append(v.Args, "--provider_app_version", v.ProviderVersion)
	}

	if v.PublishVerificationResults {
		v.Args = append(v.Args, "--publish_verification_results", "true")
	}

	return nil
}
func (v *VerifyMessageRequest) Validate() error {
	v.Args = []string{}

	if len(v.PactURLs) != 0 {
		v.Args = append(v.Args, v.PactURLs...)
	} else {
		return fmt.Errorf("Pact URLs is mandatory")
	}

	v.Args = append(v.Args, "--format", "json")

	if v.BrokerUsername != "" {
		v.Args = append(v.Args, "--broker-username", v.BrokerUsername)
	}

	if v.BrokerPassword != "" {
		v.Args = append(v.Args, "--broker-password", v.BrokerPassword)
	}

	if v.ProviderVersion != "" {
		v.Args = append(v.Args, "--provider_app_version", v.ProviderVersion)
	}

	if v.PublishVerificationResults {
		v.Args = append(v.Args, "--publish_verification_results", "true")
	}

	return nil
}
func ( v * VerifyMessageRequest ) Validate ( ) error { v . Args = [ ] string { } if len ( v . PactURLs ) != 0 { v . Args = append ( v . Args , v . PactURLs ... ) } else { return fmt . Errorf ( " " ) } v . Args = append ( v . Args , " " , " " ) if v . BrokerUsername != " " { v . Args = append ( v . Args , " " , v . BrokerUsername ) } if v . BrokerPassword != " " { v . Args = append ( v . Args , " " , v . BrokerPassword ) } if v . ProviderVersion != " " { v . Args = append ( v . Args , " " , v . ProviderVersion ) } if v . PublishVerificationResults { v . Args = append ( v . Args , " " , " " ) } return nil }
// Validate checks that the minimum fields are provided.
// Deprecated: This map be deleted after the native library replaces Ruby deps,
// and should not be used outside of this library.
Validate checks that the minimum fields are provided . Deprecated : This map be deleted after the native library replaces Ruby deps and should not be used outside of this library .